Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 692383005: Add DeviceDisablingManager to manage device disabling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@f_3_425574_disable_header_bar
Patch Set: Add destructor required by clang. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/system/automatic_reboot_manager.h" 17 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
18 #include "chrome/browser/chromeos/system/device_disabling_manager.h"
18 #include "chrome/browser/profiles/profile.h" 19 #include "chrome/browser/profiles/profile.h"
19 #include "components/session_manager/core/session_manager.h" 20 #include "components/session_manager/core/session_manager.h"
20 21
21 BrowserProcessPlatformPart::BrowserProcessPlatformPart() 22 BrowserProcessPlatformPart::BrowserProcessPlatformPart()
22 : created_profile_helper_(false) { 23 : created_profile_helper_(false) {
23 } 24 }
24 25
25 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { 26 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() {
26 } 27 }
27 28
(...skipping 13 matching lines...) Expand all
41 chrome_user_manager_ = 42 chrome_user_manager_ =
42 chromeos::ChromeUserManagerImpl::CreateChromeUserManager(); 43 chromeos::ChromeUserManagerImpl::CreateChromeUserManager();
43 chrome_user_manager_->Initialize(); 44 chrome_user_manager_->Initialize();
44 } 45 }
45 46
46 void BrowserProcessPlatformPart::DestroyChromeUserManager() { 47 void BrowserProcessPlatformPart::DestroyChromeUserManager() {
47 chrome_user_manager_->Destroy(); 48 chrome_user_manager_->Destroy();
48 chrome_user_manager_.reset(); 49 chrome_user_manager_.reset();
49 } 50 }
50 51
52 void BrowserProcessPlatformPart::InitializeDeviceDisablingManager() {
53 DCHECK(!device_disabling_manager_);
54
55 device_disabling_manager_.reset(new chromeos::system::DeviceDisablingManager(
56 browser_policy_connector_chromeos()));
57 }
58
59 void BrowserProcessPlatformPart::ShutdownDeviceDisablingManager() {
60 device_disabling_manager_.reset();
61 }
62
51 void BrowserProcessPlatformPart::InitializeSessionManager( 63 void BrowserProcessPlatformPart::InitializeSessionManager(
52 const base::CommandLine& parsed_command_line, 64 const base::CommandLine& parsed_command_line,
53 Profile* profile, 65 Profile* profile,
54 bool is_running_test) { 66 bool is_running_test) {
55 DCHECK(!session_manager_); 67 DCHECK(!session_manager_);
56 session_manager_ = chromeos::ChromeSessionManager::CreateSessionManager( 68 session_manager_ = chromeos::ChromeSessionManager::CreateSessionManager(
57 parsed_command_line, profile, is_running_test); 69 parsed_command_line, profile, is_running_test);
58 } 70 }
59 71
60 void BrowserProcessPlatformPart::ShutdownSessionManager() { 72 void BrowserProcessPlatformPart::ShutdownSessionManager() {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { 107 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() {
96 return scoped_ptr<policy::BrowserPolicyConnector>( 108 return scoped_ptr<policy::BrowserPolicyConnector>(
97 new policy::BrowserPolicyConnectorChromeOS()); 109 new policy::BrowserPolicyConnectorChromeOS());
98 } 110 }
99 111
100 void BrowserProcessPlatformPart::CreateProfileHelper() { 112 void BrowserProcessPlatformPart::CreateProfileHelper() {
101 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); 113 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL);
102 created_profile_helper_ = true; 114 created_profile_helper_ = true;
103 profile_helper_.reset(new chromeos::ProfileHelper()); 115 profile_helper_.reset(new chromeos::ProfileHelper());
104 } 116 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_platform_part_chromeos.h ('k') | chrome/browser/chromeos/chrome_browser_main_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698