toolkit/components/downloads/ApplicationReputation.h

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

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

mercurial