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

Unified Diff: ui/gfx/text_elider.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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/sys_color_change_listener.cc ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/text_elider.cc
diff --git a/ui/gfx/text_elider.cc b/ui/gfx/text_elider.cc
index e8993d7987783c1fea03583e217e8c18b947248d..cee598d844222c2417dfb009be75b71836bc76f0 100644
--- a/ui/gfx/text_elider.cc
+++ b/ui/gfx/text_elider.cc
@@ -11,6 +11,7 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include <vector>
@@ -19,7 +20,6 @@
#include "base/i18n/char_iterator.h"
#include "base/i18n/rtl.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
@@ -198,7 +198,7 @@ base::string16 ElideText(const base::string16& text,
ElideBehavior behavior) {
#if !defined(OS_ANDROID) && !defined(OS_IOS)
DCHECK_NE(behavior, FADE_TAIL);
- scoped_ptr<RenderText> render_text(RenderText::CreateInstance());
+ std::unique_ptr<RenderText> render_text(RenderText::CreateInstance());
render_text->SetCursorEnabled(false);
// TODO(bshe): 5000 is out dated. We should remove it. See crbug.com/551660.
// Do not bother accurately sizing strings over 5000 characters here, for
@@ -773,7 +773,7 @@ base::string16 TruncateString(const base::string16& string,
if (word_break) {
// Use a word iterator to find the first boundary.
UErrorCode status = U_ZERO_ERROR;
- scoped_ptr<icu::BreakIterator> bi(
+ std::unique_ptr<icu::BreakIterator> bi(
icu::RuleBasedBreakIterator::createWordInstance(
icu::Locale::getDefault(), status));
if (U_FAILURE(status))
« no previous file with comments | « ui/gfx/sys_color_change_listener.cc ('k') | ui/gfx/text_elider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698