| 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 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 6 #define CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/non_thread_safe.h" | 10 #include "base/threading/non_thread_safe.h" |
| 11 #include "chrome/browser/browser_process_platform_part_base.h" | 11 #include "chrome/browser/browser_process_platform_part_base.h" |
| 12 | 12 |
| 13 namespace chromeos { | 13 namespace chromeos { |
| 14 class OomPriorityManager; | 14 class OomPriorityManager; |
| 15 class ProfileHelper; | 15 class ProfileHelper; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace chromeos { |
| 19 namespace system { |
| 20 class AutomaticRebootManager; |
| 21 } |
| 22 } |
| 23 |
| 24 |
| 18 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, | 25 class BrowserProcessPlatformPart : public BrowserProcessPlatformPartBase, |
| 19 public base::NonThreadSafe { | 26 public base::NonThreadSafe { |
| 20 public: | 27 public: |
| 21 BrowserProcessPlatformPart(); | 28 BrowserProcessPlatformPart(); |
| 22 virtual ~BrowserProcessPlatformPart(); | 29 virtual ~BrowserProcessPlatformPart(); |
| 23 | 30 |
| 31 void InitializeAutomaticRebootManager(); |
| 32 void ShutdownAutomaticRebootManager(); |
| 33 |
| 24 // Returns the out-of-memory priority manager. | 34 // Returns the out-of-memory priority manager. |
| 25 virtual chromeos::OomPriorityManager* oom_priority_manager(); | 35 virtual chromeos::OomPriorityManager* oom_priority_manager(); |
| 26 | 36 |
| 27 // Returns the ProfileHelper instance that is used to identify | 37 // Returns the ProfileHelper instance that is used to identify |
| 28 // users and their profiles in Chrome OS multi user session. | 38 // users and their profiles in Chrome OS multi user session. |
| 29 virtual chromeos::ProfileHelper* profile_helper(); | 39 virtual chromeos::ProfileHelper* profile_helper(); |
| 30 | 40 |
| 31 // Overridden from BrowserProcessPlatformPartBase: | 41 // Overridden from BrowserProcessPlatformPartBase: |
| 32 virtual void StartTearDown() OVERRIDE; | 42 virtual void StartTearDown() OVERRIDE; |
| 33 | 43 |
| 44 chromeos::system::AutomaticRebootManager* automatic_reboot_manager() { |
| 45 return automatic_reboot_manager_.get(); |
| 46 } |
| 47 |
| 34 protected: | 48 protected: |
| 35 virtual void CreateProfileHelper(); | 49 virtual void CreateProfileHelper(); |
| 36 | 50 |
| 37 bool created_profile_helper_; | 51 bool created_profile_helper_; |
| 38 scoped_ptr<chromeos::ProfileHelper> profile_helper_; | 52 scoped_ptr<chromeos::ProfileHelper> profile_helper_; |
| 39 | 53 |
| 40 private: | 54 private: |
| 41 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; | 55 scoped_ptr<chromeos::OomPriorityManager> oom_priority_manager_; |
| 42 | 56 |
| 57 scoped_ptr<chromeos::system::AutomaticRebootManager> |
| 58 automatic_reboot_manager_; |
| 59 |
| 43 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); | 60 DISALLOW_COPY_AND_ASSIGN(BrowserProcessPlatformPart); |
| 44 }; | 61 }; |
| 45 | 62 |
| 46 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ | 63 #endif // CHROME_BROWSER_BROWSER_PROCESS_PLATFORM_PART_CHROMEOS_H_ |
| OLD | NEW |