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 "chrome/browser/chromeos/memory/oom_priority_manager.h" | 7 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" |
8 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 8 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
9 | 9 |
10 BrowserProcessPlatformPart::BrowserProcessPlatformPart() | 10 BrowserProcessPlatformPart::BrowserProcessPlatformPart() |
11 : created_profile_helper_(false) { | 11 : created_profile_helper_(false) { |
12 } | 12 } |
13 | 13 |
14 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { | 14 BrowserProcessPlatformPart::~BrowserProcessPlatformPart() { |
15 } | 15 } |
16 | 16 |
17 void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing( | |
18 const CommandLine& /* command_line */) { | |
19 } | |
20 | |
21 void BrowserProcessPlatformPart::StartTearDown() { | |
22 profile_helper_.reset(); | |
23 } | |
24 | |
25 chromeos::OomPriorityManager* | 17 chromeos::OomPriorityManager* |
26 BrowserProcessPlatformPart::oom_priority_manager() { | 18 BrowserProcessPlatformPart::oom_priority_manager() { |
27 DCHECK(CalledOnValidThread()); | 19 DCHECK(CalledOnValidThread()); |
28 if (!oom_priority_manager_.get()) | 20 if (!oom_priority_manager_.get()) |
29 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); | 21 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); |
30 return oom_priority_manager_.get(); | 22 return oom_priority_manager_.get(); |
31 } | 23 } |
32 | 24 |
33 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { | 25 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { |
34 DCHECK(CalledOnValidThread()); | 26 DCHECK(CalledOnValidThread()); |
35 if (!created_profile_helper_) | 27 if (!created_profile_helper_) |
36 CreateProfileHelper(); | 28 CreateProfileHelper(); |
37 return profile_helper_.get(); | 29 return profile_helper_.get(); |
38 } | 30 } |
39 | 31 |
40 void BrowserProcessPlatformPart::CreateProfileHelper() { | 32 void BrowserProcessPlatformPart::CreateProfileHelper() { |
41 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); | 33 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); |
42 created_profile_helper_ = true; | 34 created_profile_helper_ = true; |
43 profile_helper_.reset(new chromeos::ProfileHelper()); | 35 profile_helper_.reset(new chromeos::ProfileHelper()); |
44 } | 36 } |
| 37 |
| 38 void BrowserProcessPlatformPart::StartTearDown() { |
| 39 profile_helper_.reset(); |
| 40 } |
OLD | NEW |