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