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

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: Yet another rebase 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 new components::VisitedLinkMaster(this, this, false)); 69 new components::VisitedLinkMaster(this, this, false));
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 content::ProtocolHandlerMap* protocol_handlers) {
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,
85 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
86 chrome_protocol_handler,
87 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
88 chrome_devtools_protocol_handler) {
89 CHECK(url_request_context_getter_); 80 CHECK(url_request_context_getter_);
90 url_request_context_getter_->SetProtocolHandlers( 81 url_request_context_getter_->SetProtocolHandlers(protocol_handlers);
91 blob_protocol_handler.Pass(), file_system_protocol_handler.Pass(),
92 developer_protocol_handler.Pass(), chrome_protocol_handler.Pass(),
93 chrome_devtools_protocol_handler.Pass());
94 return url_request_context_getter_.get(); 82 return url_request_context_getter_.get();
95 } 83 }
96 84
97 net::URLRequestContextGetter* 85 net::URLRequestContextGetter*
98 AwBrowserContext::CreateRequestContextForStoragePartition( 86 AwBrowserContext::CreateRequestContextForStoragePartition(
99 const base::FilePath& partition_path, 87 const base::FilePath& partition_path,
100 bool in_memory, 88 bool in_memory,
101 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler> 89 content::ProtocolHandlerMap* protocol_handlers) {
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,
107 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
108 chrome_protocol_handler,
109 scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
110 chrome_devtools_protocol_handler) {
111 CHECK(url_request_context_getter_); 90 CHECK(url_request_context_getter_);
112 return url_request_context_getter_.get(); 91 return url_request_context_getter_.get();
113 } 92 }
114 93
115 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() { 94 AwQuotaManagerBridge* AwBrowserContext::GetQuotaManagerBridge() {
116 if (!quota_manager_bridge_) { 95 if (!quota_manager_bridge_) {
117 quota_manager_bridge_.reset( 96 quota_manager_bridge_.reset(
118 native_factory_->CreateAwQuotaManagerBridge(this)); 97 native_factory_->CreateAwQuotaManagerBridge(this));
119 } 98 }
120 return quota_manager_bridge_.get(); 99 return quota_manager_bridge_.get();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 172
194 void AwBrowserContext::RebuildTable( 173 void AwBrowserContext::RebuildTable(
195 const scoped_refptr<URLEnumerator>& enumerator) { 174 const scoped_refptr<URLEnumerator>& enumerator) {
196 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client 175 // Android WebView rebuilds from WebChromeClient.getVisitedHistory. The client
197 // can change in the lifetime of this WebView and may not yet be set here. 176 // can change in the lifetime of this WebView and may not yet be set here.
198 // Therefore this initialization path is not used. 177 // Therefore this initialization path is not used.
199 enumerator->OnComplete(true); 178 enumerator->OnComplete(true);
200 } 179 }
201 180
202 } // namespace android_webview 181 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_browser_context.h ('k') | android_webview/browser/aw_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698