Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.h

Issue 441453002: Support for process-wide incidents in the safe browsing incident reporting service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new test plus other review comments Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // The Safe Browsing service is responsible for downloading anti-phishing and 5 // The Safe Browsing service is responsible for downloading anti-phishing and
6 // anti-malware tables and checking urls against them. 6 // anti-malware tables and checking urls against them.
7 7
8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 8 #ifndef CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 9 #define CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
10 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/sequenced_task_runner_helpers.h" 19 #include "base/sequenced_task_runner_helpers.h"
20 #include "chrome/browser/safe_browsing/delayed_analysis_callback.h"
20 #include "chrome/browser/safe_browsing/safe_browsing_util.h" 21 #include "chrome/browser/safe_browsing/safe_browsing_util.h"
21 #include "content/public/browser/browser_thread.h" 22 #include "content/public/browser/browser_thread.h"
22 #include "content/public/browser/notification_observer.h" 23 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 24 #include "content/public/browser/notification_registrar.h"
24 25
25 class PrefChangeRegistrar; 26 class PrefChangeRegistrar;
26 class PrefService; 27 class PrefService;
27 class Profile; 28 class Profile;
28 struct SafeBrowsingProtocolConfig; 29 struct SafeBrowsingProtocolConfig;
29 class SafeBrowsingDatabaseManager; 30 class SafeBrowsingDatabaseManager;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SafeBrowsingProtocolManager* protocol_manager() const; 118 SafeBrowsingProtocolManager* protocol_manager() const;
118 119
119 SafeBrowsingPingManager* ping_manager() const; 120 SafeBrowsingPingManager* ping_manager() const;
120 121
121 // Returns a preference validation delegate that adds incidents to the 122 // Returns a preference validation delegate that adds incidents to the
122 // incident reporting service for validation failures. Returns NULL if the 123 // incident reporting service for validation failures. Returns NULL if the
123 // service is not applicable for the given profile. 124 // service is not applicable for the given profile.
124 scoped_ptr<TrackedPreferenceValidationDelegate> 125 scoped_ptr<TrackedPreferenceValidationDelegate>
125 CreatePreferenceValidationDelegate(Profile* profile) const; 126 CreatePreferenceValidationDelegate(Profile* profile) const;
126 127
128 // Registers |callback| to be run after some delay following process launch.
129 // |callback| will be dropped if the service is not applicable for the
130 // process.
131 void RegisterDelayedAnalysisCallback(
132 const safe_browsing::DelayedAnalysisCallback& callback);
133
127 protected: 134 protected:
128 // Creates the safe browsing service. Need to initialize before using. 135 // Creates the safe browsing service. Need to initialize before using.
129 SafeBrowsingService(); 136 SafeBrowsingService();
130 137
131 virtual ~SafeBrowsingService(); 138 virtual ~SafeBrowsingService();
132 139
133 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager(); 140 virtual SafeBrowsingDatabaseManager* CreateDatabaseManager();
134 141
135 virtual SafeBrowsingUIManager* CreateUIManager(); 142 virtual SafeBrowsingUIManager* CreateUIManager();
136 143
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 class SafeBrowsingServiceFactory { 250 class SafeBrowsingServiceFactory {
244 public: 251 public:
245 SafeBrowsingServiceFactory() { } 252 SafeBrowsingServiceFactory() { }
246 virtual ~SafeBrowsingServiceFactory() { } 253 virtual ~SafeBrowsingServiceFactory() { }
247 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; 254 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0;
248 private: 255 private:
249 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); 256 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory);
250 }; 257 };
251 258
252 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ 259 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698