OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/timer.h" |
| 10 #include "chrome/browser/chromeos/cros/update_library.h" |
| 11 #include "chrome/browser/upgrade_detector.h" |
| 12 |
| 13 template <typename T> struct DefaultSingletonTraits; |
| 14 |
| 15 class UpgradeDetectorChromeos : public UpgradeDetector, |
| 16 public chromeos::UpdateLibrary::Observer { |
| 17 public: |
| 18 virtual ~UpgradeDetectorChromeos(); |
| 19 |
| 20 static UpgradeDetectorChromeos* GetInstance(); |
| 21 |
| 22 private: |
| 23 friend struct DefaultSingletonTraits<UpgradeDetectorChromeos>; |
| 24 |
| 25 UpgradeDetectorChromeos(); |
| 26 |
| 27 // chromeos::UpdateLibrary::Observer implementation. |
| 28 virtual void UpdateStatusChanged(chromeos::UpdateLibrary* library); |
| 29 |
| 30 // The function that sends out a notification (after a certain time has |
| 31 // elapsed) that lets the rest of the UI know we should start notifying the |
| 32 // user that a new version is available. |
| 33 void NotifyOnUpgrade(); |
| 34 |
| 35 // After we detect an upgrade we start a recurring timer to see if enough time |
| 36 // has passed and we should start notifying the user. |
| 37 base::RepeatingTimer<UpgradeDetectorChromeos> upgrade_notification_timer_; |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_CHROMEOS_UPGRADE_DETECTOR_CHROMEOS_H_ |
OLD | NEW |