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

Unified Diff: chrome_frame/navigation_constraints.cc

Issue 5814004: Fixing a regression introduced with r69101, which now prevents Chrome Frame... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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_frame/navigation_constraints.h ('k') | chrome_frame/test/util_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/navigation_constraints.cc
===================================================================
--- chrome_frame/navigation_constraints.cc (revision 69128)
+++ chrome_frame/navigation_constraints.cc (working copy)
@@ -9,6 +9,9 @@
#include "chrome/common/url_constants.h"
#include "chrome_frame/utils.h"
+NavigationConstraintsImpl::NavigationConstraintsImpl() : is_privileged_(false) {
+}
+
// NavigationConstraintsImpl method definitions.
bool NavigationConstraintsImpl::AllowUnsafeUrls() {
// No sanity checks if unsafe URLs are allowed
@@ -42,6 +45,13 @@
return true;
}
}
+
+ if (is_privileged_ &&
+ (url.SchemeIs(chrome::kDataScheme) ||
+ url.SchemeIs(chrome::kExtensionScheme))) {
+ return true;
+ }
+
return false;
}
@@ -67,3 +77,10 @@
return true;
}
+bool NavigationConstraintsImpl::is_privileged() const {
+ return is_privileged_;
+}
+
+void NavigationConstraintsImpl::set_is_privileged(bool is_privileged) {
+ is_privileged_ = is_privileged;
+}
« no previous file with comments | « chrome_frame/navigation_constraints.h ('k') | chrome_frame/test/util_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698