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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_
8 #include "base/compiler_specific.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/threading/non_thread_safe.h"
11 #include "chrome/browser/browser_process_platform_part_base.h"
14 class OomPriorityManager
;
20 class AutomaticRebootManager
;
25 class BrowserPolicyConnector
;
26 class BrowserPolicyConnectorChromeOS
;
29 class BrowserProcessPlatformPart
: public BrowserProcessPlatformPartBase
,
30 public base::NonThreadSafe
{
32 BrowserProcessPlatformPart();
33 virtual ~BrowserProcessPlatformPart();
35 void InitializeAutomaticRebootManager();
36 void ShutdownAutomaticRebootManager();
38 // Returns the out-of-memory priority manager.
39 // Virtual for testing (see TestingBrowserProcessPlatformPart).
40 virtual chromeos::OomPriorityManager
* oom_priority_manager();
42 // Returns the ProfileHelper instance that is used to identify
43 // users and their profiles in Chrome OS multi user session.
44 chromeos::ProfileHelper
* profile_helper();
46 chromeos::system::AutomaticRebootManager
* automatic_reboot_manager() {
47 return automatic_reboot_manager_
.get();
50 policy::BrowserPolicyConnectorChromeOS
* browser_policy_connector_chromeos();
52 // Overridden from BrowserProcessPlatformPartBase:
53 virtual void StartTearDown() OVERRIDE
;
55 virtual scoped_ptr
<policy::BrowserPolicyConnector
>
56 CreateBrowserPolicyConnector() OVERRIDE
;
59 void CreateProfileHelper();
61 bool created_profile_helper_
;
62 scoped_ptr
<chromeos::ProfileHelper
> profile_helper_
;
64 scoped_ptr
<chromeos::OomPriorityManager
> oom_priority_manager_
;
66 scoped_ptr
<chromeos::system::AutomaticRebootManager
>
67 automatic_reboot_manager_
;
69 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart
);
72 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_