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/extensions/extension.h" |
9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
10 #include "extensions/common/constants.h" | 10 #include "extensions/common/constants.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 for (ExtensionMap::const_iterator iter = extensions_.begin(); | 106 for (ExtensionMap::const_iterator iter = extensions_.begin(); |
107 iter != extensions_.end(); ++iter) { | 107 iter != extensions_.end(); ++iter) { |
108 if (iter->second->web_extent().MatchesURL(info.url())) | 108 if (iter->second->web_extent().MatchesURL(info.url())) |
109 return iter->second.get(); | 109 return iter->second.get(); |
110 } | 110 } |
111 | 111 |
112 return NULL; | 112 return NULL; |
113 } | 113 } |
114 | 114 |
115 const Extension* ExtensionSet::GetHostedAppByOverlappingWebExtent( | 115 const Extension* ExtensionSet::GetHostedAppByOverlappingWebExtent( |
116 const URLPatternSet& extent) const { | 116 const extensions::URLPatternSet& extent) const { |
117 for (ExtensionMap::const_iterator iter = extensions_.begin(); | 117 for (ExtensionMap::const_iterator iter = extensions_.begin(); |
118 iter != extensions_.end(); ++iter) { | 118 iter != extensions_.end(); ++iter) { |
119 if (iter->second->web_extent().OverlapsWith(extent)) | 119 if (iter->second->web_extent().OverlapsWith(extent)) |
120 return iter->second.get(); | 120 return iter->second.get(); |
121 } | 121 } |
122 | 122 |
123 return NULL; | 123 return NULL; |
124 } | 124 } |
125 | 125 |
126 bool ExtensionSet::InSameExtent(const GURL& old_url, | 126 bool ExtensionSet::InSameExtent(const GURL& old_url, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 return true; | 160 return true; |
161 | 161 |
162 if (info.url().SchemeIs(extensions::kExtensionScheme)) { | 162 if (info.url().SchemeIs(extensions::kExtensionScheme)) { |
163 const Extension* extension = GetByID(info.url().host()); | 163 const Extension* extension = GetByID(info.url().host()); |
164 if (extension) { | 164 if (extension) { |
165 return extension->IsSandboxedPage(info.url().path()); | 165 return extension->IsSandboxedPage(info.url().path()); |
166 } | 166 } |
167 } | 167 } |
168 return false; | 168 return false; |
169 } | 169 } |
OLD | NEW |