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 1550053002: Convert Pass()→std::move() in //chrome/browser/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
10 #include <string> 9 #include <string>
10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/location.h" 14 #include "base/location.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
17 #include "base/single_thread_task_runner.h" 17 #include "base/single_thread_task_runner.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/thread_task_runner_handle.h" 19 #include "base/thread_task_runner_handle.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 command_line_(*base::CommandLine::ForCurrentProcess()), 274 command_line_(*base::CommandLine::ForCurrentProcess()),
275 local_state_(g_browser_process->local_state()), 275 local_state_(g_browser_process->local_state()),
276 profile_loader_(new ProfileLoader(profile_store_.get())), 276 profile_loader_(new ProfileLoader(profile_store_.get())),
277 weak_factory_(this) { 277 weak_factory_(this) {
278 profile_store_->AddProfileObserver(this); 278 profile_store_->AddProfileObserver(this);
279 } 279 }
280 280
281 AppListServiceImpl::AppListServiceImpl(const base::CommandLine& command_line, 281 AppListServiceImpl::AppListServiceImpl(const base::CommandLine& command_line,
282 PrefService* local_state, 282 PrefService* local_state,
283 scoped_ptr<ProfileStore> profile_store) 283 scoped_ptr<ProfileStore> profile_store)
284 : profile_store_(profile_store.Pass()), 284 : profile_store_(std::move(profile_store)),
285 command_line_(command_line), 285 command_line_(command_line),
286 local_state_(local_state), 286 local_state_(local_state),
287 profile_loader_(new ProfileLoader(profile_store_.get())), 287 profile_loader_(new ProfileLoader(profile_store_.get())),
288 weak_factory_(this) { 288 weak_factory_(this) {
289 profile_store_->AddProfileObserver(this); 289 profile_store_->AddProfileObserver(this);
290 } 290 }
291 291
292 AppListServiceImpl::~AppListServiceImpl() {} 292 AppListServiceImpl::~AppListServiceImpl() {}
293 293
294 AppListViewDelegate* AppListServiceImpl::GetViewDelegate(Profile* profile) { 294 AppListViewDelegate* AppListServiceImpl::GetViewDelegate(Profile* profile) {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 448
449 if (!base::ThreadTaskRunnerHandle::IsSet()) 449 if (!base::ThreadTaskRunnerHandle::IsSet())
450 return; // In a unit test. 450 return; // In a unit test.
451 451
452 // Send app list usage stats after a delay. 452 // Send app list usage stats after a delay.
453 const int kSendUsageStatsDelay = 5; 453 const int kSendUsageStatsDelay = 5;
454 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 454 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
455 FROM_HERE, base::Bind(&AppListServiceImpl::SendAppListStats), 455 FROM_HERE, base::Bind(&AppListServiceImpl::SendAppListStats),
456 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 456 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
457 } 457 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_prefs_factory.cc ('k') | chrome/browser/ui/app_list/app_list_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698