| 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 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { | 1276 if (local_state()->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) { |
| 1277 // The worker pointer is reference counted. While it is running, the | 1277 // The worker pointer is reference counted. While it is running, the |
| 1278 // message loops of the FILE and UI thread will hold references to it | 1278 // message loops of the FILE and UI thread will hold references to it |
| 1279 // and it will be automatically freed once all its tasks have finished. | 1279 // and it will be automatically freed once all its tasks have finished. |
| 1280 scoped_refptr<shell_integration::DefaultBrowserWorker> set_browser_worker = | 1280 scoped_refptr<shell_integration::DefaultBrowserWorker> set_browser_worker = |
| 1281 new shell_integration::DefaultBrowserWorker( | 1281 new shell_integration::DefaultBrowserWorker( |
| 1282 shell_integration::DefaultWebClientWorkerCallback()); | 1282 shell_integration::DefaultWebClientWorkerCallback()); |
| 1283 // The user interaction must always be disabled when applying the default | 1283 // The user interaction must always be disabled when applying the default |
| 1284 // browser policy since it is done at each browser startup and the result | 1284 // browser policy since it is done at each browser startup and the result |
| 1285 // of the interaction cannot be forced. | 1285 // of the interaction cannot be forced. |
| 1286 set_browser_worker->set_interactive_permitted(false); | 1286 set_browser_worker->set_can_process_events_within_subtree_permitted(false); |
| 1287 set_browser_worker->StartSetAsDefault(); | 1287 set_browser_worker->StartSetAsDefault(); |
| 1288 } | 1288 } |
| 1289 } | 1289 } |
| 1290 | 1290 |
| 1291 void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() { | 1291 void BrowserProcessImpl::ApplyAllowCrossOriginAuthPromptPolicy() { |
| 1292 bool value = local_state()->GetBoolean(prefs::kAllowCrossOriginAuthPrompt); | 1292 bool value = local_state()->GetBoolean(prefs::kAllowCrossOriginAuthPrompt); |
| 1293 ResourceDispatcherHost::Get()->SetAllowCrossOriginAuthPrompt(value); | 1293 ResourceDispatcherHost::Get()->SetAllowCrossOriginAuthPrompt(value); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 void BrowserProcessImpl::ApplyMetricsReportingPolicy() { | 1296 void BrowserProcessImpl::ApplyMetricsReportingPolicy() { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 void BrowserProcessImpl::OnAutoupdateTimer() { | 1415 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1416 if (CanAutorestartForUpdate()) { | 1416 if (CanAutorestartForUpdate()) { |
| 1417 DLOG(WARNING) << "Detected update. Restarting browser."; | 1417 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1418 RestartBackgroundInstance(); | 1418 RestartBackgroundInstance(); |
| 1419 } | 1419 } |
| 1420 } | 1420 } |
| 1421 | 1421 |
| 1422 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1422 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |