Index: base/i18n/bidi_line_iterator.cc |
diff --git a/app/bidi_line_iterator.cc b/base/i18n/bidi_line_iterator.cc |
similarity index 78% |
rename from app/bidi_line_iterator.cc |
rename to base/i18n/bidi_line_iterator.cc |
index 3312ef0685d880b8ba721b546f577cb2065c82dd..8610a2156b74e8fce02b30380ee0770b59becbbe 100644 |
--- a/app/bidi_line_iterator.cc |
+++ b/base/i18n/bidi_line_iterator.cc |
@@ -1,13 +1,18 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2011 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 "app/bidi_line_iterator.h" |
+#include "base/i18n/bidi_line_iterator.h" |
#include "base/logging.h" |
-#include "base/string16.h" |
#include "base/utf_string_conversions.h" |
+namespace base { |
+namespace i18n { |
+ |
+BiDiLineIterator::BiDiLineIterator() : bidi_(NULL) { |
+} |
+ |
BiDiLineIterator::~BiDiLineIterator() { |
if (bidi_) { |
ubidi_close(bidi_); |
@@ -15,9 +20,9 @@ BiDiLineIterator::~BiDiLineIterator() { |
} |
} |
-UBool BiDiLineIterator::Open(const string16& text, |
- bool right_to_left, |
- bool url) { |
+bool BiDiLineIterator::Open(const string16& text, |
+ bool right_to_left, |
+ bool url) { |
DCHECK(bidi_ == NULL); |
UErrorCode error = U_ZERO_ERROR; |
bidi_ = ubidi_openSized(static_cast<int>(text.length()), 0, &error); |
@@ -51,3 +56,6 @@ void BiDiLineIterator::GetLogicalRun(int start, |
DCHECK(bidi_ != NULL); |
ubidi_getLogicalRun(bidi_, start, end, level); |
} |
+ |
+} // namespace i18n |
+} // namespace base |