| 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 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "android_webview/browser/aw_download_manager_delegate.h" | 11 #include "android_webview/browser/aw_download_manager_delegate.h" |
| 12 #include "android_webview/browser/aw_safe_browsing_ui_manager.h" |
| 12 #include "android_webview/browser/aw_ssl_host_state_delegate.h" | 13 #include "android_webview/browser/aw_ssl_host_state_delegate.h" |
| 13 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 14 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 15 #include "base/macros.h" | 16 #include "base/macros.h" |
| 16 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 17 #include "components/prefs/pref_change_registrar.h" | 18 #include "components/prefs/pref_change_registrar.h" |
| 19 #include "components/safe_browsing_db/remote_database_manager.h" |
| 18 #include "components/visitedlink/browser/visitedlink_delegate.h" | 20 #include "components/visitedlink/browser/visitedlink_delegate.h" |
| 19 #include "components/web_restrictions/browser/web_restrictions_client.h" | 21 #include "components/web_restrictions/browser/web_restrictions_client.h" |
| 20 #include "content/public/browser/browser_context.h" | 22 #include "content/public/browser/browser_context.h" |
| 21 #include "content/public/browser/content_browser_client.h" | 23 #include "content/public/browser/content_browser_client.h" |
| 22 #include "net/url_request/url_request_job_factory.h" | 24 #include "net/url_request/url_request_job_factory.h" |
| 23 | 25 |
| 24 class GURL; | 26 class GURL; |
| 25 class PrefService; | 27 class PrefService; |
| 26 | 28 |
| 27 namespace content { | 29 namespace content { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 content::ProtocolHandlerMap* protocol_handlers, | 111 content::ProtocolHandlerMap* protocol_handlers, |
| 110 content::URLRequestInterceptorScopedVector request_interceptors) override; | 112 content::URLRequestInterceptorScopedVector request_interceptors) override; |
| 111 net::URLRequestContextGetter* CreateMediaRequestContext() override; | 113 net::URLRequestContextGetter* CreateMediaRequestContext() override; |
| 112 net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition( | 114 net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition( |
| 113 const base::FilePath& partition_path, | 115 const base::FilePath& partition_path, |
| 114 bool in_memory) override; | 116 bool in_memory) override; |
| 115 | 117 |
| 116 // visitedlink::VisitedLinkDelegate implementation. | 118 // visitedlink::VisitedLinkDelegate implementation. |
| 117 void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override; | 119 void RebuildTable(const scoped_refptr<URLEnumerator>& enumerator) override; |
| 118 | 120 |
| 121 AwSafeBrowsingUIManager* GetSafeBrowsingUIManager(); |
| 122 safe_browsing::RemoteSafeBrowsingDatabaseManager* GetSafeBrowsingDBManager(); |
| 123 |
| 119 private: | 124 private: |
| 120 void InitUserPrefService(); | 125 void InitUserPrefService(); |
| 121 void OnWebRestrictionsAuthorityChanged(); | 126 void OnWebRestrictionsAuthorityChanged(); |
| 122 | 127 |
| 123 | 128 |
| 124 // Delay, in milliseconds, before removing the legacy cache dir. | 129 // Delay, in milliseconds, before removing the legacy cache dir. |
| 125 // This is non-const for testing purposes. | 130 // This is non-const for testing purposes. |
| 126 static int legacy_cache_removal_delay_ms_; | 131 static int legacy_cache_removal_delay_ms_; |
| 127 | 132 |
| 128 // The file path where data for this context is persisted. | 133 // The file path where data for this context is persisted. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 141 std::unique_ptr<PrefService> user_pref_service_; | 146 std::unique_ptr<PrefService> user_pref_service_; |
| 142 std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; | 147 std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_; |
| 143 std::unique_ptr<policy::URLBlacklistManager> blacklist_manager_; | 148 std::unique_ptr<policy::URLBlacklistManager> blacklist_manager_; |
| 144 | 149 |
| 145 std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; | 150 std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_; |
| 146 std::unique_ptr<content::PermissionManager> permission_manager_; | 151 std::unique_ptr<content::PermissionManager> permission_manager_; |
| 147 std::unique_ptr<web_restrictions::WebRestrictionsClient> | 152 std::unique_ptr<web_restrictions::WebRestrictionsClient> |
| 148 web_restriction_provider_; | 153 web_restriction_provider_; |
| 149 PrefChangeRegistrar pref_change_registrar_; | 154 PrefChangeRegistrar pref_change_registrar_; |
| 150 | 155 |
| 156 scoped_refptr<AwSafeBrowsingUIManager> safe_browsing_ui_manager_; |
| 157 scoped_refptr<safe_browsing::RemoteSafeBrowsingDatabaseManager> |
| 158 safe_browsing_db_manager_; |
| 159 bool safe_browsing_db_manager_started_ = false; |
| 160 |
| 151 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); | 161 DISALLOW_COPY_AND_ASSIGN(AwBrowserContext); |
| 152 }; | 162 }; |
| 153 | 163 |
| 154 } // namespace android_webview | 164 } // namespace android_webview |
| 155 | 165 |
| 156 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ | 166 #endif // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_CONTEXT_H_ |
| OLD | NEW |