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

Unified Diff: chromeos/ime/composition_text.h

Issue 163023002: Use base::string16 for CompositionText.Text instead of converting to utf-8 and back unnecessarily. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test compile 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
Index: chromeos/ime/composition_text.h
diff --git a/chromeos/ime/composition_text.h b/chromeos/ime/composition_text.h
index c93c86841a784fb34f5dcbc716b86ba984d56cee..b79efd9b34ac51df41de7697a1c9ee7a70194b84 100644
--- a/chromeos/ime/composition_text.h
+++ b/chromeos/ime/composition_text.h
@@ -7,7 +7,9 @@
#include <string>
#include <vector>
+
#include "base/basictypes.h"
+#include "base/strings/string16.h"
#include "chromeos/chromeos_export.h"
namespace chromeos {
@@ -30,8 +32,8 @@ class CHROMEOS_EXPORT CompositionText {
virtual ~CompositionText();
// Accessors
- const std::string& text() const { return text_; }
- void set_text(const std::string& text) { text_ = text; }
+ const base::string16& text() const { return text_; }
+ void set_text(const base::string16& text) { text_ = text; }
const std::vector<UnderlineAttribute>& underline_attributes() const {
return underline_attributes_;
@@ -54,7 +56,7 @@ class CHROMEOS_EXPORT CompositionText {
void CopyFrom(const CompositionText& obj);
private:
- std::string text_;
+ base::string16 text_;
std::vector<UnderlineAttribute> underline_attributes_;
uint32 selection_start_;
uint32 selection_end_;
« no previous file with comments | « chrome/browser/chromeos/input_method/input_method_engine_browsertests.cc ('k') | chromeos/ime/composition_text_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698