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); |