| 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_quota_manager_bridge.h" | 7 #include "android_webview/browser/aw_quota_manager_bridge.h" |
| 8 #include "android_webview/browser/jni_dependency_factory.h" | 8 #include "android_webview/browser/jni_dependency_factory.h" |
| 9 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 9 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
| 10 #include "components/visitedlink/browser/visitedlink_master.h" | 10 #include "components/visitedlink/browser/visitedlink_master.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 DCHECK(visitedlink_master_); | 74 DCHECK(visitedlink_master_); |
| 75 visitedlink_master_->AddURLs(urls); | 75 visitedlink_master_->AddURLs(urls); |
| 76 } | 76 } |
| 77 | 77 |
| 78 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( | 78 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( |
| 79 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 79 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 80 blob_protocol_handler, | 80 blob_protocol_handler, |
| 81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 82 file_system_protocol_handler, | 82 file_system_protocol_handler, |
| 83 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 83 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 84 developer_protocol_handler, | |
| 85 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 86 chrome_protocol_handler, | 84 chrome_protocol_handler, |
| 87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 85 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 88 chrome_devtools_protocol_handler) { | 86 chrome_devtools_protocol_handler) { |
| 89 CHECK(url_request_context_getter_); | 87 CHECK(url_request_context_getter_); |
| 90 url_request_context_getter_->SetProtocolHandlers( | 88 url_request_context_getter_->SetProtocolHandlers( |
| 91 blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(), | 89 blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(), |
| 92 developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(), | 90 chrome_protocol_handler.Pass(), chrome_devtools_protocol_handler.Pass()); |
| 93 chrome_devtools_protocol_handler.Pass()); | |
| 94 return url_request_context_getter_.get(); | 91 return url_request_context_getter_.get(); |
| 95 } | 92 } |
| 96 | 93 |
| 97 net::URLRequestContextGetter* | 94 net::URLRequestContextGetter* |
| 98 AwBrowserContext::CreateRequestContextForStoragePartition( | 95 AwBrowserContext::CreateRequestContextForStoragePartition( |
| 99 const base::FilePath& partition_path, | 96 const base::FilePath& partition_path, |
| 100 bool in_memory, | 97 bool in_memory, |
| 101 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 98 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 102 blob_protocol_handler, | 99 blob_protocol_handler, |
| 103 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 100 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 104 file_system_protocol_handler, | 101 file_system_protocol_handler, |
| 105 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 102 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 106 developer_protocol_handler, | |
| 107 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | |
| 108 chrome_protocol_handler, | 103 chrome_protocol_handler, |
| 109 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> | 104 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> |
| 110 chrome_devtools_protocol_handler) { | 105 chrome_devtools_protocol_handler) { |
| 111 CHECK(url_request_context_getter_); | 106 CHECK(url_request_context_getter_); |
| 112 return url_request_context_getter_.get(); | 107 return url_request_context_getter_.get(); |
| 113 } | 108 } |
| 114 | 109 |
| 115 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { | 110 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { |
| 116 if (!quota_manager_bridge_) { | 111 if (!quota_manager_bridge_) { |
| 117 quota_manager_bridge_.reset( | 112 quota_manager_bridge_.reset( |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 | 188 |
| 194 void AwBrowserContext::RebuildTable( | 189 void AwBrowserContext::RebuildTable( |
| 195 const scoped_refptr<URLEnumerator>& enumerator) { | 190 const scoped_refptr<URLEnumerator>& enumerator) { |
| 196 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 191 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
| 197 // can change in the lifetime of this WebView and may not yet be set here. | 192 // can change in the lifetime of this WebView and may not yet be set here. |
| 198 // Therefore this initialization path is not used. | 193 // Therefore this initialization path is not used. |
| 199 enumerator->OnComplete(true); | 194 enumerator->OnComplete(true); |
| 200 } | 195 } |
| 201 | 196 |
| 202 } // namespace android_webview | 197 } // namespace android_webview |
| OLD | NEW |