OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/extension_renderer_info.h" | 5 #include "chrome/renderer/extensions/extension_renderer_info.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/common/url_constants.h" | 8 #include "chrome/common/url_constants.h" |
9 | 9 |
10 ExtensionRendererInfo::ExtensionRendererInfo() { | 10 ExtensionRendererInfo::ExtensionRendererInfo() { |
11 } | 11 } |
12 | 12 |
| 13 ExtensionRendererInfo::~ExtensionRendererInfo() { |
| 14 } |
| 15 |
13 size_t ExtensionRendererInfo::size() const { | 16 size_t ExtensionRendererInfo::size() const { |
14 return extensions_.size(); | 17 return extensions_.size(); |
15 } | 18 } |
16 | 19 |
17 void ExtensionRendererInfo::Update( | 20 void ExtensionRendererInfo::Update( |
18 const scoped_refptr<const Extension>& extension) { | 21 const scoped_refptr<const Extension>& extension) { |
19 extensions_[extension->id()] = extension; | 22 extensions_[extension->id()] = extension; |
20 } | 23 } |
21 | 24 |
22 void ExtensionRendererInfo::Remove(const std::string& id) { | 25 void ExtensionRendererInfo::Remove(const std::string& id) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 71 |
69 ExtensionMap::const_iterator i = extensions_.begin(); | 72 ExtensionMap::const_iterator i = extensions_.begin(); |
70 for (; i != extensions_.end(); ++i) { | 73 for (; i != extensions_.end(); ++i) { |
71 if (i->second->location() == Extension::COMPONENT && | 74 if (i->second->location() == Extension::COMPONENT && |
72 i->second->web_extent().ContainsURL(url)) | 75 i->second->web_extent().ContainsURL(url)) |
73 return true; | 76 return true; |
74 } | 77 } |
75 | 78 |
76 return false; | 79 return false; |
77 } | 80 } |
OLD | NEW |