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

Side by Side Diff: chromeos/dbus/update_engine_client.h

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 years, 1 month 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
« no previous file with comments | « chromeos/dbus/system_clock_client.cc ('k') | chromeos/dbus/update_engine_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_
6 #define CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ 6 #define CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // Called when the status is updated. 68 // Called when the status is updated.
69 virtual void UpdateStatusChanged(const Status& status) {} 69 virtual void UpdateStatusChanged(const Status& status) {}
70 }; 70 };
71 71
72 virtual ~UpdateEngineClient(); 72 virtual ~UpdateEngineClient();
73 73
74 // Adds and removes the observer. 74 // Adds and removes the observer.
75 virtual void AddObserver(Observer* observer) = 0; 75 virtual void AddObserver(Observer* observer) = 0;
76 virtual void RemoveObserver(Observer* observer) = 0; 76 virtual void RemoveObserver(Observer* observer) = 0;
77 // Returns true if this object has the given observer. 77 // Returns true if this object has the given observer.
78 virtual bool HasObserver(Observer* observer) = 0; 78 virtual bool HasObserver(const Observer* observer) const = 0;
79 79
80 // Called once RequestUpdateCheck() is complete. Takes one parameter: 80 // Called once RequestUpdateCheck() is complete. Takes one parameter:
81 // - UpdateCheckResult: the result of the update check. 81 // - UpdateCheckResult: the result of the update check.
82 typedef base::Callback<void(UpdateCheckResult)> UpdateCheckCallback; 82 typedef base::Callback<void(UpdateCheckResult)> UpdateCheckCallback;
83 83
84 // Requests an update check and calls |callback| when completed. 84 // Requests an update check and calls |callback| when completed.
85 virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) = 0; 85 virtual void RequestUpdateCheck(const UpdateCheckCallback& callback) = 0;
86 86
87 // Reboots if update has been performed. 87 // Reboots if update has been performed.
88 virtual void RebootAfterUpdate() = 0; 88 virtual void RebootAfterUpdate() = 0;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Create() should be used instead. 144 // Create() should be used instead.
145 UpdateEngineClient(); 145 UpdateEngineClient();
146 146
147 private: 147 private:
148 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient); 148 DISALLOW_COPY_AND_ASSIGN(UpdateEngineClient);
149 }; 149 };
150 150
151 } // namespace chromeos 151 } // namespace chromeos
152 152
153 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_ 153 #endif // CHROMEOS_DBUS_UPDATE_ENGINE_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/system_clock_client.cc ('k') | chromeos/dbus/update_engine_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698