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

Side by Side Diff: apps/shell/browser/shell_content_browser_client.cc

Issue 273193004: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "apps/shell/browser/shell_content_browser_client.h" 5 #include "apps/shell/browser/shell_content_browser_client.h"
6 6
7 #include "apps/shell/browser/shell_browser_context.h" 7 #include "apps/shell/browser/shell_browser_context.h"
8 #include "apps/shell/browser/shell_browser_main_parts.h" 8 #include "apps/shell/browser/shell_browser_main_parts.h"
9 #include "apps/shell/browser/shell_extension_system.h" 9 #include "apps/shell/browser/shell_extension_system.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return browser_main_parts_->browser_context()->CreateRequestContext( 93 return browser_main_parts_->browser_context()->CreateRequestContext(
94 protocol_handlers, protocol_interceptors.Pass()); 94 protocol_handlers, protocol_interceptors.Pass());
95 } 95 }
96 96
97 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { 97 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
98 if (!url.is_valid()) 98 if (!url.is_valid())
99 return false; 99 return false;
100 // Keep in sync with ProtocolHandlers added in CreateRequestContext() and in 100 // Keep in sync with ProtocolHandlers added in CreateRequestContext() and in
101 // content::ShellURLRequestContextGetter::GetURLRequestContext(). 101 // content::ShellURLRequestContextGetter::GetURLRequestContext().
102 static const char* const kProtocolList[] = { 102 static const char* const kProtocolList[] = {
103 content::kBlobScheme, 103 url::kBlobScheme,
104 content::kChromeDevToolsScheme, 104 content::kChromeDevToolsScheme,
105 content::kChromeUIScheme, 105 content::kChromeUIScheme,
106 content::kDataScheme, 106 url::kDataScheme,
107 content::kFileScheme, 107 url::kFileScheme,
108 content::kFileSystemScheme, 108 url::kFileSystemScheme,
109 extensions::kExtensionScheme, 109 extensions::kExtensionScheme,
110 extensions::kExtensionResourceScheme, 110 extensions::kExtensionResourceScheme,
111 }; 111 };
112 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 112 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
113 if (url.scheme() == kProtocolList[i]) 113 if (url.scheme() == kProtocolList[i])
114 return true; 114 return true;
115 } 115 }
116 return false; 116 return false;
117 } 117 }
118 118
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 const extensions::Extension* ShellContentBrowserClient::GetExtension( 182 const extensions::Extension* ShellContentBrowserClient::GetExtension(
183 content::SiteInstance* site_instance) { 183 content::SiteInstance* site_instance) {
184 ExtensionRegistry* registry = 184 ExtensionRegistry* registry =
185 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 185 ExtensionRegistry::Get(site_instance->GetBrowserContext());
186 return registry->enabled_extensions().GetExtensionOrAppByURL( 186 return registry->enabled_extensions().GetExtensionOrAppByURL(
187 site_instance->GetSiteURL()); 187 site_instance->GetSiteURL());
188 } 188 }
189 189
190 } // namespace apps 190 } // namespace apps
OLDNEW
« no previous file with comments | « android_webview/renderer/aw_render_view_ext.cc ('k') | chrome/browser/autocomplete/autocomplete_input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698