| OLD | NEW |
| 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 "apps/pref_names.h" | 9 #include "apps/pref_names.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 AppShortcutManagerFactory::GetForProfile(initial_profile); | 266 AppShortcutManagerFactory::GetForProfile(initial_profile); |
| 267 if (shortcut_manager) | 267 if (shortcut_manager) |
| 268 shortcut_manager->OnceOffCreateShortcuts(); | 268 shortcut_manager->OnceOffCreateShortcuts(); |
| 269 } | 269 } |
| 270 | 270 |
| 271 void AppListServiceImpl::InvalidatePendingProfileLoads() { | 271 void AppListServiceImpl::InvalidatePendingProfileLoads() { |
| 272 profile_loader_->InvalidatePendingProfileLoads(); | 272 profile_loader_->InvalidatePendingProfileLoads(); |
| 273 } | 273 } |
| 274 | 274 |
| 275 void AppListServiceImpl::HandleCommandLineFlags(Profile* initial_profile) { | 275 void AppListServiceImpl::HandleCommandLineFlags(Profile* initial_profile) { |
| 276 if (command_line_.HasSwitch(switches::kResetAppListInstallState)) |
| 277 local_state_->SetBoolean(prefs::kAppLauncherHasBeenEnabled, false); |
| 278 |
| 276 if (command_line_.HasSwitch(switches::kEnableAppList)) | 279 if (command_line_.HasSwitch(switches::kEnableAppList)) |
| 277 EnableAppList(initial_profile); | 280 EnableAppList(initial_profile); |
| 278 | |
| 279 if (command_line_.HasSwitch(switches::kResetAppListInstallState)) | |
| 280 local_state_->SetBoolean(prefs::kAppLauncherHasBeenEnabled, false); | |
| 281 } | 281 } |
| 282 | 282 |
| 283 void AppListServiceImpl::SendUsageStats() { | 283 void AppListServiceImpl::SendUsageStats() { |
| 284 // Send app list usage stats after a delay. | 284 // Send app list usage stats after a delay. |
| 285 const int kSendUsageStatsDelay = 5; | 285 const int kSendUsageStatsDelay = 5; |
| 286 base::MessageLoop::current()->PostDelayedTask( | 286 base::MessageLoop::current()->PostDelayedTask( |
| 287 FROM_HERE, | 287 FROM_HERE, |
| 288 base::Bind(&AppListServiceImpl::SendAppListStats), | 288 base::Bind(&AppListServiceImpl::SendAppListStats), |
| 289 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); | 289 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); |
| 290 } | 290 } |
| OLD | NEW |