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

Unified Diff: ui/base/l10n/formatter.h

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/base/ime/win/imm32_manager.cc ('k') | ui/base/l10n/formatter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/formatter.h
diff --git a/ui/base/l10n/formatter.h b/ui/base/l10n/formatter.h
index fa3936c66489197a22f328b6e8f72f1738e15ef5..44b1ddc328239d6fc28c005e6cd72dcde4f06d79 100644
--- a/ui/base/l10n/formatter.h
+++ b/ui/base/l10n/formatter.h
@@ -8,9 +8,10 @@
#ifndef UI_BASE_L10N_FORMATTER_H_
#define UI_BASE_L10N_FORMATTER_H_
+#include <memory>
+
#include "base/lazy_instance.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "third_party/icu/source/common/unicode/unistr.h"
#include "third_party/icu/source/i18n/unicode/msgfmt.h"
#include "third_party/icu/source/i18n/unicode/plurrule.h"
@@ -66,14 +67,15 @@ class Formatter {
private:
// Create a hard-coded fallback message format for plural formatting.
// This will never be called unless translators make a mistake.
- scoped_ptr<icu::MessageFormat> CreateFallbackFormat(
+ std::unique_ptr<icu::MessageFormat> CreateFallbackFormat(
const icu::PluralRules& rules,
const Pluralities& pluralities) const;
- scoped_ptr<icu::MessageFormat> InitFormat(const Pluralities& pluralities);
+ std::unique_ptr<icu::MessageFormat> InitFormat(
+ const Pluralities& pluralities);
- scoped_ptr<icu::MessageFormat> simple_format_[UNIT_COUNT];
- scoped_ptr<icu::MessageFormat> detailed_format_[TWO_UNITS_COUNT][2];
+ std::unique_ptr<icu::MessageFormat> simple_format_[UNIT_COUNT];
+ std::unique_ptr<icu::MessageFormat> detailed_format_[TWO_UNITS_COUNT][2];
DISALLOW_IMPLICIT_CONSTRUCTORS(Formatter);
};
@@ -96,8 +98,8 @@ class UI_BASE_EXPORT FormatterContainer {
void Initialize();
void Shutdown();
- scoped_ptr<Formatter>
- formatter_[TimeFormat::FORMAT_COUNT][TimeFormat::LENGTH_COUNT];
+ std::unique_ptr<Formatter> formatter_[TimeFormat::FORMAT_COUNT]
+ [TimeFormat::LENGTH_COUNT];
DISALLOW_COPY_AND_ASSIGN(FormatterContainer);
};
« no previous file with comments | « ui/base/ime/win/imm32_manager.cc ('k') | ui/base/l10n/formatter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698