| 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 "chromeos/dbus/ibus/ibus_property.h" | 5 #include "chromeos/dbus/ibus/ibus_property.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chromeos/dbus/ibus/ibus_object.h" | 9 #include "chromeos/dbus/ibus/ibus_object.h" |
| 10 #include "chromeos/dbus/ibus/ibus_text.h" | 10 #include "chromeos/dbus/ibus/ibus_text.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 IBusObjectReader ibus_property_reader("IBusPropList", reader); | 121 IBusObjectReader ibus_property_reader("IBusPropList", reader); |
| 122 if (!ibus_property_reader.Init()) | 122 if (!ibus_property_reader.Init()) |
| 123 return false; | 123 return false; |
| 124 | 124 |
| 125 dbus::MessageReader property_array_reader(NULL); | 125 dbus::MessageReader property_array_reader(NULL); |
| 126 if (!ibus_property_reader.PopArray(&property_array_reader)) { | 126 if (!ibus_property_reader.PopArray(&property_array_reader)) { |
| 127 LOG(ERROR) << "Invalid variant structure[IBusPropList]: " | 127 LOG(ERROR) << "Invalid variant structure[IBusPropList]: " |
| 128 << "1st argument should be array."; | 128 << "1st argument should be array."; |
| 129 return false; | 129 return false; |
| 130 } | 130 } |
| 131 property_list->reset(); | 131 property_list->clear(); |
| 132 while (property_array_reader.HasMoreData()) { | 132 while (property_array_reader.HasMoreData()) { |
| 133 IBusProperty* property = new IBusProperty; | 133 IBusProperty* property = new IBusProperty; |
| 134 if (!PopIBusProperty(&property_array_reader, property)) { | 134 if (!PopIBusProperty(&property_array_reader, property)) { |
| 135 LOG(ERROR) << "Invalid variant structure[IBusPropList]: " | 135 LOG(ERROR) << "Invalid variant structure[IBusPropList]: " |
| 136 << "1st argument should be array of IBusProperty."; | 136 << "1st argument should be array of IBusProperty."; |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 property_list->push_back(property); | 139 property_list->push_back(property); |
| 140 } | 140 } |
| 141 | 141 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 /////////////////////////////////////////////////////////////////////////////// | 175 /////////////////////////////////////////////////////////////////////////////// |
| 176 // IBusProperty | 176 // IBusProperty |
| 177 IBusProperty::IBusProperty() { | 177 IBusProperty::IBusProperty() { |
| 178 } | 178 } |
| 179 | 179 |
| 180 IBusProperty::~IBusProperty() { | 180 IBusProperty::~IBusProperty() { |
| 181 } | 181 } |
| 182 | 182 |
| 183 } // namespace ibus | 183 } // namespace ibus |
| 184 } // namespace chromeos | 184 } // namespace chromeos |
| OLD | NEW |