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

Unified Diff: ui/gfx/text_utils.cc

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 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 | « ui/gfx/text_utils.h ('k') | ui/gfx/text_utils_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/text_utils.cc
diff --git a/ui/gfx/text_utils.cc b/ui/gfx/text_utils.cc
deleted file mode 100644
index a31ef3d3cc999cd844fb4042b17628b9db976bcf..0000000000000000000000000000000000000000
--- a/ui/gfx/text_utils.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 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 "ui/gfx/text_utils.h"
-
-#include "base/i18n/char_iterator.h"
-
-namespace gfx {
-
-base::string16 RemoveAcceleratorChar(const base::string16& s,
- base::char16 accelerator_char,
- int* accelerated_char_pos,
- int* accelerated_char_span) {
- bool escaped = false;
- ptrdiff_t last_char_pos = -1;
- int last_char_span = 0;
- base::i18n::UTF16CharIterator chars(&s);
- base::string16 accelerator_removed;
-
- accelerator_removed.reserve(s.size());
- while (!chars.end()) {
- int32 c = chars.get();
- int array_pos = chars.array_pos();
- chars.Advance();
-
- if (c != accelerator_char || escaped) {
- int span = chars.array_pos() - array_pos;
- if (escaped && c != accelerator_char) {
- last_char_pos = accelerator_removed.size();
- last_char_span = span;
- }
- for (int i = 0; i < span; i++)
- accelerator_removed.push_back(s[array_pos + i]);
- escaped = false;
- } else {
- escaped = true;
- }
- }
-
- if (accelerated_char_pos)
- *accelerated_char_pos = last_char_pos;
- if (accelerated_char_span)
- *accelerated_char_span = last_char_span;
-
- return accelerator_removed;
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gfx/text_utils.h ('k') | ui/gfx/text_utils_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698