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

Unified Diff: chrome/browser/ui/views/outdated_upgrade_bubble_view.cc

Issue 216153006: Invoke setup.exe to reenable updates when the update bubble is clicked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mad2
Patch Set: 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 | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
diff --git a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
index fcb1ebb162241af85ccf64be749a00a8525e2fbc..dbb3d815770a05849940b0ad8a5ef4bb1dfd41d5 100644
--- a/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
+++ b/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc
@@ -14,6 +14,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/upgrade_detector.h"
#include "chrome/common/pref_names.h"
+#include "chrome/installer/util/google_update_util.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/user_metrics.h"
#include "grit/chromium_strings.h"
@@ -36,6 +38,7 @@
#include "ui/gfx/icon_util.h"
#endif
+using content::BrowserThread;
using views::GridLayout;
namespace {
@@ -94,6 +97,10 @@ void AddElevationIconIfNeeded(views::LabelButton* button) {
#endif
}
+void ReenableUpdates() {
+ google_update::ElevateIfNeededToReenableUpdates();
+}
+
} // namespace
// OutdatedUpgradeBubbleView ---------------------------------------------------
@@ -262,12 +269,15 @@ void OutdatedUpgradeBubbleView::HandleButtonPressed(views::Button* sender) {
0, kMaxIgnored, kNumIgnoredBuckets);
content::RecordAction(
base::UserMetricsAction("OutdatedUpgradeBubble.EnableAU"));
- // TODO(robertshield): Make a call to GoogleUpdateSettings to enable
- // auto-update.
+ // Record that the autoupdate flavour of the dialog has been shown.
if (g_browser_process->local_state()) {
g_browser_process->local_state()->SetBoolean(
prefs::kAttemptedToEnableAutoupdate, true);
}
+
+ // Re-enable updates by shelling out to setup.exe on the file thread.
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ base::Bind(&ReenableUpdates));
MAD 2014/03/28 18:18:23 You were not able to Bind directly to google_updat
robertshield 2014/03/28 19:15:35 Done.
}
} else {
DCHECK_EQ(later_button_, sender);
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698