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 "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/time/default_tick_clock.h" | 9 #include "base/time/default_tick_clock.h" |
10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 chromeos::system::SystemClock* BrowserProcessPlatformPart::GetSystemClock() { | 147 chromeos::system::SystemClock* BrowserProcessPlatformPart::GetSystemClock() { |
148 if (!system_clock_.get()) | 148 if (!system_clock_.get()) |
149 system_clock_.reset(new chromeos::system::SystemClock()); | 149 system_clock_.reset(new chromeos::system::SystemClock()); |
150 return system_clock_.get(); | 150 return system_clock_.get(); |
151 } | 151 } |
152 | 152 |
153 void BrowserProcessPlatformPart::DestroySystemClock() { | 153 void BrowserProcessPlatformPart::DestroySystemClock() { |
154 system_clock_.reset(); | 154 system_clock_.reset(); |
155 } | 155 } |
156 | 156 |
157 void BrowserProcessPlatformPart::AddCompatibleCrOSComponent( | |
158 const std::string& name) { | |
159 auto it = std::find(compatible_cros_components_.begin(), | |
160 compatible_cros_components_.end(), name); | |
161 if (it == compatible_cros_components_.end()) { | |
162 compatible_cros_components_.push_back(name); | |
163 } | |
164 } | |
165 | |
166 bool BrowserProcessPlatformPart::IsCompatibleCrOSComponent( | |
167 const std::string& name) { | |
168 auto it = std::find(compatible_cros_components_.begin(), | |
169 compatible_cros_components_.end(), name); | |
170 if (it == compatible_cros_components_.end()) { | |
171 return false; | |
172 } else { | |
173 return true; | |
174 } | |
waffles
2017/05/24 21:14:35
Just "return it != compatible_cros_components_.end
xiaochu
2017/05/24 21:35:37
Done.
| |
175 } | |
176 | |
157 void BrowserProcessPlatformPart::CreateProfileHelper() { | 177 void BrowserProcessPlatformPart::CreateProfileHelper() { |
158 DCHECK(!created_profile_helper_ && !profile_helper_); | 178 DCHECK(!created_profile_helper_ && !profile_helper_); |
159 created_profile_helper_ = true; | 179 created_profile_helper_ = true; |
160 profile_helper_.reset(new chromeos::ProfileHelper()); | 180 profile_helper_.reset(new chromeos::ProfileHelper()); |
161 } | 181 } |
OLD | NEW |