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

Unified Diff: chrome/browser/chromeos/input_method/input_method_config.cc

Issue 9701095: cleanup: Split ibus_controller.h into 5 headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fix Created 8 years, 9 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
Index: chrome/browser/chromeos/input_method/input_method_config.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_config.cc b/chrome/browser/chromeos/input_method/input_method_config.cc
new file mode 100644
index 0000000000000000000000000000000000000000..adf31a94217c8ecb5634b160f35ba6ecfd6dec1c
--- /dev/null
+++ b/chrome/browser/chromeos/input_method/input_method_config.cc
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/input_method/input_method_config.h"
+
+#include <sstream>
+
+#include "base/logging.h"
+
+namespace chromeos {
+namespace input_method {
+
+InputMethodConfigValue::InputMethodConfigValue()
+ : type(kValueTypeString),
+ int_value(0),
+ bool_value(false) {
+}
+
+InputMethodConfigValue::~InputMethodConfigValue() {
+}
+
+std::string InputMethodConfigValue::ToString() const {
+ std::stringstream stream;
+ stream << "type=" << type;
+ switch (type) {
+ case kValueTypeString:
+ stream << ", string_value=" << string_value;
+ break;
+ case kValueTypeInt:
+ stream << ", int_value=" << int_value;
+ break;
+ case kValueTypeBool:
+ stream << ", bool_value=" << (bool_value ? "true" : "false");
+ break;
+ case kValueTypeStringList:
+ stream << ", string_list_value=";
+ for (size_t i = 0; i < string_list_value.size(); ++i) {
+ if (i)
+ stream << ",";
+ stream << string_list_value[i];
+ }
+ break;
+ }
+ return stream.str();
+}
+
+} // namespace input_method
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698