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

Unified Diff: content/browser/frame_host/navigation_controller_impl.cc

Issue 855883002: Allow universal access from file if flag is set and url is file scheme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit tests Created 5 years, 11 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
Index: content/browser/frame_host/navigation_controller_impl.cc
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index f4f184ba42b9889896b76abd0b6682735ed53464..78bed6e3b8d85687f04f092a6d5cbd8633ea373c 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -129,7 +129,9 @@ bool AreURLsInPageNavigation(const GURL& existing_url,
// for now.
existing_url == GURL(url::kAboutBlankURL) ||
existing_url.GetOrigin() == new_url.GetOrigin() ||
- !prefs.web_security_enabled;
+ !prefs.web_security_enabled ||
+ (prefs.allow_universal_access_from_file_urls &&
+ existing_url.SchemeIs(url::kFileScheme)) ;
Charlie Reis 2015/01/23 06:53:37 nit: No space before semicolon.
nhu 2015/01/23 13:41:12 Done.
if (!is_same_origin && renderer_says_in_page)
rfh->GetProcess()->ReceivedBadMessage();
return is_same_origin && renderer_says_in_page;

Powered by Google App Engine
This is Rietveld 408576698