| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_platform_part_chromeos.h" | 5 #include "chrome/browser/browser_process_platform_part_chromeos.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
| 10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
| 11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
| 12 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" | 12 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" |
| 13 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" | 13 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" |
| 14 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" | |
| 15 #include "chrome/browser/chromeos/net/delay_network_call.h" | 14 #include "chrome/browser/chromeos/net/delay_network_call.h" |
| 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 15 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 17 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 18 #include "chrome/browser/chromeos/settings/cros_settings.h" | 17 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 19 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" | 18 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 20 #include "chrome/browser/chromeos/system/device_disabling_manager.h" | 19 #include "chrome/browser/chromeos/system/device_disabling_manager.h" |
| 21 #include "chrome/browser/chromeos/system/device_disabling_manager_default_delega
te.h" | 20 #include "chrome/browser/chromeos/system/device_disabling_manager_default_delega
te.h" |
| 22 #include "chrome/browser/chromeos/system/timezone_util.h" | 21 #include "chrome/browser/chromeos/system/timezone_util.h" |
| 22 #include "chrome/browser/memory/oom_priority_manager.h" |
| 23 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
| 24 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 25 #include "chromeos/geolocation/simple_geolocation_provider.h" | 25 #include "chromeos/geolocation/simple_geolocation_provider.h" |
| 26 #include "chromeos/timezone/timezone_resolver.h" | 26 #include "chromeos/timezone/timezone_resolver.h" |
| 27 #include "components/session_manager/core/session_manager.h" | 27 #include "components/session_manager/core/session_manager.h" |
| 28 #include "components/user_manager/user_manager.h" | 28 #include "components/user_manager/user_manager.h" |
| 29 | 29 |
| 30 BrowserProcessPlatformPart::BrowserProcessPlatformPart() | 30 BrowserProcessPlatformPart::BrowserProcessPlatformPart() |
| 31 : created_profile_helper_(false) { | 31 : created_profile_helper_(false) { |
| 32 } | 32 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 void BrowserProcessPlatformPart::ShutdownSessionManager() { | 86 void BrowserProcessPlatformPart::ShutdownSessionManager() { |
| 87 session_manager_.reset(); | 87 session_manager_.reset(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 session_manager::SessionManager* BrowserProcessPlatformPart::SessionManager() { | 90 session_manager::SessionManager* BrowserProcessPlatformPart::SessionManager() { |
| 91 DCHECK(CalledOnValidThread()); | 91 DCHECK(CalledOnValidThread()); |
| 92 return session_manager_.get(); | 92 return session_manager_.get(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 chromeos::OomPriorityManager* | 95 memory::OomPriorityManager* BrowserProcessPlatformPart::oom_priority_manager() { |
| 96 BrowserProcessPlatformPart::oom_priority_manager() { | |
| 97 DCHECK(CalledOnValidThread()); | 96 DCHECK(CalledOnValidThread()); |
| 98 if (!oom_priority_manager_.get()) | 97 if (!oom_priority_manager_.get()) |
| 99 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); | 98 oom_priority_manager_.reset(new memory::OomPriorityManager()); |
| 100 return oom_priority_manager_.get(); | 99 return oom_priority_manager_.get(); |
| 101 } | 100 } |
| 102 | 101 |
| 103 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { | 102 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { |
| 104 DCHECK(CalledOnValidThread()); | 103 DCHECK(CalledOnValidThread()); |
| 105 if (!created_profile_helper_) | 104 if (!created_profile_helper_) |
| 106 CreateProfileHelper(); | 105 CreateProfileHelper(); |
| 107 return profile_helper_.get(); | 106 return profile_helper_.get(); |
| 108 } | 107 } |
| 109 | 108 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { | 145 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { |
| 147 return scoped_ptr<policy::BrowserPolicyConnector>( | 146 return scoped_ptr<policy::BrowserPolicyConnector>( |
| 148 new policy::BrowserPolicyConnectorChromeOS()); | 147 new policy::BrowserPolicyConnectorChromeOS()); |
| 149 } | 148 } |
| 150 | 149 |
| 151 void BrowserProcessPlatformPart::CreateProfileHelper() { | 150 void BrowserProcessPlatformPart::CreateProfileHelper() { |
| 152 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); | 151 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); |
| 153 created_profile_helper_ = true; | 152 created_profile_helper_ = true; |
| 154 profile_helper_.reset(new chromeos::ProfileHelper()); | 153 profile_helper_.reset(new chromeos::ProfileHelper()); |
| 155 } | 154 } |
| OLD | NEW |