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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 6992081: Make --allow-cross-domain-auth-prompt equivalent to a preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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/browser_process_impl.h ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_process_impl.cc
===================================================================
--- chrome/browser/browser_process_impl.cc (revision 86721)
+++ chrome/browser/browser_process_impl.cc (working copy)
@@ -672,6 +672,8 @@
ShellIntegration::SetAsDefaultBrowser();
} else if (*pref == prefs::kDisabledSchemes) {
ApplyDisabledSchemesPolicy();
+ } else if (*pref == prefs::kAllowCrossOriginAuthPrompt) {
+ ApplyAllowCrossOriginAuthPromptPolicy();
}
} else {
NOTREACHED();
@@ -744,6 +746,9 @@
new ChromeResourceDispatcherHostObserver(prerender_tracker()));
resource_dispatcher_host_->set_observer(
resource_dispatcher_host_observer_.get());
+
+ pref_change_registrar_.Add(prefs::kAllowCrossOriginAuthPrompt, this);
+ ApplyAllowCrossOriginAuthPromptPolicy();
}
void BrowserProcessImpl::CreateMetricsService() {
@@ -1051,6 +1056,11 @@
ChildProcessSecurityPolicy::GetInstance()->RegisterDisabledSchemes(schemes);
}
+void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() {
+ bool value = local_state()->GetBoolean(prefs::kAllowCrossOriginAuthPrompt);
+ resource_dispatcher_host()->set_allow_cross_origin_auth_prompt(value);
+}
+
// The BrowserProcess object must outlive the file thread so we use traits
// which don't do any management.
DISABLE_RUNNABLE_METHOD_REFCOUNT(BrowserProcessImpl);
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698