| 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" | |
| 10 #include "base/bind.h" | 9 #include "base/bind.h" |
| 11 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 12 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 13 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 14 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/browser_shutdown.h" | 16 #include "chrome/browser/browser_shutdown.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/browser/ui/app_list/profile_loader.h" | 18 #include "chrome/browser/ui/app_list/profile_loader.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (!base::MessageLoop::current()) | 359 if (!base::MessageLoop::current()) |
| 361 return; // In a unit test. | 360 return; // In a unit test. |
| 362 | 361 |
| 363 // Send app list usage stats after a delay. | 362 // Send app list usage stats after a delay. |
| 364 const int kSendUsageStatsDelay = 5; | 363 const int kSendUsageStatsDelay = 5; |
| 365 base::MessageLoop::current()->PostDelayedTask( | 364 base::MessageLoop::current()->PostDelayedTask( |
| 366 FROM_HERE, | 365 FROM_HERE, |
| 367 base::Bind(&AppListServiceImpl::SendAppListStats), | 366 base::Bind(&AppListServiceImpl::SendAppListStats), |
| 368 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); | 367 base::TimeDelta::FromSeconds(kSendUsageStatsDelay)); |
| 369 } | 368 } |
| OLD | NEW |