Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |