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

Side by Side Diff: dbus/message.cc

Issue 893663002: Enhance the DBus interface for peerd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
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 #include "dbus/message.h" 5 #include "dbus/message.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 bool MessageReader::PopArrayOfStrings( 830 bool MessageReader::PopArrayOfStrings(
831 std::vector<std::string> *strings) { 831 std::vector<std::string> *strings) {
832 strings->clear(); 832 strings->clear();
833 MessageReader array_reader(message_); 833 MessageReader array_reader(message_);
834 if (!PopArray(&array_reader)) 834 if (!PopArray(&array_reader))
835 return false; 835 return false;
836 while (array_reader.HasMoreData()) { 836 while (array_reader.HasMoreData()) {
837 std::string string; 837 std::string string;
838 if (!array_reader.PopString(&string)) 838 if (!array_reader.PopString(&string))
839 return false; 839 return false;
840 strings->push_back(string); 840 strings->push_back(std::move(string));
satorux1 2015/02/05 08:20:15 This change seems to be unrelated to the purpose o
hashimoto 2015/02/05 09:51:12 move semantics is not allowed yet. http://chromium
dtapuska 2015/02/05 19:51:17 Done.
841 } 841 }
842 return true; 842 return true;
843 } 843 }
844 844
845 bool MessageReader::PopArrayOfObjectPaths( 845 bool MessageReader::PopArrayOfObjectPaths(
846 std::vector<ObjectPath> *object_paths) { 846 std::vector<ObjectPath> *object_paths) {
847 object_paths->clear(); 847 object_paths->clear();
848 MessageReader array_reader(message_); 848 MessageReader array_reader(message_);
849 if (!PopArray(&array_reader)) 849 if (!PopArray(&array_reader))
850 return false; 850 return false;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd); 992 const bool success = PopBasic(DBUS_TYPE_UNIX_FD, &fd);
993 if (!success) 993 if (!success)
994 return false; 994 return false;
995 995
996 value->PutValue(fd); 996 value->PutValue(fd);
997 // NB: the caller must check validity before using the value 997 // NB: the caller must check validity before using the value
998 return true; 998 return true;
999 } 999 }
1000 1000
1001 } // namespace dbus 1001 } // namespace dbus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698