Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/browser_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1189 content::BrowserThread::GetMessageLoopProxyForThread( | 1189 content::BrowserThread::GetMessageLoopProxyForThread( |
| 1190 content::BrowserThread::UI), | 1190 content::BrowserThread::UI), |
| 1191 content::BrowserThread::GetMessageLoopProxyForThread( | 1191 content::BrowserThread::GetMessageLoopProxyForThread( |
| 1192 content::BrowserThread::IO), | 1192 content::BrowserThread::IO), |
| 1193 blocking_task_runner); | 1193 blocking_task_runner); |
| 1194 #endif // defined(OS_ANDROID) | 1194 #endif // defined(OS_ANDROID) |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { | 1197 void BrowserProcessImpl::ApplyDefaultBrowserPolicy() { |
| 1198 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { | 1198 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { |
| 1199 scoped_refptr<ShellIntegration::DefaultWebClientWorker> | 1199 bool delete_observer = |
|
Patrick Monette
2016/02/10 17:26:42
Woops this isn't compiling. Fixed with the rebase.
| |
| 1200 set_browser_worker = new ShellIntegration::DefaultBrowserWorker(NULL); | 1200 false scoped_refptr<ShellIntegration::DefaultWebClientWorker> |
| 1201 set_browser_worker = new ShellIntegration::DefaultBrowserWorker( | |
| 1202 nullptr, | |
| 1203 /*delete_observer=*/false); | |
| 1204 // The user interaction must always be disabled when applying the default | |
| 1205 // browser policy since it is done at each browser startup and the result | |
| 1206 // of the interaction cannot be forced. | |
| 1207 set_browser_worker->set_interactive_permitted(false); | |
| 1201 set_browser_worker->StartSetAsDefault(); | 1208 set_browser_worker->StartSetAsDefault(); |
| 1202 } | 1209 } |
| 1203 } | 1210 } |
| 1204 | 1211 |
| 1205 void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() { | 1212 void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() { |
| 1206 bool value = local_state()->GetBoolean(prefs::kAllowCrossOriginAuthPrompt); | 1213 bool value = local_state()->GetBoolean(prefs::kAllowCrossOriginAuthPrompt); |
| 1207 ResourceDispatcherHost::Get()->SetAllowCrossOriginAuthPrompt(value); | 1214 ResourceDispatcherHost::Get()->SetAllowCrossOriginAuthPrompt(value); |
| 1208 } | 1215 } |
| 1209 | 1216 |
| 1210 void BrowserProcessImpl::ApplyMetricsReportingPolicy() { | 1217 void BrowserProcessImpl::ApplyMetricsReportingPolicy() { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1282 } | 1289 } |
| 1283 | 1290 |
| 1284 void BrowserProcessImpl::OnAutoupdateTimer() { | 1291 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1285 if (CanAutorestartForUpdate()) { | 1292 if (CanAutorestartForUpdate()) { |
| 1286 DLOG(WARNING) << "Detected update. Restarting browser."; | 1293 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1287 RestartBackgroundInstance(); | 1294 RestartBackgroundInstance(); |
| 1288 } | 1295 } |
| 1289 } | 1296 } |
| 1290 | 1297 |
| 1291 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1298 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |