summaryrefslogtreecommitdiffstats
path: root/chrome/installer/launcher_support
diff options
context:
space:
mode:
authorbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-06 09:00:45 +0000
committerbenwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-06 09:00:45 +0000
commit6ef33f790c2cb9030d98a96b906604977c85e64c (patch)
tree26b44ebe78ca7b0722bc4713163bdba81ec6066e /chrome/installer/launcher_support
parent7d00665da6dd98cb79d0f3c97c2f18dfb3bc664f (diff)
downloadchromium_src-6ef33f790c2cb9030d98a96b906604977c85e64c.zip
chromium_src-6ef33f790c2cb9030d98a96b906604977c85e64c.tar.gz
chromium_src-6ef33f790c2cb9030d98a96b906604977c85e64c.tar.bz2
[win] Set did run bit for app host when the app launcher is used.
This allows us to track 7da users through omaha for the app launcher. BUG=178975 Review URL: https://chromiumcodereview.appspot.com/12389011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/launcher_support')
-rw-r--r--chrome/installer/launcher_support/chrome_launcher_support.cc13
-rw-r--r--chrome/installer/launcher_support/chrome_launcher_support.h12
2 files changed, 22 insertions, 3 deletions
diff --git a/chrome/installer/launcher_support/chrome_launcher_support.cc b/chrome/installer/launcher_support/chrome_launcher_support.cc
index 8f0bee5..61a6bb2 100644
--- a/chrome/installer/launcher_support/chrome_launcher_support.cc
+++ b/chrome/installer/launcher_support/chrome_launcher_support.cc
@@ -196,9 +196,18 @@ bool IsAppHostPresent() {
return !app_host_exe.empty();
}
+InstallationState GetAppLauncherInstallationState() {
+ if (IsAppLauncherEnabledAtLevel(SYSTEM_LEVEL_INSTALLATION))
+ return INSTALLED_AT_SYSTEM_LEVEL;
+
+ if (IsAppLauncherEnabledAtLevel(USER_LEVEL_INSTALLATION))
+ return INSTALLED_AT_USER_LEVEL;
+
+ return NOT_INSTALLED;
+}
+
bool IsAppLauncherPresent() {
- return IsAppLauncherEnabledAtLevel(USER_LEVEL_INSTALLATION) ||
- IsAppLauncherEnabledAtLevel(SYSTEM_LEVEL_INSTALLATION);
+ return GetAppLauncherInstallationState() != NOT_INSTALLED;
}
bool IsChromeBrowserPresent() {
diff --git a/chrome/installer/launcher_support/chrome_launcher_support.h b/chrome/installer/launcher_support/chrome_launcher_support.h
index 3b28396..7c5bc68 100644
--- a/chrome/installer/launcher_support/chrome_launcher_support.h
+++ b/chrome/installer/launcher_support/chrome_launcher_support.h
@@ -13,7 +13,13 @@ namespace chrome_launcher_support {
enum InstallationLevel {
USER_LEVEL_INSTALLATION,
- SYSTEM_LEVEL_INSTALLATION
+ SYSTEM_LEVEL_INSTALLATION,
+};
+
+enum InstallationState {
+ NOT_INSTALLED,
+ INSTALLED_AT_USER_LEVEL,
+ INSTALLED_AT_SYSTEM_LEVEL,
};
// Returns the path to an existing setup.exe at the specified level, if it can
@@ -50,6 +56,10 @@ base::FilePath GetAnyAppHostPath();
// or in the same directory as the current executable.
bool IsAppHostPresent();
+// Returns the app launcher installation state. If the launcher is installed
+// at both system level and user level, system level is returned.
+InstallationState GetAppLauncherInstallationState();
+
// Returns true if App Launcher is installed (system-level or user-level).
bool IsAppLauncherPresent();