Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: android_webview/browser/aw_browser_context.cc

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Charlie's comments. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 visitedlink_master_->Init(); 70 visitedlink_master_->Init();
71 } 71 }
72 72
73 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) { 73 void AwBrowserContext::AddVisitedURLs(const std::vector<GURL>& urls) {
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,
81 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
82 file_system_protocol_handler,
83 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
84 developer_protocol_handler, 80 developer_protocol_handler,
85 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 81 ProtocolHandlerMap* protocol_handlers) {
86 chrome_protocol_handler,
87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
88 chrome_devtools_protocol_handler) {
89 CHECK(url_request_context_getter_); 82 CHECK(url_request_context_getter_);
90 url_request_context_getter_->SetProtocolHandlers( 83 url_request_context_getter_->SetProtocolHandlers(
91 blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(), 84 developer_protocol_handler.Pass(), protocol_handlers);
92 developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
93 chrome_devtools_protocol_handler.Pass());
94 return url_request_context_getter_.get(); 85 return url_request_context_getter_.get();
95 } 86 }
96 87
97 net::URLRequestContextGetter* 88 net::URLRequestContextGetter*
98 AwBrowserContext::CreateRequestContextForStoragePartition( 89 AwBrowserContext::CreateRequestContextForStoragePartition(
99 const base::FilePath& partition_path, 90 const base::FilePath& partition_path,
100 bool in_memory, 91 bool in_memory,
101 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 92 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
102 blob_protocol_handler,
103 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
104 file_system_protocol_handler,
105 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
106 developer_protocol_handler, 93 developer_protocol_handler,
107 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 94 content::ProtocolHandlerMap* protocol_handlers) {
108 chrome_protocol_handler,
109 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
110 chrome_devtools_protocol_handler) {
111 CHECK(url_request_context_getter_); 95 CHECK(url_request_context_getter_);
112 return url_request_context_getter_.get(); 96 return url_request_context_getter_.get();
113 } 97 }
114 98
115 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { 99 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() {
116 if (!quota_manager_bridge_) { 100 if (!quota_manager_bridge_) {
117 quota_manager_bridge_.reset( 101 quota_manager_bridge_.reset(
118 native_factory_->CreateAwQuotaManagerBridge(this)); 102 native_factory_->CreateAwQuotaManagerBridge(this));
119 } 103 }
120 return quota_manager_bridge_.get(); 104 return quota_manager_bridge_.get();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 177
194 void AwBrowserContext::RebuildTable( 178 void AwBrowserContext::RebuildTable(
195 const scoped_refptr<URLEnumerator>& enumerator) { 179 const scoped_refptr<URLEnumerator>& enumerator) {
196 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 180 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
197 // can change in the lifetime of this WebView and may not yet be set here. 181 // can change in the lifetime of this WebView and may not yet be set here.
198 // Therefore this initialization path is not used. 182 // Therefore this initialization path is not used.
199 enumerator->OnComplete(true); 183 enumerator->OnComplete(true);
200 } 184 }
201 185
202 } // namespace android_webview 186 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698