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

Side by Side Diff: chrome/browser/ui/app_list/app_list_service_impl.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/ui/app_list/app_list_service_impl.h" 5 #include "chrome/browser/ui/app_list/app_list_service_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 AppListServiceImpl::AppListServiceImpl() 273 AppListServiceImpl::AppListServiceImpl()
274 : profile_store_( 274 : profile_store_(
275 new ProfileStoreImpl(g_browser_process->profile_manager())), 275 new ProfileStoreImpl(g_browser_process->profile_manager())),
276 command_line_(*base::CommandLine::ForCurrentProcess()), 276 command_line_(*base::CommandLine::ForCurrentProcess()),
277 local_state_(g_browser_process->local_state()), 277 local_state_(g_browser_process->local_state()),
278 profile_loader_(new ProfileLoader(profile_store_.get())), 278 profile_loader_(new ProfileLoader(profile_store_.get())),
279 weak_factory_(this) { 279 weak_factory_(this) {
280 profile_store_->AddProfileObserver(this); 280 profile_store_->AddProfileObserver(this);
281 } 281 }
282 282
283 AppListServiceImpl::AppListServiceImpl(const base::CommandLine& command_line, 283 AppListServiceImpl::AppListServiceImpl(
284 PrefService* local_state, 284 const base::CommandLine& command_line,
285 scoped_ptr<ProfileStore> profile_store) 285 PrefService* local_state,
286 std::unique_ptr<ProfileStore> profile_store)
286 : profile_store_(std::move(profile_store)), 287 : profile_store_(std::move(profile_store)),
287 command_line_(command_line), 288 command_line_(command_line),
288 local_state_(local_state), 289 local_state_(local_state),
289 profile_loader_(new ProfileLoader(profile_store_.get())), 290 profile_loader_(new ProfileLoader(profile_store_.get())),
290 weak_factory_(this) { 291 weak_factory_(this) {
291 profile_store_->AddProfileObserver(this); 292 profile_store_->AddProfileObserver(this);
292 } 293 }
293 294
294 AppListServiceImpl::~AppListServiceImpl() {} 295 AppListServiceImpl::~AppListServiceImpl() {}
295 296
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 451
451 if (!base::ThreadTaskRunnerHandle::IsSet()) 452 if (!base::ThreadTaskRunnerHandle::IsSet())
452 return; // In a unit test. 453 return; // In a unit test.
453 454
454 // Send app list usage stats after a delay. 455 // Send app list usage stats after a delay.
455 const int kSendUsageStatsDelay = 5; 456 const int kSendUsageStatsDelay = 5;
456 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 457 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
457 FROM_HERE, base::Bind(&AppListServiceImpl::SendAppListStats), 458 FROM_HERE, base::Bind(&AppListServiceImpl::SendAppListStats),
458 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 459 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
459 } 460 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.h ('k') | chrome/browser/ui/app_list/app_list_service_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698