Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / webui / help / version_updater_basic.cc
blobe8096cf08e28964a6f756d222ab4cbf4a96b4115
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
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/help/version_updater_basic.h"
7 #include "base/strings/string16.h"
8 #include "chrome/browser/lifetime/application_lifetime.h"
9 #include "chrome/browser/upgrade_detector.h"
11 void VersionUpdaterBasic::CheckForUpdate(
12 const StatusCallback& status_callback) {
13 if (UpgradeDetector::GetInstance()->notify_upgrade())
14 status_callback.Run(NEARLY_UPDATED, 0, base::string16());
15 else
16 status_callback.Run(DISABLED, 0, base::string16());
19 void VersionUpdaterBasic::RelaunchBrowser() const {
20 chrome::AttemptRestart();
23 VersionUpdater* VersionUpdater::Create(content::WebContents* web_contents) {
24 return new VersionUpdaterBasic;