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

Side by Side Diff: android_webview/browser/net/aw_url_request_context_getter.cc

Issue 168953002: Cleanup: Move kChromeDevToolsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | apps/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/net/aw_url_request_context_getter.h" 5 #include "android_webview/browser/net/aw_url_request_context_getter.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "android_webview/browser/aw_content_browser_client.h" 9 #include "android_webview/browser/aw_content_browser_client.h"
10 #include "android_webview/browser/aw_request_interceptor.h" 10 #include "android_webview/browser/aw_request_interceptor.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DCHECK(set_protocol); 106 DCHECK(set_protocol);
107 set_protocol = aw_job_factory->SetProtocolHandler( 107 set_protocol = aw_job_factory->SetProtocolHandler(
108 content::kFileSystemScheme, 108 content::kFileSystemScheme,
109 (*protocol_handlers)[content::kFileSystemScheme].release()); 109 (*protocol_handlers)[content::kFileSystemScheme].release());
110 DCHECK(set_protocol); 110 DCHECK(set_protocol);
111 set_protocol = aw_job_factory->SetProtocolHandler( 111 set_protocol = aw_job_factory->SetProtocolHandler(
112 content::kChromeUIScheme, 112 content::kChromeUIScheme,
113 (*protocol_handlers)[content::kChromeUIScheme].release()); 113 (*protocol_handlers)[content::kChromeUIScheme].release());
114 DCHECK(set_protocol); 114 DCHECK(set_protocol);
115 set_protocol = aw_job_factory->SetProtocolHandler( 115 set_protocol = aw_job_factory->SetProtocolHandler(
116 chrome::kChromeDevToolsScheme, 116 content::kChromeDevToolsScheme,
117 (*protocol_handlers)[chrome::kChromeDevToolsScheme].release()); 117 (*protocol_handlers)[content::kChromeDevToolsScheme].release());
118 DCHECK(set_protocol); 118 DCHECK(set_protocol);
119 protocol_handlers->clear(); 119 protocol_handlers->clear();
120 120
121 // Create a chain of URLRequestJobFactories. The handlers will be invoked 121 // Create a chain of URLRequestJobFactories. The handlers will be invoked
122 // in the order in which they appear in the protocol_handlers vector. 122 // in the order in which they appear in the protocol_handlers vector.
123 typedef std::vector<net::URLRequestJobFactory::ProtocolHandler*> 123 typedef std::vector<net::URLRequestJobFactory::ProtocolHandler*>
124 ProtocolHandlerVector; 124 ProtocolHandlerVector;
125 ProtocolHandlerVector protocol_interceptors; 125 ProtocolHandlerVector protocol_interceptors;
126 126
127 // Note that even though the content:// scheme handler is created here, 127 // Note that even though the content:// scheme handler is created here,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 AwURLRequestContextGetter::GetNetworkTaskRunner() const { 230 AwURLRequestContextGetter::GetNetworkTaskRunner() const {
231 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO); 231 return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO);
232 } 232 }
233 233
234 void AwURLRequestContextGetter::SetProtocolHandlers( 234 void AwURLRequestContextGetter::SetProtocolHandlers(
235 content::ProtocolHandlerMap* protocol_handlers) { 235 content::ProtocolHandlerMap* protocol_handlers) {
236 std::swap(protocol_handlers_, *protocol_handlers); 236 std::swap(protocol_handlers_, *protocol_handlers);
237 } 237 }
238 238
239 } // namespace android_webview 239 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | apps/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698