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

Unified Diff: extensions/browser/url_request_util.cc

Issue 2831183003: Fix loading success.html at the end of chrome://chrome-signin flow (Closed)
Patch Set: Add missing expect 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/url_request_util.cc
diff --git a/extensions/browser/url_request_util.cc b/extensions/browser/url_request_util.cc
index 20e32c61b77d19208bb7ce156c7bc4a895d2415c..5dd47c8e9e982034d3acf39c7ee783d7b104e214 100644
--- a/extensions/browser/url_request_util.cc
+++ b/extensions/browser/url_request_util.cc
@@ -153,6 +153,22 @@ bool AllowCrossRendererResourceLoadHelper(bool is_guest,
ui::PageTransition page_transition,
bool* allowed) {
if (is_guest) {
+ // Exceptionally, the resource at path "/success.html" that belongs to the
+ // sign-in extension (loaded by chrome://chrome-signin) is accessible to
+ // WebViews that are not owned by that extension.
+ // This exception is required as in order to mark the end of the the sign-in
+ // flow, Gaia redirects to the following continue URL:
+ // "chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/success.html".
+ //
+ // TODO(http://crbug.com/688565) Remove this check once the sign-in
+ // extension is deprecated and removed.
+ bool is_signin_extension =
+ extension && extension->id() == "mfffpogegjflfpflabcdkioaeobkgjik";
+ if (is_signin_extension && resource_path == "/success.html") {
+ *allowed = true;
+ return true;
+ }
+
// An extension's resources should only be accessible to WebViews owned by
// that extension.
if (owner_extension != extension) {
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698