summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-14 15:07:32 +0000
committerjstritar@chromium.org <jstritar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-14 15:07:32 +0000
commit40c689d60752385268c953663f755e8863ba7f3a (patch)
tree317973755511b5428867015dbce3cbaad1950630 /chrome
parentd2d467b86bbb9e9ec9a646df104d5ab65a9f0ddb (diff)
downloadchromium_src-40c689d60752385268c953663f755e8863ba7f3a.zip
chromium_src-40c689d60752385268c953663f755e8863ba7f3a.tar.gz
chromium_src-40c689d60752385268c953663f755e8863ba7f3a.tar.bz2
Fix the histogram tracking command line app launches.
An old feature let users launch any URL with the --app command line switch. This change separates out non app --app launches into a separate histogram. BUG=78357 TEST=None. Review URL: http://codereview.chromium.org/6851003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/browser_init.cc9
-rw-r--r--chrome/common/extensions/extension_constants.h5
2 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index ff1f585..7f0c1a4 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -828,7 +828,14 @@ bool BrowserInit::LaunchWithProfile::OpenApplicationWindow(Profile* profile) {
if (policy->IsWebSafeScheme(url.scheme()) ||
url.SchemeIs(chrome::kFileScheme)) {
- RecordCmdLineAppHistogram();
+ if (profile->GetExtensionService()->IsInstalledApp(url)) {
+ RecordCmdLineAppHistogram();
+ } else {
+ UMA_HISTOGRAM_ENUMERATION(
+ extension_misc::kAppLaunchHistogram,
+ extension_misc::APP_LAUNCH_CMD_LINE_APP_LEGACY,
+ extension_misc::APP_LAUNCH_BUCKET_BOUNDARY);
+ }
TabContents* app_tab = Browser::OpenAppShortcutWindow(
profile,
url,
diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h
index f05c947..28514da 100644
--- a/chrome/common/extensions/extension_constants.h
+++ b/chrome/common/extensions/extension_constants.h
@@ -343,6 +343,11 @@ namespace extension_misc {
// App launched after the user re-enabled it on the NTP.
APP_LAUNCH_NTP_APP_RE_ENABLE,
+ // URL launched using the --app cmd line option, but the URL does not
+ // correspond to an installed app. These launches are left over from a
+ // feature that let you make desktop shortcuts from the file menu.
+ APP_LAUNCH_CMD_LINE_APP_LEGACY,
+
APP_LAUNCH_BUCKET_BOUNDARY,
APP_LAUNCH_BUCKET_INVALID
};