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

Unified Diff: chromeos/dbus/session_manager_client.cc

Issue 176693003: chromeos: Make dbus::MessageReader memory ownership explicit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary reinterpret_cast Created 6 years, 10 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/debug_daemon_client.cc ('k') | content/browser/geolocation/wifi_data_provider_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/session_manager_client.cc
diff --git a/chromeos/dbus/session_manager_client.cc b/chromeos/dbus/session_manager_client.cc
index 7def286cda74cd1d982eea943fa10d92a0d5f8b3..c01f28f759002025b96366e910dc75f74e3c946b 100644
--- a/chromeos/dbus/session_manager_client.cc
+++ b/chromeos/dbus/session_manager_client.cc
@@ -403,14 +403,14 @@ class SessionManagerClientImpl : public SessionManagerClient {
return;
}
dbus::MessageReader reader(response);
- uint8* values = NULL;
+ const uint8* values = NULL;
size_t length = 0;
if (!reader.PopArrayOfBytes(&values, &length)) {
LOG(ERROR) << "Invalid response: " << response->ToString();
return;
}
// static_cast does not work due to signedness.
- extracted->assign(reinterpret_cast<char*>(values), length);
+ extracted->assign(reinterpret_cast<const char*>(values), length);
}
// Called when kSessionManagerRetrievePolicy or
« no previous file with comments | « chromeos/dbus/debug_daemon_client.cc ('k') | content/browser/geolocation/wifi_data_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698