Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef ApplicationReputation_h__
8 #define ApplicationReputation_h__
10 #include "nsIApplicationReputation.h"
11 #include "nsIRequestObserver.h"
12 #include "nsIStreamListener.h"
13 #include "nsISupports.h"
15 #include "nsCOMPtr.h"
16 #include "nsString.h"
18 class nsIRequest;
19 class PendingDBLookup;
20 class PendingLookup;
21 class PRLogModuleInfo;
23 class ApplicationReputationService MOZ_FINAL :
24 public nsIApplicationReputationService {
25 public:
26 NS_DECL_ISUPPORTS
27 NS_DECL_NSIAPPLICATIONREPUTATIONSERVICE
29 public:
30 static ApplicationReputationService* GetSingleton();
32 private:
33 friend class PendingLookup;
34 friend class PendingDBLookup;
35 /**
36 * Global singleton object for holding this factory service.
37 */
38 static ApplicationReputationService* gApplicationReputationService;
39 /**
40 * NSPR_LOG_MODULES=ApplicationReputation:5
41 */
42 static PRLogModuleInfo* prlog;
43 /**
44 * This is a singleton, so disallow construction.
45 */
46 ApplicationReputationService();
47 ~ApplicationReputationService();
48 /**
49 * Wrapper function for QueryReputation that makes it easier to ensure the
50 * callback is called.
51 */
52 nsresult QueryReputationInternal(nsIApplicationReputationQuery* aQuery,
53 nsIApplicationReputationCallback* aCallback);
54 };
55 #endif /* ApplicationReputation_h__ */