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/callback.h" | 7 #include "base/callback.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "chrome/common/url_constants.h" | 10 #include "chrome/common/url_constants.h" |
11 #include "extensions/common/constants.h" | 11 #include "extensions/common/constants.h" |
12 #include "extensions/common/extension.h" | 12 #include "extensions/common/extension.h" |
13 #include "extensions/common/manifest_handlers/sandboxed_page_info.h" | 13 #include "extensions/common/manifest_handlers/sandboxed_page_info.h" |
14 | 14 |
15 using extensions::Extension; | 15 using extensions::Extension; |
16 | 16 |
17 ExtensionSet::const_iterator::const_iterator() {} | 17 ExtensionSet::const_iterator::const_iterator() {} |
18 | 18 |
19 ExtensionSet::const_iterator::const_iterator(const const_iterator& other) | 19 ExtensionSet::const_iterator::const_iterator(const const_iterator& other) |
20 : it_(other.it_) { | 20 : it_(other.it_) { |
21 } | 21 } |
22 | 22 |
23 ExtensionSet::const_iterator::const_iterator(ExtensionMap::const_iterator it) | 23 ExtensionSet::const_iterator::const_iterator(ExtensionMap::const_iterator it) |
24 : it_(it) { | 24 : it_(it) { |
25 } | 25 } |
26 | 26 |
| 27 ExtensionSet::const_iterator::~const_iterator() {} |
| 28 |
27 ExtensionSet::ExtensionSet() { | 29 ExtensionSet::ExtensionSet() { |
28 } | 30 } |
29 | 31 |
30 ExtensionSet::~ExtensionSet() { | 32 ExtensionSet::~ExtensionSet() { |
31 } | 33 } |
32 | 34 |
33 size_t ExtensionSet::size() const { | 35 size_t ExtensionSet::size() const { |
34 return extensions_.size(); | 36 return extensions_.size(); |
35 } | 37 } |
36 | 38 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 | 140 |
139 ExtensionMap::const_iterator i = extensions_.begin(); | 141 ExtensionMap::const_iterator i = extensions_.begin(); |
140 for (; i != extensions_.end(); ++i) { | 142 for (; i != extensions_.end(); ++i) { |
141 if (i->second->location() == extensions::Manifest::COMPONENT && | 143 if (i->second->location() == extensions::Manifest::COMPONENT && |
142 i->second->web_extent().MatchesURL(url)) | 144 i->second->web_extent().MatchesURL(url)) |
143 return true; | 145 return true; |
144 } | 146 } |
145 | 147 |
146 return false; | 148 return false; |
147 } | 149 } |
OLD | NEW |