| OLD | NEW |
| 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 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 void Start(); | 176 void Start(); |
| 177 | 177 |
| 178 // Stops the SafeBrowsingService. This can be called when the safe browsing | 178 // Stops the SafeBrowsingService. This can be called when the safe browsing |
| 179 // preference is disabled. When shutdown is true, operation is permanently | 179 // preference is disabled. When shutdown is true, operation is permanently |
| 180 // shutdown and cannot be restarted. | 180 // shutdown and cannot be restarted. |
| 181 void Stop(bool shutdown); | 181 void Stop(bool shutdown); |
| 182 | 182 |
| 183 // content::NotificationObserver override | 183 // content::NotificationObserver override |
| 184 virtual void Observe(int type, | 184 virtual void Observe(int type, |
| 185 const content::NotificationSource& source, | 185 const content::NotificationSource& source, |
| 186 const content::NotificationDetails& details) OVERRIDE; | 186 const content::NotificationDetails& details) override; |
| 187 | 187 |
| 188 // Starts following the safe browsing preference on |pref_service|. | 188 // Starts following the safe browsing preference on |pref_service|. |
| 189 void AddPrefService(PrefService* pref_service); | 189 void AddPrefService(PrefService* pref_service); |
| 190 | 190 |
| 191 // Stop following the safe browsing preference on |pref_service|. | 191 // Stop following the safe browsing preference on |pref_service|. |
| 192 void RemovePrefService(PrefService* pref_service); | 192 void RemovePrefService(PrefService* pref_service); |
| 193 | 193 |
| 194 // Checks if any profile is currently using the safe browsing service, and | 194 // Checks if any profile is currently using the safe browsing service, and |
| 195 // starts or stops the service accordingly. | 195 // starts or stops the service accordingly. |
| 196 void RefreshState(); | 196 void RefreshState(); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 class SafeBrowsingServiceFactory { | 254 class SafeBrowsingServiceFactory { |
| 255 public: | 255 public: |
| 256 SafeBrowsingServiceFactory() { } | 256 SafeBrowsingServiceFactory() { } |
| 257 virtual ~SafeBrowsingServiceFactory() { } | 257 virtual ~SafeBrowsingServiceFactory() { } |
| 258 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 258 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
| 259 private: | 259 private: |
| 260 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 260 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
| 261 }; | 261 }; |
| 262 | 262 |
| 263 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 263 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
| OLD | NEW |