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

Side by Side Diff: chrome/renderer/extensions/dispatcher.cc

Issue 23658056: content: Move kHttpScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/renderer/extensions/user_script_slave.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 "chrome/renderer/extensions/dispatcher.h" 5 #include "chrome/renderer/extensions/dispatcher.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 extension->GetActivePermissions()->explicit_hosts()); 1274 extension->GetActivePermissions()->explicit_hosts());
1275 } 1275 }
1276 1276
1277 void Dispatcher::AddOrRemoveOriginPermissions( 1277 void Dispatcher::AddOrRemoveOriginPermissions(
1278 UpdatedExtensionPermissionsInfo::Reason reason, 1278 UpdatedExtensionPermissionsInfo::Reason reason,
1279 const Extension* extension, 1279 const Extension* extension,
1280 const URLPatternSet& origins) { 1280 const URLPatternSet& origins) {
1281 for (URLPatternSet::const_iterator i = origins.begin(); 1281 for (URLPatternSet::const_iterator i = origins.begin();
1282 i != origins.end(); ++i) { 1282 i != origins.end(); ++i) {
1283 const char* schemes[] = { 1283 const char* schemes[] = {
1284 chrome::kHttpScheme, 1284 content::kHttpScheme,
1285 content::kHttpsScheme, 1285 content::kHttpsScheme,
1286 chrome::kFileScheme, 1286 chrome::kFileScheme,
1287 chrome::kChromeUIScheme, 1287 chrome::kChromeUIScheme,
1288 }; 1288 };
1289 for (size_t j = 0; j < arraysize(schemes); ++j) { 1289 for (size_t j = 0; j < arraysize(schemes); ++j) {
1290 if (i->MatchesScheme(schemes[j])) { 1290 if (i->MatchesScheme(schemes[j])) {
1291 ((reason == UpdatedExtensionPermissionsInfo::REMOVED) ? 1291 ((reason == UpdatedExtensionPermissionsInfo::REMOVED) ?
1292 WebSecurityPolicy::removeOriginAccessWhitelistEntry : 1292 WebSecurityPolicy::removeOriginAccessWhitelistEntry :
1293 WebSecurityPolicy::addOriginAccessWhitelistEntry)( 1293 WebSecurityPolicy::addOriginAccessWhitelistEntry)(
1294 extension->url(), 1294 extension->url(),
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1568 RenderView* background_view = 1568 RenderView* background_view =
1569 ExtensionHelper::GetBackgroundPage(extension_id); 1569 ExtensionHelper::GetBackgroundPage(extension_id);
1570 if (background_view) { 1570 if (background_view) {
1571 background_view->Send(new ExtensionHostMsg_EventAck( 1571 background_view->Send(new ExtensionHostMsg_EventAck(
1572 background_view->GetRoutingID())); 1572 background_view->GetRoutingID()));
1573 } 1573 }
1574 } 1574 }
1575 } 1575 }
1576 1576
1577 } // namespace extensions 1577 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/net/url_fixer_upper.cc ('k') | chrome/renderer/extensions/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698