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

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

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolve a merge conflict. Created 6 years, 7 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
« no previous file with comments | « extensions/common/url_pattern.cc ('k') | url/BUILD.gn » ('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 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 "extensions/renderer/dispatcher.h" 5 #include "extensions/renderer/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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 PermissionsData::GetEffectiveHostPermissions(extension)); 787 PermissionsData::GetEffectiveHostPermissions(extension));
788 } 788 }
789 789
790 void Dispatcher::UpdateOriginPermissions( 790 void Dispatcher::UpdateOriginPermissions(
791 UpdatedExtensionPermissionsInfo::Reason reason, 791 UpdatedExtensionPermissionsInfo::Reason reason,
792 const Extension* extension, 792 const Extension* extension,
793 const URLPatternSet& origins) { 793 const URLPatternSet& origins) {
794 for (URLPatternSet::const_iterator i = origins.begin(); i != origins.end(); 794 for (URLPatternSet::const_iterator i = origins.begin(); i != origins.end();
795 ++i) { 795 ++i) {
796 const char* schemes[] = { 796 const char* schemes[] = {
797 content::kHttpScheme, content::kHttpsScheme, content::kFileScheme, 797 url::kHttpScheme,
798 content::kChromeUIScheme, content::kFtpScheme, 798 url::kHttpsScheme,
799 content::kFileScheme,
800 content::kChromeUIScheme,
801 content::kFtpScheme,
799 }; 802 };
800 for (size_t j = 0; j < arraysize(schemes); ++j) { 803 for (size_t j = 0; j < arraysize(schemes); ++j) {
801 if (i->MatchesScheme(schemes[j])) { 804 if (i->MatchesScheme(schemes[j])) {
802 ((reason == UpdatedExtensionPermissionsInfo::REMOVED) 805 ((reason == UpdatedExtensionPermissionsInfo::REMOVED)
803 ? WebSecurityPolicy::removeOriginAccessWhitelistEntry 806 ? WebSecurityPolicy::removeOriginAccessWhitelistEntry
804 : WebSecurityPolicy::addOriginAccessWhitelistEntry)( 807 : WebSecurityPolicy::addOriginAccessWhitelistEntry)(
805 extension->url(), 808 extension->url(),
806 WebString::fromUTF8(schemes[j]), 809 WebString::fromUTF8(schemes[j]),
807 WebString::fromUTF8(i->host()), 810 WebString::fromUTF8(i->host()),
808 i->match_subdomains()); 811 i->match_subdomains());
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1207 return v8::Handle<v8::Object>(); 1210 return v8::Handle<v8::Object>();
1208 1211
1209 if (bind_name) 1212 if (bind_name)
1210 *bind_name = split.back(); 1213 *bind_name = split.back();
1211 1214
1212 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1215 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1213 : bind_object; 1216 : bind_object;
1214 } 1217 }
1215 1218
1216 } // namespace extensions 1219 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/url_pattern.cc ('k') | url/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698