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