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

Side by Side Diff: extensions/browser/url_request_util.cc

Issue 2831183003: Fix loading success.html at the end of chrome://chrome-signin flow (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/resources/gaia_auth/manifest.json ('k') | extensions/common/manifest_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "extensions/browser/url_request_util.h" 5 #include "extensions/browser/url_request_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "content/public/browser/resource_request_info.h" 9 #include "content/public/browser/resource_request_info.h"
10 #include "content/public/common/browser_side_navigation_policy.h" 10 #include "content/public/common/browser_side_navigation_policy.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 const Extension* extension, 149 const Extension* extension,
150 const Extension* owner_extension, 150 const Extension* owner_extension,
151 const std::string& partition_id, 151 const std::string& partition_id,
152 const std::string& resource_path, 152 const std::string& resource_path,
153 ui::PageTransition page_transition, 153 ui::PageTransition page_transition,
154 bool* allowed) { 154 bool* allowed) {
155 if (is_guest) { 155 if (is_guest) {
156 // An extension's resources should only be accessible to WebViews owned by 156 // An extension's resources should only be accessible to WebViews owned by
157 // that extension. 157 // that extension.
158 if (owner_extension != extension) { 158 if (owner_extension != extension) {
159 *allowed = false; 159 bool is_signin_extension =
160 return true; 160 extension && extension->id() == "mfffpogegjflfpflabcdkioaeobkgjik";
161 if (!is_signin_extension) {
162 LOG(ERROR) << "NOT Allowed ";
163 *allowed = false;
164 return true;
165 } else {
166 LOG(ERROR)
167 << "Sign-in extension is allowed to load cross renderrer resouces";
168 }
161 } 169 }
162 170
163 *allowed = WebviewInfo::IsResourceWebviewAccessible(extension, partition_id, 171 *allowed = WebviewInfo::IsResourceWebviewAccessible(extension, partition_id,
164 resource_path); 172 resource_path);
173 LOG(ERROR) << "Allowed? " << extension->id() << " to load " << resource_path
174 << ":" << *allowed;
165 return true; 175 return true;
166 } 176 }
167 177
168 return false; 178 return false;
169 } 179 }
170 180
171 } // namespace url_request_util 181 } // namespace url_request_util
172 } // namespace extensions 182 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth/manifest.json ('k') | extensions/common/manifest_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698