Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4129)

Unified Diff: chrome/installer/setup/install.cc

Issue 3342002: Allow download Chrome page to set Chrome as default even if it is not a new i... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
===================================================================
--- chrome/installer/setup/install.cc (revision 58106)
+++ chrome/installer/setup/install.cc (working copy)
@@ -773,8 +773,22 @@
installer_util::GetDistroBooleanPreference(prefs,
installer_util::master_preferences::kMakeChromeDefault,
&make_chrome_default);
+
+ // If this is not the user's first Chrome install, but they have chosen
+ // Chrome to become their default browser on the download page, we must
+ // force it here because the master_preferences file will not get copied
+ // into the build.
+ bool force_chrome_default_for_user = false;
+ if (result == installer_util::NEW_VERSION_UPDATED ||
+ result == installer_util::IN_USE_UPDATED ||
huanr 2010/09/02 02:30:12 Did you update the CL? I still see IN_USE_UPDATED.
+ result == installer_util::INSTALL_REPAIRED) {
+ installer_util::GetDistroBooleanPreference(prefs,
+ installer_util::master_preferences::kMakeChromeDefaultForUser,
+ &force_chrome_default_for_user);
+ }
+
RegisterChromeOnMachine(install_path, system_install,
- make_chrome_default);
+ make_chrome_default || force_chrome_default_for_user);
}
std::wstring latest_version_to_keep(new_version.GetString());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698