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

Side by Side Diff: apps/shell/browser/shell_content_browser_client.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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 protocol_handlers); 69 protocol_handlers);
70 } 70 }
71 71
72 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { 72 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
73 if (!url.is_valid()) 73 if (!url.is_valid())
74 return false; 74 return false;
75 // Keep in sync with ProtocolHandlers added in CreateRequestContext() and in 75 // Keep in sync with ProtocolHandlers added in CreateRequestContext() and in
76 // content::ShellURLRequestContextGetter::GetURLRequestContext(). 76 // content::ShellURLRequestContextGetter::GetURLRequestContext().
77 static const char* const kProtocolList[] = { 77 static const char* const kProtocolList[] = {
78 chrome::kBlobScheme, 78 chrome::kBlobScheme,
79 chrome::kChromeDevToolsScheme, 79 content::kChromeDevToolsScheme,
80 content::kChromeUIScheme, 80 content::kChromeUIScheme,
81 content::kDataScheme, 81 content::kDataScheme,
82 content::kFileScheme, 82 content::kFileScheme,
83 content::kFileSystemScheme, 83 content::kFileSystemScheme,
84 extensions::kExtensionScheme, 84 extensions::kExtensionScheme,
85 extensions::kExtensionResourceScheme, 85 extensions::kExtensionResourceScheme,
86 }; 86 };
87 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { 87 for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
88 if (url.scheme() == kProtocolList[i]) 88 if (url.scheme() == kProtocolList[i])
89 return true; 89 return true;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 const extensions::Extension* ShellContentBrowserClient::GetExtension( 150 const extensions::Extension* ShellContentBrowserClient::GetExtension(
151 content::SiteInstance* site_instance) { 151 content::SiteInstance* site_instance) {
152 ExtensionRegistry* registry = 152 ExtensionRegistry* registry =
153 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 153 ExtensionRegistry::Get(site_instance->GetBrowserContext());
154 return registry->enabled_extensions().GetExtensionOrAppByURL( 154 return registry->enabled_extensions().GetExtensionOrAppByURL(
155 site_instance->GetSiteURL()); 155 site_instance->GetSiteURL());
156 } 156 }
157 157
158 } // namespace apps 158 } // namespace apps
OLDNEW
« no previous file with comments | « android_webview/browser/net/aw_url_request_context_getter.cc ('k') | chrome/browser/browsing_data/browsing_data_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698