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

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

Issue 217533005: Invoke setup.exe to reenable updates when the update bubble is clicked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: i can haz linux compile? Created 6 years, 9 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 | « chrome/browser/ui/views/outdated_upgrade_bubble_view.cc ('k') | chrome/installer/util/google_update_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_main.cc
diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc
index 2562be0823834d3ce13bf9d6b7e10409e77473cd..9847c323073817bd7564b1e0268b5879a812faae 100644
--- a/chrome/installer/setup/setup_main.cc
+++ b/chrome/installer/setup/setup_main.cc
@@ -1199,6 +1199,20 @@ bool HandleNonInstallCmdLineOptions(const InstallationState& original_state,
} else {
*exit_code = installer::PATCH_INVALID_ARGUMENTS;
}
+ } else if (cmd_line.HasSwitch(installer::switches::kReenableAutoupdates)) {
+ // setup.exe has been asked to attempt to reenable updates for Chrome.
+ // Figure out whether we should do so for the multi binaries or the main
+ // Chrome product.
+ BrowserDistribution::Type dist_type = BrowserDistribution::CHROME_BROWSER;
+ if (installer_state->is_multi_install())
+ dist_type = BrowserDistribution::CHROME_BINARIES;
+
+ BrowserDistribution* dist =
+ BrowserDistribution::GetSpecificDistribution(dist_type);
+ bool updates_enabled =
+ GoogleUpdateSettings::ReenableAutoupdatesForApp(dist->GetAppGuid());
+ *exit_code = updates_enabled ? installer::REENABLE_UPDATES_SUCCEEDED :
+ installer::REENABLE_UPDATES_FAILED;
} else {
handled = false;
}
« no previous file with comments | « chrome/browser/ui/views/outdated_upgrade_bubble_view.cc ('k') | chrome/installer/util/google_update_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698