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

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: MAD's feedback. 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') | chrome/installer/util/google_update_util.cc » ('J')
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..a284cdec7c04e793a974a649803d9c31f18e19a0 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 {
@@ -262,12 +265,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.
grt (UTC plus 2) 2014/03/28 21:22:21 is the blocking pool not a better place for this?
+ BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
+ base::Bind(&google_update::ElevateIfNeededToReenableUpdates));
}
} else {
DCHECK_EQ(later_button_, sender);
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | chrome/installer/util/google_update_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698