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 |
11 #include <map> | 11 #include <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/callback.h" | 15 #include "base/callback.h" |
16 #include "base/callback_list.h" | 16 #include "base/callback_list.h" |
17 #include "base/files/file_path.h" | 17 #include "base/files/file_path.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
21 #include "base/sequenced_task_runner_helpers.h" | 21 #include "base/sequenced_task_runner_helpers.h" |
22 #include "chrome/browser/safe_browsing/services_delegate.h" | 22 #include "chrome/browser/safe_browsing/services_delegate.h" |
23 #include "components/safe_browsing_db/util.h" | 23 #include "components/safe_browsing_db/util.h" |
24 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
25 #include "content/public/browser/notification_observer.h" | 25 #include "content/public/browser/notification_observer.h" |
26 #include "content/public/browser/notification_registrar.h" | 26 #include "content/public/browser/notification_registrar.h" |
| 27 #include "net/http/http_network_session.h" |
27 | 28 |
28 #if defined(FULL_SAFE_BROWSING) | 29 #if defined(FULL_SAFE_BROWSING) |
29 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" | 30 #include "chrome/browser/safe_browsing/incident_reporting/delayed_analysis_callb
ack.h" |
30 #endif | 31 #endif |
31 | 32 |
32 class PrefChangeRegistrar; | 33 class PrefChangeRegistrar; |
33 class PrefService; | 34 class PrefService; |
34 class Profile; | 35 class Profile; |
35 class TrackedPreferenceValidationDelegate; | 36 class TrackedPreferenceValidationDelegate; |
36 | 37 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 } | 118 } |
118 | 119 |
119 // The DownloadProtectionService is not valid after the SafeBrowsingService | 120 // The DownloadProtectionService is not valid after the SafeBrowsingService |
120 // is destroyed. | 121 // is destroyed. |
121 DownloadProtectionService* download_protection_service() const { | 122 DownloadProtectionService* download_protection_service() const { |
122 return services_delegate_->GetDownloadService(); | 123 return services_delegate_->GetDownloadService(); |
123 } | 124 } |
124 | 125 |
125 scoped_refptr<net::URLRequestContextGetter> url_request_context(); | 126 scoped_refptr<net::URLRequestContextGetter> url_request_context(); |
126 | 127 |
| 128 // Called on UI thread thread when net parameters change (e.g. due to policy). |
| 129 void UpdateNetParams(net::HttpNetworkSession::ParamsUpdate params_update); |
| 130 |
127 const scoped_refptr<SafeBrowsingUIManager>& ui_manager() const; | 131 const scoped_refptr<SafeBrowsingUIManager>& ui_manager() const; |
128 | 132 |
129 // This returns either the v3 or the v4 database manager, depending on | 133 // This returns either the v3 or the v4 database manager, depending on |
130 // the experiment settings. | 134 // the experiment settings. |
131 const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager() const; | 135 const scoped_refptr<SafeBrowsingDatabaseManager>& database_manager() const; |
132 | 136 |
133 scoped_refptr<SafeBrowsingNavigationObserverManager> | 137 scoped_refptr<SafeBrowsingNavigationObserverManager> |
134 navigation_observer_manager(); | 138 navigation_observer_manager(); |
135 | 139 |
136 SafeBrowsingProtocolManager* protocol_manager() const; | 140 SafeBrowsingProtocolManager* protocol_manager() const; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 SafeBrowsingServiceFactory() { } | 323 SafeBrowsingServiceFactory() { } |
320 virtual ~SafeBrowsingServiceFactory() { } | 324 virtual ~SafeBrowsingServiceFactory() { } |
321 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; | 325 virtual SafeBrowsingService* CreateSafeBrowsingService() = 0; |
322 private: | 326 private: |
323 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); | 327 DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServiceFactory); |
324 }; | 328 }; |
325 | 329 |
326 } // namespace safe_browsing | 330 } // namespace safe_browsing |
327 | 331 |
328 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ | 332 #endif // CHROME_BROWSER_SAFE_BROWSING_SAFE_BROWSING_SERVICE_H_ |
OLD | NEW |