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

Unified Diff: components/payments/core/currency_formatter.h

Issue 2713033004: Layered component for web payments (Closed)
Patch Set: Rebase Created 3 years, 10 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
Index: components/payments/core/currency_formatter.h
diff --git a/components/payments/currency_formatter.h b/components/payments/core/currency_formatter.h
similarity index 86%
rename from components/payments/currency_formatter.h
rename to components/payments/core/currency_formatter.h
index 1995476c2faf046305149b76071216db3ce91a1a..eec9d66bf170158a2a4262d5318356b300917ae3 100644
--- a/components/payments/currency_formatter.h
+++ b/components/payments/core/currency_formatter.h
@@ -2,16 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
-#define COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
+#ifndef COMPONENTS_PAYMENTS_CORE_CURRENCY_FORMATTER_H_
+#define COMPONENTS_PAYMENTS_CORE_CURRENCY_FORMATTER_H_
#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/optional.h"
#include "base/strings/string16.h"
#include "third_party/icu/source/common/unicode/locid.h"
+#include "third_party/icu/source/common/unicode/unistr.h"
#include "third_party/icu/source/i18n/unicode/numfmt.h"
namespace payments {
@@ -43,7 +43,9 @@ class CurrencyFormatter {
// Returns the formatted currency code (<= 6 characters including ellipsis if
// applicable).
- std::string formatted_currency_code() { return formatted_currency_code_; }
+ const std::string& formatted_currency_code() const {
+ return formatted_currency_code_;
+ }
private:
const icu::Locale locale_;
@@ -56,4 +58,4 @@ class CurrencyFormatter {
} // namespace payments
-#endif // COMPONENTS_PAYMENTS_CURRENCY_FORMATTER_H_
+#endif // COMPONENTS_PAYMENTS_CORE_CURRENCY_FORMATTER_H_
« no previous file with comments | « components/payments/core/address_normalizer_unittest.cc ('k') | components/payments/core/currency_formatter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698