| 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" | 14 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
| 15 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 15 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 16 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 17 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 17 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" | 18 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" |
| 18 #include "chrome/browser/chromeos/system/device_disabling_manager.h" | 19 #include "chrome/browser/chromeos/system/device_disabling_manager.h" |
| 19 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
| 20 #include "components/session_manager/core/session_manager.h" | 21 #include "components/session_manager/core/session_manager.h" |
| 22 #include "components/user_manager/user_manager.h" |
| 21 | 23 |
| 22 BrowserProcessPlatformPart::BrowserProcessPlatformPart() | 24 BrowserProcessPlatformPart::BrowserProcessPlatformPart() |
| 23 : created_profile_helper_(false) { | 25 : created_profile_helper_(false) { |
| 24 } | 26 } |
| 25 | 27 |
| 26 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { | 28 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { |
| 27 } | 29 } |
| 28 | 30 |
| 29 void BrowserProcessPlatformPart::InitializeAutomaticRebootManager() { | 31 void BrowserProcessPlatformPart::InitializeAutomaticRebootManager() { |
| 30 DCHECK(!automatic_reboot_manager_); | 32 DCHECK(!automatic_reboot_manager_); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 46 | 48 |
| 47 void BrowserProcessPlatformPart::DestroyChromeUserManager() { | 49 void BrowserProcessPlatformPart::DestroyChromeUserManager() { |
| 48 chrome_user_manager_->Destroy(); | 50 chrome_user_manager_->Destroy(); |
| 49 chrome_user_manager_.reset(); | 51 chrome_user_manager_.reset(); |
| 50 } | 52 } |
| 51 | 53 |
| 52 void BrowserProcessPlatformPart::InitializeDeviceDisablingManager() { | 54 void BrowserProcessPlatformPart::InitializeDeviceDisablingManager() { |
| 53 DCHECK(!device_disabling_manager_); | 55 DCHECK(!device_disabling_manager_); |
| 54 | 56 |
| 55 device_disabling_manager_.reset(new chromeos::system::DeviceDisablingManager( | 57 device_disabling_manager_.reset(new chromeos::system::DeviceDisablingManager( |
| 56 browser_policy_connector_chromeos())); | 58 nullptr /* delegate */, |
| 59 chromeos::CrosSettings::Get(), |
| 60 user_manager::UserManager::Get())); |
| 57 } | 61 } |
| 58 | 62 |
| 59 void BrowserProcessPlatformPart::ShutdownDeviceDisablingManager() { | 63 void BrowserProcessPlatformPart::ShutdownDeviceDisablingManager() { |
| 60 device_disabling_manager_.reset(); | 64 device_disabling_manager_.reset(); |
| 61 } | 65 } |
| 62 | 66 |
| 63 void BrowserProcessPlatformPart::InitializeSessionManager( | 67 void BrowserProcessPlatformPart::InitializeSessionManager( |
| 64 const base::CommandLine& parsed_command_line, | 68 const base::CommandLine& parsed_command_line, |
| 65 Profile* profile, | 69 Profile* profile, |
| 66 bool is_running_test) { | 70 bool is_running_test) { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { | 111 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { |
| 108 return scoped_ptr<policy::BrowserPolicyConnector>( | 112 return scoped_ptr<policy::BrowserPolicyConnector>( |
| 109 new policy::BrowserPolicyConnectorChromeOS()); | 113 new policy::BrowserPolicyConnectorChromeOS()); |
| 110 } | 114 } |
| 111 | 115 |
| 112 void BrowserProcessPlatformPart::CreateProfileHelper() { | 116 void BrowserProcessPlatformPart::CreateProfileHelper() { |
| 113 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); | 117 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); |
| 114 created_profile_helper_ = true; | 118 created_profile_helper_ = true; |
| 115 profile_helper_.reset(new chromeos::ProfileHelper()); | 119 profile_helper_.reset(new chromeos::ProfileHelper()); |
| 116 } | 120 } |
| OLD | NEW |