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() { | 17 void BrowserProcessPlatformPart::StartTearDown() { |
22 profile_helper_.reset(); | 18 profile_helper_.reset(); |
23 } | 19 } |
24 | 20 |
25 chromeos::OomPriorityManager* | 21 chromeos::OomPriorityManager* |
26 BrowserProcessPlatformPart::oom_priority_manager() { | 22 BrowserProcessPlatformPart::oom_priority_manager() { |
27 DCHECK(CalledOnValidThread()); | 23 DCHECK(CalledOnValidThread()); |
28 if (!oom_priority_manager_.get()) | 24 if (!oom_priority_manager_.get()) |
29 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); | 25 oom_priority_manager_.reset(new chromeos::OomPriorityManager()); |
30 return oom_priority_manager_.get(); | 26 return oom_priority_manager_.get(); |
31 } | 27 } |
32 | 28 |
33 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { | 29 chromeos::ProfileHelper* BrowserProcessPlatformPart::profile_helper() { |
34 DCHECK(CalledOnValidThread()); | 30 DCHECK(CalledOnValidThread()); |
35 if (!created_profile_helper_) | 31 if (!created_profile_helper_) |
36 CreateProfileHelper(); | 32 CreateProfileHelper(); |
37 return profile_helper_.get(); | 33 return profile_helper_.get(); |
38 } | 34 } |
39 | 35 |
40 void BrowserProcessPlatformPart::CreateProfileHelper() { | 36 void BrowserProcessPlatformPart::CreateProfileHelper() { |
41 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); | 37 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); |
42 created_profile_helper_ = true; | 38 created_profile_helper_ = true; |
43 profile_helper_.reset(new chromeos::ProfileHelper()); | 39 profile_helper_.reset(new chromeos::ProfileHelper()); |
44 } | 40 } |
OLD | NEW |