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); |