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

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

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 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
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/common/extensions/extension_set.h" 5 #include "chrome/common/extensions/extension_set.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/common/extensions/extension.h"
8 #include "chrome/common/url_constants.h" 9 #include "chrome/common/url_constants.h"
9 10
10 using WebKit::WebSecurityOrigin; 11 using WebKit::WebSecurityOrigin;
12 using extensions::Extension;
11 13
12 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) 14 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url)
13 : origin_(origin), 15 : origin_(origin),
14 url_(url) { 16 url_(url) {
15 DCHECK(!origin_.isNull()); 17 DCHECK(!origin_.isNull());
16 } 18 }
17 19
18 ExtensionURLInfo::ExtensionURLInfo(const GURL& url) 20 ExtensionURLInfo::ExtensionURLInfo(const GURL& url)
19 : url_(url) { 21 : url_(url) {
20 } 22 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 136
135 ExtensionMap::const_iterator i = extensions_.begin(); 137 ExtensionMap::const_iterator i = extensions_.begin();
136 for (; i != extensions_.end(); ++i) { 138 for (; i != extensions_.end(); ++i) {
137 if (i->second->location() == Extension::COMPONENT && 139 if (i->second->location() == Extension::COMPONENT &&
138 i->second->web_extent().MatchesURL(info.url())) 140 i->second->web_extent().MatchesURL(info.url()))
139 return true; 141 return true;
140 } 142 }
141 143
142 return false; 144 return false;
143 } 145 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_set.h ('k') | chrome/common/extensions/extension_set_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698