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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 #elif defined(OS_MACOSX) | 110 #elif defined(OS_MACOSX) |
111 #include "chrome/browser/chrome_browser_main_mac.h" | 111 #include "chrome/browser/chrome_browser_main_mac.h" |
112 #endif | 112 #endif |
113 | 113 |
114 #if defined(USE_AURA) | 114 #if defined(USE_AURA) |
115 #include "ui/aura/env.h" | 115 #include "ui/aura/env.h" |
116 #endif | 116 #endif |
117 | 117 |
118 #if defined(OS_CHROMEOS) | 118 #if defined(OS_CHROMEOS) |
119 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" | 119 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
| 120 #include "chrome/browser/policy/policy_change_watcher.h" |
120 #endif // defined(OS_CHROMEOS) | 121 #endif // defined(OS_CHROMEOS) |
121 | 122 |
122 #if defined(ENABLE_PLUGIN_INSTALLATION) | 123 #if defined(ENABLE_PLUGIN_INSTALLATION) |
123 #include "chrome/browser/plugins/plugins_resource_service.h" | 124 #include "chrome/browser/plugins/plugins_resource_service.h" |
124 #endif | 125 #endif |
125 | 126 |
126 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 127 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
127 // How often to check if the persistent instance of Chrome needs to restart | 128 // How often to check if the persistent instance of Chrome needs to restart |
128 // to install an update. | 129 // to install an update. |
129 static const int kUpdateCheckIntervalHours = 6; | 130 static const int kUpdateCheckIntervalHours = 6; |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 #endif | 616 #endif |
616 } | 617 } |
617 | 618 |
618 chrome::MediaFileSystemRegistry* | 619 chrome::MediaFileSystemRegistry* |
619 BrowserProcessImpl::media_file_system_registry() { | 620 BrowserProcessImpl::media_file_system_registry() { |
620 if (!media_file_system_registry_) | 621 if (!media_file_system_registry_) |
621 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); | 622 media_file_system_registry_.reset(new chrome::MediaFileSystemRegistry()); |
622 return media_file_system_registry_.get(); | 623 return media_file_system_registry_.get(); |
623 } | 624 } |
624 | 625 |
| 626 #if defined(OS_CHROMEOS) |
| 627 policy::DevicePolicyChangeWatcher* |
| 628 BrowserProcessImpl::device_policy_change_watcher() { |
| 629 if (!device_policy_change_watcher_) |
| 630 device_policy_change_watcher_.reset(new policy::DevicePolicyChangeWatcher); |
| 631 return device_policy_change_watcher_.get(); |
| 632 } |
| 633 #endif |
| 634 |
625 #if !defined(OS_WIN) | 635 #if !defined(OS_WIN) |
626 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( | 636 void BrowserProcessImpl::PlatformSpecificCommandLineProcessing( |
627 const CommandLine& command_line) { | 637 const CommandLine& command_line) { |
628 } | 638 } |
629 #endif | 639 #endif |
630 | 640 |
631 // static | 641 // static |
632 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 642 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
633 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 643 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
634 false); | 644 false); |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 } | 1042 } |
1033 | 1043 |
1034 void BrowserProcessImpl::OnAutoupdateTimer() { | 1044 void BrowserProcessImpl::OnAutoupdateTimer() { |
1035 if (CanAutorestartForUpdate()) { | 1045 if (CanAutorestartForUpdate()) { |
1036 DLOG(WARNING) << "Detected update. Restarting browser."; | 1046 DLOG(WARNING) << "Detected update. Restarting browser."; |
1037 RestartBackgroundInstance(); | 1047 RestartBackgroundInstance(); |
1038 } | 1048 } |
1039 } | 1049 } |
1040 | 1050 |
1041 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1051 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |