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

Unified Diff: chromeos/dbus/update_engine_client.cc

Issue 10024054: chromeos: Convert D-Bus client classes' callback arguments to const reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/dbus/update_engine_client.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/update_engine_client.cc
diff --git a/chromeos/dbus/update_engine_client.cc b/chromeos/dbus/update_engine_client.cc
index 55f5c68e032abc68f52e10bcea41beb9ab26c9ae..5e3e21ac31940afab498842bd97f7bedb552c793 100644
--- a/chromeos/dbus/update_engine_client.cc
+++ b/chromeos/dbus/update_engine_client.cc
@@ -87,7 +87,8 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
}
// UpdateEngineClient override.
- virtual void RequestUpdateCheck(UpdateCheckCallback callback) OVERRIDE {
+ virtual void RequestUpdateCheck(
+ const UpdateCheckCallback& callback) OVERRIDE {
dbus::MethodCall method_call(
update_engine::kUpdateEngineInterface,
update_engine::kAttemptUpdate);
@@ -135,7 +136,8 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
}
// UpdateEngineClient override.
- virtual void GetReleaseTrack(GetReleaseTrackCallback callback) OVERRIDE {
+ virtual void GetReleaseTrack(
+ const GetReleaseTrackCallback& callback) OVERRIDE {
dbus::MethodCall method_call(
update_engine::kUpdateEngineInterface,
update_engine::kGetTrack);
@@ -156,7 +158,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
private:
// Called when a response for RequestUpdateCheck() is received.
- void OnRequestUpdateCheck(UpdateCheckCallback callback,
+ void OnRequestUpdateCheck(const UpdateCheckCallback& callback,
dbus::Response* response) {
if (!response) {
LOG(ERROR) << "Failed to request update check";
@@ -183,7 +185,7 @@ class UpdateEngineClientImpl : public UpdateEngineClient {
}
// Called when a response for GetReleaseTrack() is received.
- void OnGetReleaseTrack(GetReleaseTrackCallback callback,
+ void OnGetReleaseTrack(const GetReleaseTrackCallback& callback,
dbus::Response* response) {
if (!response) {
LOG(ERROR) << "Failed to request getting release track";
@@ -254,12 +256,14 @@ class UpdateEngineClientStubImpl : public UpdateEngineClient {
virtual void RemoveObserver(Observer* observer) OVERRIDE {}
virtual bool HasObserver(Observer* observer) OVERRIDE { return false; }
- virtual void RequestUpdateCheck(UpdateCheckCallback callback) OVERRIDE {
+ virtual void RequestUpdateCheck(
+ const UpdateCheckCallback& callback) OVERRIDE {
callback.Run(UPDATE_RESULT_NOTIMPLEMENTED);
}
virtual void RebootAfterUpdate() OVERRIDE {}
virtual void SetReleaseTrack(const std::string& track) OVERRIDE {}
- virtual void GetReleaseTrack(GetReleaseTrackCallback callback) OVERRIDE {
+ virtual void GetReleaseTrack(
+ const GetReleaseTrackCallback& callback) OVERRIDE {
callback.Run("beta-channel");
}
virtual Status GetLastStatus() OVERRIDE { return Status(); }
« no previous file with comments | « chromeos/dbus/update_engine_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698