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

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

Issue 572853002: Realigning the WeakPtrFactory initialization order in chrome/ui folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed mac error Created 6 years, 3 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 <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 prefs::kAppListLaunchCount, 222 prefs::kAppListLaunchCount,
223 &SendAppListLaunch); 223 &SendAppListLaunch);
224 SendDailyEventFrequency(prefs::kLastAppListAppLaunchPing, 224 SendDailyEventFrequency(prefs::kLastAppListAppLaunchPing,
225 prefs::kAppListAppLaunchCount, 225 prefs::kAppListAppLaunchCount,
226 &SendAppListAppLaunch); 226 &SendAppListAppLaunch);
227 } 227 }
228 228
229 AppListServiceImpl::AppListServiceImpl() 229 AppListServiceImpl::AppListServiceImpl()
230 : profile_store_( 230 : profile_store_(
231 new ProfileStoreImpl(g_browser_process->profile_manager())), 231 new ProfileStoreImpl(g_browser_process->profile_manager())),
232 weak_factory_(this),
233 command_line_(*CommandLine::ForCurrentProcess()), 232 command_line_(*CommandLine::ForCurrentProcess()),
234 local_state_(g_browser_process->local_state()), 233 local_state_(g_browser_process->local_state()),
235 profile_loader_(new ProfileLoader(profile_store_.get())) { 234 profile_loader_(new ProfileLoader(profile_store_.get())),
235 weak_factory_(this) {
236 profile_store_->AddProfileObserver(this); 236 profile_store_->AddProfileObserver(this);
237 } 237 }
238 238
239 AppListServiceImpl::AppListServiceImpl(const CommandLine& command_line, 239 AppListServiceImpl::AppListServiceImpl(const CommandLine& command_line,
240 PrefService* local_state, 240 PrefService* local_state,
241 scoped_ptr<ProfileStore> profile_store) 241 scoped_ptr<ProfileStore> profile_store)
242 : profile_store_(profile_store.Pass()), 242 : profile_store_(profile_store.Pass()),
243 weak_factory_(this),
244 command_line_(command_line), 243 command_line_(command_line),
245 local_state_(local_state), 244 local_state_(local_state),
246 profile_loader_(new ProfileLoader(profile_store_.get())) { 245 profile_loader_(new ProfileLoader(profile_store_.get())),
246 weak_factory_(this) {
247 profile_store_->AddProfileObserver(this); 247 profile_store_->AddProfileObserver(this);
248 } 248 }
249 249
250 AppListServiceImpl::~AppListServiceImpl() {} 250 AppListServiceImpl::~AppListServiceImpl() {}
251 251
252 void AppListServiceImpl::SetAppListNextPaintCallback(void (*callback)()) {} 252 void AppListServiceImpl::SetAppListNextPaintCallback(void (*callback)()) {}
253 253
254 void AppListServiceImpl::HandleFirstRun() {} 254 void AppListServiceImpl::HandleFirstRun() {}
255 255
256 void AppListServiceImpl::Init(Profile* initial_profile) {} 256 void AppListServiceImpl::Init(Profile* initial_profile) {}
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 if (!base::MessageLoop::current()) 373 if (!base::MessageLoop::current())
374 return; // In a unit test. 374 return; // In a unit test.
375 375
376 // Send app list usage stats after a delay. 376 // Send app list usage stats after a delay.
377 const int kSendUsageStatsDelay = 5; 377 const int kSendUsageStatsDelay = 5;
378 base::MessageLoop::current()->PostDelayedTask( 378 base::MessageLoop::current()->PostDelayedTask(
379 FROM_HERE, 379 FROM_HERE,
380 base::Bind(&AppListServiceImpl::SendAppListStats), 380 base::Bind(&AppListServiceImpl::SendAppListStats),
381 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 381 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
382 } 382 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.h ('k') | chrome/browser/ui/app_list/search/people/people_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698