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

Side by Side Diff: chromecast/browser/cast_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/browser/cast_content_browser_client.h" 5 #include "chromecast/browser/cast_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 new network_hints::NetworkHintsMessageFilter( 219 new network_hints::NetworkHintsMessageFilter(
220 url_request_context_factory_->host_resolver())); 220 url_request_context_factory_->host_resolver()));
221 host->AddFilter(network_hints_message_filter.get()); 221 host->AddFilter(network_hints_message_filter.get());
222 } 222 }
223 223
224 bool CastContentBrowserClient::IsHandledURL(const GURL& url) { 224 bool CastContentBrowserClient::IsHandledURL(const GURL& url) {
225 if (!url.is_valid()) 225 if (!url.is_valid())
226 return false; 226 return false;
227 227
228 static const char* const kProtocolList[] = { 228 static const char* const kProtocolList[] = {
229 content::kChromeUIScheme, 229 content::kChromeUIScheme, content::kChromeDevToolsScheme,
230 content::kChromeDevToolsScheme, 230 kChromeResourceScheme, url::kBlobScheme,
231 kChromeResourceScheme, 231 url::kDataScheme, url::kFileSystemScheme,
232 url::kBlobScheme, 232 url::kHttpScheme, url::kHttpsScheme,
233 url::kDataScheme, 233 url::kWsScheme, url::kWssScheme,
234 url::kFileSystemScheme,
235 }; 234 };
236 235
237 const std::string& scheme = url.scheme(); 236 const std::string& scheme = url.scheme();
238 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 237 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
239 if (scheme == kProtocolList[i]) 238 if (scheme == kProtocolList[i])
240 return true; 239 return true;
241 } 240 }
242 241
243 if (scheme == url::kFileScheme) { 242 if (scheme == url::kFileScheme) {
244 return base::CommandLine::ForCurrentProcess()->HasSwitch( 243 return base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 process_type, dumps_path, false /* upload */); 548 process_type, dumps_path, false /* upload */);
550 // StartUploaderThread() even though upload is diferred. 549 // StartUploaderThread() even though upload is diferred.
551 // Breakpad-related memory is freed in the uploader thread. 550 // Breakpad-related memory is freed in the uploader thread.
552 crash_handler->StartUploaderThread(); 551 crash_handler->StartUploaderThread();
553 return crash_handler; 552 return crash_handler;
554 } 553 }
555 #endif // !defined(OS_ANDROID) 554 #endif // !defined(OS_ANDROID)
556 555
557 } // namespace shell 556 } // namespace shell
558 } // namespace chromecast 557 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_io_data.cc ('k') | components/omnibox/browser/autocomplete_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698