Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 2898063002: Hold cros_component_installers in browser_process. (Closed)
Patch Set: switch to smart pointer Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::CreateProfileHelper() { 157 void BrowserProcessPlatformPart::CreateProfileHelper() {
158 DCHECK(!created_profile_helper_ && !profile_helper_); 158 DCHECK(!created_profile_helper_ && !profile_helper_);
159 created_profile_helper_ = true; 159 created_profile_helper_ = true;
160 profile_helper_.reset(new chromeos::ProfileHelper()); 160 profile_helper_.reset(new chromeos::ProfileHelper());
161 } 161 }
162
163 scoped_refptr<component_updater::DefaultComponentInstaller>
sky 2017/05/23 23:20:29 Style guide says position definition and declarati
xiaochu 2017/05/23 23:40:52 Done.
164 BrowserProcessPlatformPart::GetCrosComponentInstaller(
165 const std::string& name,
166 std::unique_ptr<component_updater::ComponentInstallerTraits>
167 installer_traits) {
168 auto it = cros_component_installers_.find(name);
169 if (it == cros_component_installers_.end()) {
170 cros_component_installers_[name] =
171 new component_updater::DefaultComponentInstaller(
172 std::move(installer_traits));
173 }
174 return cros_component_installers_[name];
175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698