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

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

Issue 6648009: Modify UpdateLibrary to use async RequestUpdateCheck call (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 9 years, 9 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 virtual ~Observer() { } 55 virtual ~Observer() { }
56 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0; 56 virtual void UpdateStatusChanged(UpdateLibrary* library) = 0;
57 }; 57 };
58 58
59 // static UpdateLibrary* GetStubImplementation(); 59 // static UpdateLibrary* GetStubImplementation();
60 60
61 virtual ~UpdateLibrary() {} 61 virtual ~UpdateLibrary() {}
62 virtual void AddObserver(Observer* observer) = 0; 62 virtual void AddObserver(Observer* observer) = 0;
63 virtual void RemoveObserver(Observer* observer) = 0; 63 virtual void RemoveObserver(Observer* observer) = 0;
64 64
65 // Initiates update check and returns true if check was initiated. 65 // Requests an update check and calls |callback| when completed.
66 virtual bool CheckForUpdate() = 0; 66 virtual void RequestUpdateCheck(chromeos::UpdateCallback callback,
67 void* user_data) = 0;
67 68
68 // Reboots if update has been performed. 69 // Reboots if update has been performed.
69 virtual bool RebootAfterUpdate() = 0; 70 virtual bool RebootAfterUpdate() = 0;
70 71
71 // Sets the release track (channel). |track| should look like 72 // Sets the release track (channel). |track| should look like
72 // "beta-channel" and "dev-channel". Returns true on success. 73 // "beta-channel" and "dev-channel". Returns true on success.
73 virtual bool SetReleaseTrack(const std::string& track) = 0; 74 virtual bool SetReleaseTrack(const std::string& track) = 0;
74 75
75 // Returns the release track (channel). On error, returns an empty 76 // Returns the release track (channel). On error, returns an empty
76 // string. 77 // string.
77 virtual std::string GetReleaseTrack() = 0; 78 virtual std::string GetReleaseTrack() = 0;
78 79
79 virtual const Status& status() const = 0; 80 virtual const Status& status() const = 0;
80 81
81 // Factory function, creates a new instance and returns ownership. 82 // Factory function, creates a new instance and returns ownership.
82 // For normal usage, access the singleton via CrosLibrary::Get(). 83 // For normal usage, access the singleton via CrosLibrary::Get().
83 static UpdateLibrary* GetImpl(bool stub); 84 static UpdateLibrary* GetImpl(bool stub);
84 }; 85 };
85 86
86 } // namespace chromeos 87 } // namespace chromeos
87 88
88 #endif // CHROME_BROWSER_CHROMEOS_CROS_UPDATE_LIBRARY_H_ 89 #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