Chromium Code Reviews| Index: chrome/browser/upgrade_detector_impl.h |
| diff --git a/chrome/browser/upgrade_detector_impl.h b/chrome/browser/upgrade_detector_impl.h |
| index 435d294b662f214c6a3edca76eb124527b723ba8..7f9f727b112fbffc80b2753068e29ce962e5bd4e 100644 |
| --- a/chrome/browser/upgrade_detector_impl.h |
| +++ b/chrome/browser/upgrade_detector_impl.h |
| @@ -23,18 +23,33 @@ class UpgradeDetectorImpl : public UpgradeDetector { |
| UpgradeDetectorImpl(); |
| + // Start the timer that will call |CheckForUpgrade()|. |
| + void StartTimerForUpgradeCheck(); |
| + |
| // Launches a task on the file thread to check if we have the latest version. |
| void CheckForUpgrade(); |
| // Sends out a notification and starts a one shot timer to wait until |
| // notifying the user. |
| - void UpgradeDetected(); |
| + void UpgradeDetected(UpgradeAvailable upgrade_available); |
| + |
| + // Returns true after calling UpgradeDetected if current install is outdated. |
| + bool DetectOutdatedInstall(); |
| // The function that sends out a notification (after a certain time has |
| // elapsed) that lets the rest of the UI know we should start notifying the |
| // user that a new version is available. |
| void NotifyOnUpgrade(); |
| + // Called on the FILE thread to detect an upgrade. Calls back UpgradeDetected |
| + // on the UI thread if so. Although it looks weird, this needs to be a static |
| + // method receiving a WeakPtr<> to the this pointer so that we can interrupt |
|
Finnur
2013/02/07 09:17:44
nit: s/the this pointer/this object/
MAD
2013/02/07 14:46:45
Done.
|
| + // it. Having this method non-static and using the this pointer directly |
|
Finnur
2013/02/07 09:17:44
nit: s/it/this task before it runs/
nit: s/the thi
MAD
2013/02/07 14:46:45
Done.
|
| + // wouldn't be thread safe. And keeping it as a non-class function would |
| + // prevent it from calling UpgradeDetected. |
| + static void DetectUpgradeTask( |
| + base::WeakPtr<UpgradeDetectorImpl> upgrade_detector); |
| + |
| // We periodically check to see if Chrome has been upgraded. |
| base::RepeatingTimer<UpgradeDetectorImpl> detect_upgrade_timer_; |
| @@ -50,6 +65,9 @@ class UpgradeDetectorImpl : public UpgradeDetector { |
| // True if this build is a dev or canary channel build. |
| bool is_unstable_channel_; |
| + // The date the binaries were built. |
| + base::Time build_date_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(UpgradeDetectorImpl); |
| }; |