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

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

Issue 12886023: Remove SandboxedPages and SandboxedCSP from Extension Class (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Yoyo's Created 7 years, 9 months 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
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/extensions/sandboxed_page_info.h"
9 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
10 #include "extensions/common/constants.h" 11 #include "extensions/common/constants.h"
11 12
12 using WebKit::WebSecurityOrigin; 13 using WebKit::WebSecurityOrigin;
13 using extensions::Extension; 14 using extensions::Extension;
14 15
15 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url) 16 ExtensionURLInfo::ExtensionURLInfo(WebSecurityOrigin origin, const GURL& url)
16 : origin_(origin), 17 : origin_(origin),
17 url_(url) { 18 url_(url) {
18 DCHECK(!origin_.isNull()); 19 DCHECK(!origin_.isNull());
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return true; 162 return true;
162 } 163 }
163 164
164 return false; 165 return false;
165 } 166 }
166 167
167 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const { 168 bool ExtensionSet::IsSandboxedPage(const ExtensionURLInfo& info) const {
168 if (info.url().SchemeIs(extensions::kExtensionScheme)) { 169 if (info.url().SchemeIs(extensions::kExtensionScheme)) {
169 const Extension* extension = GetByID(info.url().host()); 170 const Extension* extension = GetByID(info.url().host());
170 if (extension) { 171 if (extension) {
171 return extension->IsSandboxedPage(info.url().path()); 172 return extensions::SandboxedPageInfo::IsSandboxedPage(extension,
173 info.url().path());
172 } 174 }
173 } 175 }
174 return false; 176 return false;
175 } 177 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698