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.h" | 5 #include "chrome/browser/ui/app_list/app_list_service.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/prefs/pref_registry_simple.h" | 8 #include "base/prefs/pref_registry_simple.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/extensions/extension_prefs.h" | 11 #include "chrome/browser/extensions/extension_prefs.h" |
12 #include "chrome/common/chrome_constants.h" | 12 #include "chrome/common/chrome_constants.h" |
13 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
14 #include "grit/theme_resources.h" | |
15 | |
16 #if defined(GOOGLE_CHROME_BUILD) | |
17 #include "chrome/installer/util/install_util.h" | |
benwells
2013/04/09 22:34:44
This is a windows only component, I believe.
tapted
2013/04/10 06:36:37
You're right! That would have been embarrassing...
| |
18 #endif | |
14 | 19 |
15 namespace { | 20 namespace { |
16 | 21 |
17 void SendAppListAppLaunch(int count) { | 22 void SendAppListAppLaunch(int count) { |
18 UMA_HISTOGRAM_CUSTOM_COUNTS( | 23 UMA_HISTOGRAM_CUSTOM_COUNTS( |
19 "Apps.AppListDailyAppLaunches", count, 1, 1000, 50); | 24 "Apps.AppListDailyAppLaunches", count, 1, 1000, 50); |
20 } | 25 } |
21 | 26 |
22 void SendAppListLaunch(int count) { | 27 void SendAppListLaunch(int count) { |
23 UMA_HISTOGRAM_CUSTOM_COUNTS( | 28 UMA_HISTOGRAM_CUSTOM_COUNTS( |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
113 // static | 118 // static |
114 void AppListService::SendAppListStats() { | 119 void AppListService::SendAppListStats() { |
115 SendDailyEventFrequency(prefs::kLastAppListLaunchPing, | 120 SendDailyEventFrequency(prefs::kLastAppListLaunchPing, |
116 prefs::kAppListLaunchCount, | 121 prefs::kAppListLaunchCount, |
117 &SendAppListLaunch); | 122 &SendAppListLaunch); |
118 SendDailyEventFrequency(prefs::kLastAppListAppLaunchPing, | 123 SendDailyEventFrequency(prefs::kLastAppListAppLaunchPing, |
119 prefs::kAppListAppLaunchCount, | 124 prefs::kAppListAppLaunchCount, |
120 &SendAppListAppLaunch); | 125 &SendAppListAppLaunch); |
121 } | 126 } |
122 | 127 |
128 // static | |
129 int AppListService::GetAppListIconResourceId() { | |
130 int icon_id = IDR_APP_LIST; | |
131 #if defined(GOOGLE_CHROME_BUILD) | |
132 if (InstallUtil::IsChromeSxSProcess()) | |
133 icon_id = IDR_APP_LIST_SXS; | |
134 #endif | |
135 return icon_id; | |
136 } | |
137 | |
123 void AppListService::ShowAppList(Profile* profile) {} | 138 void AppListService::ShowAppList(Profile* profile) {} |
124 | 139 |
125 void AppListService::DismissAppList() {} | 140 void AppListService::DismissAppList() {} |
126 | 141 |
127 void AppListService::SetAppListProfile( | 142 void AppListService::SetAppListProfile( |
128 const base::FilePath& profile_file_path) {} | 143 const base::FilePath& profile_file_path) {} |
129 | 144 |
130 Profile* AppListService::GetCurrentAppListProfile() { return NULL; } | 145 Profile* AppListService::GetCurrentAppListProfile() { return NULL; } |
131 | 146 |
132 bool AppListService::IsAppListVisible() const { return false; } | 147 bool AppListService::IsAppListVisible() const { return false; } |
133 | 148 |
134 void AppListService::OnProfileAdded(const base::FilePath& profilePath) {} | 149 void AppListService::OnProfileAdded(const base::FilePath& profilePath) {} |
135 | 150 |
136 void AppListService::OnProfileWillBeRemoved( | 151 void AppListService::OnProfileWillBeRemoved( |
137 const base::FilePath& profile_path) {} | 152 const base::FilePath& profile_path) {} |
138 | 153 |
139 void AppListService::OnProfileWasRemoved(const base::FilePath& profile_path, | 154 void AppListService::OnProfileWasRemoved(const base::FilePath& profile_path, |
140 const string16& profile_name) {} | 155 const string16& profile_name) {} |
141 | 156 |
142 void AppListService::OnProfileNameChanged(const base::FilePath& profile_path, | 157 void AppListService::OnProfileNameChanged(const base::FilePath& profile_path, |
143 const string16& profile_name) {} | 158 const string16& profile_name) {} |
144 | 159 |
145 void AppListService::OnProfileAvatarChanged( | 160 void AppListService::OnProfileAvatarChanged( |
146 const base::FilePath& profile_path) {} | 161 const base::FilePath& profile_path) {} |
147 | 162 |
148 AppListControllerDelegate* AppListService::CreateControllerDelegate() { | 163 AppListControllerDelegate* AppListService::CreateControllerDelegate() { |
149 return NULL; | 164 return NULL; |
150 } | 165 } |
OLD | NEW |