| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/extensions/extension_metrics.h" | 5 #include "chrome/common/extensions/extension_metrics.h" |
| 6 | 6 |
| 7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram_macros.h" |
| 8 #include "extensions/common/constants.h" | 8 #include "extensions/common/constants.h" |
| 9 #include "extensions/common/extension.h" | 9 #include "extensions/common/extension.h" |
| 10 | 10 |
| 11 namespace extensions { | 11 namespace extensions { |
| 12 | 12 |
| 13 void RecordAppLaunchType(extension_misc::AppLaunchBucket bucket, | 13 void RecordAppLaunchType(extension_misc::AppLaunchBucket bucket, |
| 14 extensions::Manifest::Type app_type) { | 14 extensions::Manifest::Type app_type) { |
| 15 DCHECK_LT(bucket, extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); | 15 DCHECK_LT(bucket, extension_misc::APP_LAUNCH_BUCKET_BOUNDARY); |
| 16 if (app_type == extensions::Manifest::TYPE_PLATFORM_APP) { | 16 if (app_type == extensions::Manifest::TYPE_PLATFORM_APP) { |
| 17 UMA_HISTOGRAM_ENUMERATION("Apps.AppLaunch", bucket, | 17 UMA_HISTOGRAM_ENUMERATION("Apps.AppLaunch", bucket, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 41 bucket = extension_misc::APP_LAUNCH_APP_LIST_MAIN_CHROME; | 41 bucket = extension_misc::APP_LAUNCH_APP_LIST_MAIN_CHROME; |
| 42 RecordAppLaunchType(bucket, extension->GetType()); | 42 RecordAppLaunchType(bucket, extension->GetType()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void RecordWebStoreLaunch() { | 45 void RecordWebStoreLaunch() { |
| 46 RecordAppLaunchType(extension_misc::APP_LAUNCH_NTP_WEBSTORE, | 46 RecordAppLaunchType(extension_misc::APP_LAUNCH_NTP_WEBSTORE, |
| 47 extensions::Manifest::TYPE_HOSTED_APP); | 47 extensions::Manifest::TYPE_HOSTED_APP); |
| 48 } | 48 } |
| 49 | 49 |
| 50 } // namespace extensions | 50 } // namespace extensions |
| OLD | NEW |