summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/install_util.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 10:45:32 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-15 10:45:32 +0000
commit0cba296108328045bad62e2286f5ec6a2e4fd7e8 (patch)
tree5d60490adfbb0d68f62e51809551b6cfb6e19063 /chrome/installer/util/install_util.cc
parente69786054d76d7a8cc2a15536597b2ffb248afde (diff)
downloadchromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.zip
chromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.tar.gz
chromium_src-0cba296108328045bad62e2286f5ec6a2e4fd7e8.tar.bz2
Implement an AutoLaunch experiment for Chrome for certain brand codes. This is for Windows only.
BUG=95971 TEST=This requires a special branded build to test (and master_preferences set to have auto_launch_chrome: true or specify mini_installer param --auto-launch-chrome), but after installing it you should see an item under the Wrench \ Options \ Basics that lets you configure Chrome to not auto-launch. If you instead, log out and log in again, Chrome should start with an infobar saying that it was auto-launched. The infobar should stay for a max of 5 launches and then not appear again. Pressing "Cut it out!" on the infobar should turn off this feature. If you just want to test the infobar, launch chrome with --auto-launch-at-startup. Also, uninstall and make sure Chrome is not auto-launched (a Windows error about Chrome not being found should not be shown). Review URL: http://codereview.chromium.org/8729009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/install_util.cc')
-rw-r--r--chrome/installer/util/install_util.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/installer/util/install_util.cc b/chrome/installer/util/install_util.cc
index f14f372..3479bf8 100644
--- a/chrome/installer/util/install_util.cc
+++ b/chrome/installer/util/install_util.cc
@@ -39,6 +39,7 @@ namespace {
const wchar_t kStageBinaryPatching[] = L"binary_patching";
const wchar_t kStageBuilding[] = L"building";
+const wchar_t kStageConfiguringAutoLaunch[] = L"configuring_auto_launch";
const wchar_t kStageCopyingPreferencesFile[] = L"copying_prefs";
const wchar_t kStageCreatingShortcuts[] = L"creating_shortcuts";
const wchar_t kStageEnsemblePatching[] = L"ensemble_patching";
@@ -69,7 +70,8 @@ const wchar_t* const kStages[] = {
kStageCreatingShortcuts,
kStageRegisteringChrome,
kStageRemovingOldVersions,
- kStageFinishing
+ kStageFinishing,
+ kStageConfiguringAutoLaunch,
};
COMPILE_ASSERT(installer::NUM_STAGES == arraysize(kStages),
@@ -173,7 +175,8 @@ Version* InstallUtil::GetChromeVersion(BrowserDistribution* dist,
DCHECK(dist);
RegKey key;
HKEY reg_root = (system_install) ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
- LONG result = key.Open(reg_root, dist->GetVersionKey().c_str(), KEY_READ);
+ LONG result = key.Open(reg_root, dist->GetVersionKey().c_str(),
+ KEY_QUERY_VALUE);
std::wstring version_str;
if (result == ERROR_SUCCESS)