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 #include "android_webview/browser/aw_browser_context.h" | 5 #include "android_webview/browser/aw_browser_context.h" |
6 | 6 |
7 #include "android_webview/browser/aw_form_database_service.h" | 7 #include "android_webview/browser/aw_form_database_service.h" |
8 #include "android_webview/browser/aw_pref_store.h" | 8 #include "android_webview/browser/aw_pref_store.h" |
9 #include "android_webview/browser/aw_quota_manager_bridge.h" | 9 #include "android_webview/browser/aw_quota_manager_bridge.h" |
10 #include "android_webview/browser/jni_dependency_factory.h" | 10 #include "android_webview/browser/jni_dependency_factory.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 visitedlink_master_->Init(); | 101 visitedlink_master_->Init(); |
102 } | 102 } |
103 | 103 |
104 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { | 104 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { |
105 DCHECK(visitedlink_master_); | 105 DCHECK(visitedlink_master_); |
106 visitedlink_master_->AddURLs(urls); | 106 visitedlink_master_->AddURLs(urls); |
107 } | 107 } |
108 | 108 |
109 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( | 109 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( |
110 content::ProtocolHandlerMap* protocol_handlers) { | 110 content::ProtocolHandlerMap* protocol_handlers) { |
| 111 // TODO(ajwong): The whole interaction between |
| 112 // BrowserThreadDelegate::Init(), StoragePartition is non-standard. |
| 113 // Usually the CookieStore is created and owned by the StoragePartition. |
| 114 // |
| 115 // Fix this after we clean up the cookie stores in http://crbug.com/159193 |
111 CHECK(url_request_context_getter_.get()); | 116 CHECK(url_request_context_getter_.get()); |
112 url_request_context_getter_->SetProtocolHandlers(protocol_handlers); | 117 url_request_context_getter_->SetProtocolHandlers(protocol_handlers); |
113 return url_request_context_getter_.get(); | 118 return url_request_context_getter_.get(); |
114 } | 119 } |
115 | 120 |
116 net::URLRequestContextGetter* | 121 net::URLRequestContextGetter* |
117 AwBrowserContext::CreateRequestContextForStoragePartition( | 122 AwBrowserContext::CreateRequestContextForStoragePartition( |
118 const base::FilePath& partition_path, | 123 const base::FilePath& partition_path, |
119 bool in_memory, | 124 bool in_memory, |
120 content::ProtocolHandlerMap* protocol_handlers) { | 125 content::ProtocolHandlerMap* protocol_handlers) { |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 | 244 |
240 void AwBrowserContext::RebuildTable( | 245 void AwBrowserContext::RebuildTable( |
241 const scoped_refptr<URLEnumerator>& enumerator) { | 246 const scoped_refptr<URLEnumerator>& enumerator) { |
242 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 247 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
243 // can change in the lifetime of this WebView and may not yet be set here. | 248 // can change in the lifetime of this WebView and may not yet be set here. |
244 // Therefore this initialization path is not used. | 249 // Therefore this initialization path is not used. |
245 enumerator->OnComplete(true); | 250 enumerator->OnComplete(true); |
246 } | 251 } |
247 | 252 |
248 } // namespace android_webview | 253 } // namespace android_webview |
OLD | NEW |