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

Side by Side 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, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/setup/setup_main.h" 5 #include "chrome/installer/setup/setup_main.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <msi.h> 8 #include <msi.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 *exit_code = installer::CourgettePatchFiles(input_file, 1192 *exit_code = installer::CourgettePatchFiles(input_file,
1193 patch_file, 1193 patch_file,
1194 output_file); 1194 output_file);
1195 } else if (patch_type_str == installer::kBsdiff) { 1195 } else if (patch_type_str == installer::kBsdiff) {
1196 *exit_code = installer::BsdiffPatchFiles(input_file, 1196 *exit_code = installer::BsdiffPatchFiles(input_file,
1197 patch_file, 1197 patch_file,
1198 output_file); 1198 output_file);
1199 } else { 1199 } else {
1200 *exit_code = installer::PATCH_INVALID_ARGUMENTS; 1200 *exit_code = installer::PATCH_INVALID_ARGUMENTS;
1201 } 1201 }
1202 } else if (cmd_line.HasSwitch(installer::switches::kReenableAutoupdates)) {
1203 // setup.exe has been asked to attempt to reenable updates for Chrome.
1204 // Figure out whether we should do so for the multi binaries or the main
1205 // Chrome product.
1206 BrowserDistribution::Type dist_type = BrowserDistribution::CHROME_BROWSER;
1207 if (installer_state->is_multi_install())
1208 dist_type = BrowserDistribution::CHROME_BINARIES;
1209
1210 BrowserDistribution* dist =
1211 BrowserDistribution::GetSpecificDistribution(dist_type);
1212 bool updates_enabled =
1213 GoogleUpdateSettings::ReenableAutoupdatesForApp(dist->GetAppGuid());
1214 *exit_code = updates_enabled ? installer::REENABLE_UPDATES_SUCCEEDED :
1215 installer::REENABLE_UPDATES_FAILED;
1202 } else { 1216 } else {
1203 handled = false; 1217 handled = false;
1204 } 1218 }
1205 1219
1206 return handled; 1220 return handled;
1207 } 1221 }
1208 1222
1209 bool ShowRebootDialog() { 1223 bool ShowRebootDialog() {
1210 // Get a token for this process. 1224 // Get a token for this process.
1211 HANDLE token; 1225 HANDLE token;
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT 1831 // Note that we allow the status installer::UNINSTALL_REQUIRES_REBOOT
1818 // to pass through, since this is only returned on uninstall which is 1832 // to pass through, since this is only returned on uninstall which is
1819 // never invoked directly by Google Update. 1833 // never invoked directly by Google Update.
1820 return_code = InstallUtil::GetInstallReturnCode(install_status); 1834 return_code = InstallUtil::GetInstallReturnCode(install_status);
1821 } 1835 }
1822 1836
1823 VLOG(1) << "Installation complete, returning: " << return_code; 1837 VLOG(1) << "Installation complete, returning: " << return_code;
1824 1838
1825 return return_code; 1839 return return_code;
1826 } 1840 }
OLDNEW
« 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