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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 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 <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 command_line_(*CommandLine::ForCurrentProcess()), 232 command_line_(*base::CommandLine::ForCurrentProcess()),
233 local_state_(g_browser_process->local_state()), 233 local_state_(g_browser_process->local_state()),
234 profile_loader_(new ProfileLoader(profile_store_.get())), 234 profile_loader_(new ProfileLoader(profile_store_.get())),
235 weak_factory_(this) { 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 base::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 command_line_(command_line), 243 command_line_(command_line),
244 local_state_(local_state), 244 local_state_(local_state),
245 profile_loader_(new ProfileLoader(profile_store_.get())), 245 profile_loader_(new ProfileLoader(profile_store_.get())),
246 weak_factory_(this) { 246 weak_factory_(this) {
247 profile_store_->AddProfileObserver(this); 247 profile_store_->AddProfileObserver(this);
248 } 248 }
249 249
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (!base::MessageLoop::current()) 409 if (!base::MessageLoop::current())
410 return; // In a unit test. 410 return; // In a unit test.
411 411
412 // Send app list usage stats after a delay. 412 // Send app list usage stats after a delay.
413 const int kSendUsageStatsDelay = 5; 413 const int kSendUsageStatsDelay = 5;
414 base::MessageLoop::current()->PostDelayedTask( 414 base::MessageLoop::current()->PostDelayedTask(
415 FROM_HERE, 415 FROM_HERE,
416 base::Bind(&AppListServiceImpl::SendAppListStats), 416 base::Bind(&AppListServiceImpl::SendAppListStats),
417 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); 417 base::TimeDelta::FromSeconds(kSendUsageStatsDelay));
418 } 418 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service.cc ('k') | chrome/browser/ui/app_list/app_list_service_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698