OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |