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

Side by Side Diff: chrome/browser/chromeos/upgrade_detector_chromeos.h

Issue 7046096: Refactor UpgradeDetector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang bots Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
(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);
Finnur 2011/06/12 12:07:43 Does this need to be virtual?
xiyuan 2011/06/12 21:02:07 Yes because this is from UpdateLibrary::Observer i
Finnur 2011/06/12 22:19:21 Oh, then you should probably add OVERRIDE? On 201
xiyuan 2011/06/12 22:31:24 Even for pure virtual function?
Finnur 2011/06/12 22:38:29 Hmm... Good question. I don't know. You can probab
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698