| 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/aw_resource_context.h" | 10 #include "android_webview/browser/aw_resource_context.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( | 143 net::URLRequestContextGetter* AwBrowserContext::CreateRequestContext( |
| 144 content::ProtocolHandlerMap* protocol_handlers, | 144 content::ProtocolHandlerMap* protocol_handlers, |
| 145 content::URLRequestInterceptorScopedVector request_interceptors) { | 145 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 146 // This function cannot actually create the request context because | 146 // This function cannot actually create the request context because |
| 147 // there is a reentrant dependency on GetResourceContext() via | 147 // there is a reentrant dependency on GetResourceContext() via |
| 148 // content::StoragePartitionImplMap::Create(). This is not fixable | 148 // content::StoragePartitionImplMap::Create(). This is not fixable |
| 149 // until http://crbug.com/159193. Until then, assert that the context | 149 // until http://crbug.com/159193. Until then, assert that the context |
| 150 // has already been allocated and just handle setting the protocol_handlers. | 150 // has already been allocated and just handle setting the protocol_handlers. |
| 151 DCHECK(url_request_context_getter_); | 151 DCHECK(url_request_context_getter_.get()); |
| 152 url_request_context_getter_->SetHandlersAndInterceptors( | 152 url_request_context_getter_->SetHandlersAndInterceptors( |
| 153 protocol_handlers, request_interceptors.Pass()); | 153 protocol_handlers, request_interceptors.Pass()); |
| 154 return url_request_context_getter_; | 154 return url_request_context_getter_.get(); |
| 155 } | 155 } |
| 156 | 156 |
| 157 net::URLRequestContextGetter* | 157 net::URLRequestContextGetter* |
| 158 AwBrowserContext::CreateRequestContextForStoragePartition( | 158 AwBrowserContext::CreateRequestContextForStoragePartition( |
| 159 const base::FilePath& partition_path, | 159 const base::FilePath& partition_path, |
| 160 bool in_memory, | 160 bool in_memory, |
| 161 content::ProtocolHandlerMap* protocol_handlers, | 161 content::ProtocolHandlerMap* protocol_handlers, |
| 162 content::URLRequestInterceptorScopedVector request_interceptors) { | 162 content::URLRequestInterceptorScopedVector request_interceptors) { |
| 163 NOTREACHED(); | 163 NOTREACHED(); |
| 164 return NULL; | 164 return NULL; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 void AwBrowserContext::RebuildTable( | 289 void AwBrowserContext::RebuildTable( |
| 290 const scoped_refptr<URLEnumerator>& enumerator) { | 290 const scoped_refptr<URLEnumerator>& enumerator) { |
| 291 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client | 291 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client |
| 292 // can change in the lifetime of this WebView and may not yet be set here. | 292 // can change in the lifetime of this WebView and may not yet be set here. |
| 293 // Therefore this initialization path is not used. | 293 // Therefore this initialization path is not used. |
| 294 enumerator->OnComplete(true); | 294 enumerator->OnComplete(true); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace android_webview | 297 } // namespace android_webview |
| OLD | NEW |