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

Side by Side Diff: chrome/browser/ui/webui/help/version_updater_basic.cc

Issue 1117263002: Switch on-demand update checks to the less-old GoogleUpdate3 API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to position 329622 Created 5 years, 7 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
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/browser/ui/webui/help/version_updater_basic.h" 5 #include "chrome/browser/ui/webui/help/version_updater_basic.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "chrome/browser/lifetime/application_lifetime.h" 8 #include "chrome/browser/lifetime/application_lifetime.h"
9 #include "chrome/browser/upgrade_detector.h" 9 #include "chrome/browser/upgrade_detector.h"
10 10
11 void VersionUpdaterBasic::CheckForUpdate( 11 void VersionUpdaterBasic::CheckForUpdate(
12 const StatusCallback& status_callback) { 12 const StatusCallback& status_callback) {
13 if (UpgradeDetector::GetInstance()->notify_upgrade()) 13 if (UpgradeDetector::GetInstance()->notify_upgrade())
14 status_callback.Run(NEARLY_UPDATED, 0, base::string16()); 14 status_callback.Run(NEARLY_UPDATED, 0, base::string16());
15 else 15 else
16 status_callback.Run(DISABLED, 0, base::string16()); 16 status_callback.Run(DISABLED, 0, base::string16());
17 } 17 }
18 18
19 void VersionUpdaterBasic::RelaunchBrowser() const { 19 void VersionUpdaterBasic::RelaunchBrowser() const {
20 chrome::AttemptRestart(); 20 chrome::AttemptRestart();
21 } 21 }
22 22
23 VersionUpdater* VersionUpdater::Create(content::BrowserContext* /* context */) { 23 VersionUpdater* VersionUpdater::Create(
24 content::WebContents* /* web_contents */) {
24 return new VersionUpdaterBasic; 25 return new VersionUpdaterBasic;
25 } 26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698