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

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

Issue 1868763002: Remove URLRequest::IsHandledProtocol and IsHandledURL (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (needs fixing) Created 4 years, 2 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
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_job_factory.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/aw_content_browser_client.h" 5 #include "android_webview/browser/aw_content_browser_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // We handle error cases. 226 // We handle error cases.
227 return true; 227 return true;
228 } 228 }
229 229
230 const std::string scheme = url.scheme(); 230 const std::string scheme = url.scheme();
231 DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); 231 DCHECK_EQ(scheme, base::ToLowerASCII(scheme));
232 // See CreateJobFactory in aw_url_request_context_getter.cc for the 232 // See CreateJobFactory in aw_url_request_context_getter.cc for the
233 // list of protocols that are handled. 233 // list of protocols that are handled.
234 // TODO(mnaganov): Make this automatic. 234 // TODO(mnaganov): Make this automatic.
235 static const char* const kProtocolList[] = { 235 static const char* const kProtocolList[] = {
236 url::kDataScheme, 236 url::kDataScheme,
237 url::kBlobScheme, 237 url::kBlobScheme,
238 url::kFileSystemScheme, 238 url::kFileSystemScheme,
239 content::kChromeUIScheme, 239 content::kChromeUIScheme,
240 content::kChromeDevToolsScheme, 240 content::kChromeDevToolsScheme,
241 url::kContentScheme, 241 url::kContentScheme,
242 url::kHttpScheme,
243 url::kHttpsScheme,
244 url::kWsScheme,
245 url::kWssScheme,
242 }; 246 };
243 if (scheme == url::kFileScheme) { 247 if (scheme == url::kFileScheme) {
244 // Return false for the "special" file URLs, so they can be loaded 248 // Return false for the "special" file URLs, so they can be loaded
245 // even if access to file: scheme is not granted to the child process. 249 // even if access to file: scheme is not granted to the child process.
246 return !IsAndroidSpecialFileUrl(url); 250 return !IsAndroidSpecialFileUrl(url);
247 } 251 }
248 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 252 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
249 if (scheme == kProtocolList[i]) 253 if (scheme == kProtocolList[i])
250 return true; 254 return true;
251 } 255 }
252 return net::URLRequest::IsHandledProtocol(scheme); 256 return false;
253 } 257 }
254 258
255 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName( 259 std::string AwContentBrowserClient::GetCanonicalEncodingNameByAliasName(
256 const std::string& alias_name) { 260 const std::string& alias_name) {
257 return alias_name; 261 return alias_name;
258 } 262 }
259 263
260 void AwContentBrowserClient::AppendExtraCommandLineSwitches( 264 void AwContentBrowserClient::AppendExtraCommandLineSwitches(
261 base::CommandLine* command_line, 265 base::CommandLine* command_line,
262 int child_process_id) { 266 int child_process_id) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 520 }
517 return throttles; 521 return throttles;
518 } 522 }
519 523
520 content::DevToolsManagerDelegate* 524 content::DevToolsManagerDelegate*
521 AwContentBrowserClient::GetDevToolsManagerDelegate() { 525 AwContentBrowserClient::GetDevToolsManagerDelegate() {
522 return new AwDevToolsManagerDelegate(); 526 return new AwDevToolsManagerDelegate();
523 } 527 }
524 528
525 } // namespace android_webview 529 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/net/aw_url_request_job_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698