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

Side by Side Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 149643010: Cleanup: Move kChromeUIScheme 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 "chrome/common/extensions/chrome_extensions_client.h" 5 #include "chrome/common/extensions/chrome_extensions_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/extensions/chrome_manifest_handlers.h" 8 #include "chrome/common/extensions/chrome_manifest_handlers.h"
9 #include "chrome/common/extensions/extension_constants.h" 9 #include "chrome/common/extensions/extension_constants.h"
10 #include "chrome/common/extensions/features/base_feature_provider.h" 10 #include "chrome/common/extensions/features/base_feature_provider.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return BaseFeatureProvider::GetByName(name); 78 return BaseFeatureProvider::GetByName(name);
79 } 79 }
80 80
81 void ChromeExtensionsClient::FilterHostPermissions( 81 void ChromeExtensionsClient::FilterHostPermissions(
82 const URLPatternSet& hosts, 82 const URLPatternSet& hosts,
83 URLPatternSet* new_hosts, 83 URLPatternSet* new_hosts,
84 std::set<PermissionMessage>* messages) const { 84 std::set<PermissionMessage>* messages) const {
85 for (URLPatternSet::const_iterator i = hosts.begin(); 85 for (URLPatternSet::const_iterator i = hosts.begin();
86 i != hosts.end(); ++i) { 86 i != hosts.end(); ++i) {
87 // Filters out every URL pattern that matches chrome:// scheme. 87 // Filters out every URL pattern that matches chrome:// scheme.
88 if (i->scheme() == chrome::kChromeUIScheme) { 88 if (i->scheme() == content::kChromeUIScheme) {
89 // chrome://favicon is the only URL for chrome:// scheme that we 89 // chrome://favicon is the only URL for chrome:// scheme that we
90 // want to support. We want to deprecate the "chrome" scheme. 90 // want to support. We want to deprecate the "chrome" scheme.
91 // We should not add any additional "host" here. 91 // We should not add any additional "host" here.
92 if (GURL(chrome::kChromeUIFaviconURL).host() != i->host()) 92 if (GURL(chrome::kChromeUIFaviconURL).host() != i->host())
93 continue; 93 continue;
94 messages->insert(PermissionMessage( 94 messages->insert(PermissionMessage(
95 PermissionMessage::kFavicon, 95 PermissionMessage::kFavicon,
96 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FAVICON))); 96 l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_FAVICON)));
97 } else { 97 } else {
98 new_hosts->AddPattern(*i); 98 new_hosts->AddPattern(*i);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 return true; 154 return true;
155 } 155 }
156 156
157 // static 157 // static
158 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { 158 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() {
159 return g_client.Pointer(); 159 return g_client.Pointer();
160 } 160 }
161 161
162 } // namespace extensions 162 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/theme_source.cc ('k') | chrome/common/extensions/manifest_handlers/content_scripts_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698