| OLD | NEW |
| 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" | |
| 9 #include "chrome/browser/upgrade_detector.h" | 8 #include "chrome/browser/upgrade_detector.h" |
| 10 | 9 |
| 11 void VersionUpdaterBasic::CheckForUpdate( | 10 void VersionUpdaterBasic::CheckForUpdate( |
| 12 const StatusCallback& status_callback, | 11 const StatusCallback& status_callback, |
| 13 const PromoteCallback&) { | 12 const PromoteCallback&) { |
| 14 if (UpgradeDetector::GetInstance()->notify_upgrade()) | 13 if (UpgradeDetector::GetInstance()->notify_upgrade()) |
| 15 status_callback.Run(NEARLY_UPDATED, 0, base::string16()); | 14 status_callback.Run(NEARLY_UPDATED, 0, base::string16()); |
| 16 else | 15 else |
| 17 status_callback.Run(DISABLED, 0, base::string16()); | 16 status_callback.Run(DISABLED, 0, base::string16()); |
| 18 } | 17 } |
| 19 | 18 |
| 20 void VersionUpdaterBasic::RelaunchBrowser() const { | |
| 21 chrome::AttemptRestart(); | |
| 22 } | |
| 23 | |
| 24 VersionUpdater* VersionUpdater::Create(content::WebContents* web_contents) { | 19 VersionUpdater* VersionUpdater::Create(content::WebContents* web_contents) { |
| 25 return new VersionUpdaterBasic; | 20 return new VersionUpdaterBasic; |
| 26 } | 21 } |
| OLD | NEW |