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

Unified Diff: base/i18n/char_iterator.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « base/i18n/char_iterator.h ('k') | base/i18n/char_iterator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/char_iterator.cc
diff --git a/base/i18n/char_iterator.cc b/base/i18n/char_iterator.cc
deleted file mode 100644
index 25efc518694c0fd480253b82f9e55dd3b598d406..0000000000000000000000000000000000000000
--- a/base/i18n/char_iterator.cc
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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 "base/i18n/char_iterator.h"
-
-#include "third_party/icu/source/common/unicode/utf8.h"
-#include "third_party/icu/source/common/unicode/utf16.h"
-
-namespace base {
-namespace i18n {
-
-UTF8CharIterator::UTF8CharIterator(const std::string* str)
- : str_(reinterpret_cast<const uint8_t*>(str->data())),
- len_(str->size()),
- array_pos_(0),
- next_pos_(0),
- char_pos_(0),
- char_(0) {
- if (len_)
- U8_NEXT(str_, next_pos_, len_, char_);
-}
-
-UTF8CharIterator::~UTF8CharIterator() {
-}
-
-bool UTF8CharIterator::Advance() {
- if (array_pos_ >= len_)
- return false;
-
- array_pos_ = next_pos_;
- char_pos_++;
- if (next_pos_ < len_)
- U8_NEXT(str_, next_pos_, len_, char_);
-
- return true;
-}
-
-UTF16CharIterator::UTF16CharIterator(const string16* str)
- : str_(reinterpret_cast<const char16*>(str->data())),
- len_(str->size()),
- array_pos_(0),
- next_pos_(0),
- char_pos_(0),
- char_(0) {
- if (len_)
- ReadChar();
-}
-
-UTF16CharIterator::UTF16CharIterator(const char16* str, size_t str_len)
- : str_(str),
- len_(str_len),
- array_pos_(0),
- next_pos_(0),
- char_pos_(0),
- char_(0) {
- if (len_)
- ReadChar();
-}
-
-UTF16CharIterator::~UTF16CharIterator() {
-}
-
-bool UTF16CharIterator::Advance() {
- if (array_pos_ >= len_)
- return false;
-
- array_pos_ = next_pos_;
- char_pos_++;
- if (next_pos_ < len_)
- ReadChar();
-
- return true;
-}
-
-void UTF16CharIterator::ReadChar() {
- // This is actually a huge macro, so is worth having in a separate function.
- U16_NEXT(str_, next_pos_, len_, char_);
-}
-
-} // namespace i18n
-} // namespace base
« no previous file with comments | « base/i18n/char_iterator.h ('k') | base/i18n/char_iterator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698