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

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

Issue 11312228: Move extension_error_utils.* and url_pattern_set.* into (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hate Created 8 years, 1 month 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 | Annotate | Revision Log
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/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
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
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 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_set.h ('k') | chrome/common/extensions/extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698