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

Side by Side Diff: chrome/browser/chromeos/cros/update_library.h

Issue 7672002: cros: Apply the Init() model to UpdateLibrary API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mock Created 9 years, 4 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ 6 #define CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class Observer { 48 class Observer {
49 public: 49 public:
50 virtual ~Observer() {} 50 virtual ~Observer() {}
51 51
52 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0; 52 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0;
53 }; 53 };
54 54
55 virtual ~UpdateLibrary() {} 55 virtual ~UpdateLibrary() {}
56 56
57 virtual void Init() = 0;
58
57 virtual void AddObserver(Observer* observer) = 0; 59 virtual void AddObserver(Observer* observer) = 0;
58 virtual void RemoveObserver(Observer* observer) = 0; 60 virtual void RemoveObserver(Observer* observer) = 0;
59 virtual bool HasObserver(Observer* observer) = 0; 61 virtual bool HasObserver(Observer* observer) = 0;
60 62
61 // Requests an update check and calls |callback| when completed. 63 // Requests an update check and calls |callback| when completed.
62 virtual void RequestUpdateCheck(chromeos::UpdateCallback callback, 64 virtual void RequestUpdateCheck(chromeos::UpdateCallback callback,
63 void* user_data) = 0; 65 void* user_data) = 0;
64 66
65 // Reboots if update has been performed. 67 // Reboots if update has been performed.
66 virtual bool RebootAfterUpdate() = 0; 68 virtual bool RebootAfterUpdate() = 0;
(...skipping 10 matching lines...) Expand all
77 virtual const Status& status() const = 0; 79 virtual const Status& status() const = 0;
78 80
79 // Factory function, creates a new instance and returns ownership. 81 // Factory function, creates a new instance and returns ownership.
80 // For normal usage, access the singleton via CrosLibrary::Get(). 82 // For normal usage, access the singleton via CrosLibrary::Get().
81 static UpdateLibrary* GetImpl(bool stub); 83 static UpdateLibrary* GetImpl(bool stub);
82 }; 84 };
83 85
84 } // namespace chromeos 86 } // namespace chromeos
85 87
86 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ 88 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mock_update_library.h ('k') | chrome/browser/chromeos/cros/update_library.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698