Upload upstream chromium 108.0.5359.1
[platform/framework/web/chromium-efl.git] / components / login / localized_values_builder.h
index 8c1731c..14fde25 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -7,22 +7,15 @@
 
 #include <string>
 
-#include "base/macros.h"
-#include "base/strings/string16.h"
+#include "base/values.h"
 #include "components/login/login_export.h"
 
-namespace base {
-class DictionaryValue;
-}
-
 namespace login {
 
 // Class that collects Localized Values for translation.
 class LOGIN_EXPORT LocalizedValuesBuilder {
  public:
-  explicit LocalizedValuesBuilder(base::DictionaryValue* dict);
-  explicit LocalizedValuesBuilder(const std::string& prefix,
-                                  base::DictionaryValue* dict);
+  explicit LocalizedValuesBuilder(base::Value::Dict* dict);
 
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message| is text of the message.
@@ -30,7 +23,7 @@ class LOGIN_EXPORT LocalizedValuesBuilder {
 
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message| is text of the message.
-  void Add(const std::string& key, const base::string16& message);
+  void Add(const std::string& key, const std::u16string& message);
 
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message_id| is a resource id of message.
@@ -39,15 +32,24 @@ class LOGIN_EXPORT LocalizedValuesBuilder {
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message_id| is a resource id of message. Message is expected to have
   // one format parameter subsituted by |a|.
-  void AddF(const std::string& key, int message_id, const base::string16& a);
+  void AddF(const std::string& key, int message_id, const std::u16string& a);
 
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message_id| is a resource id of message. Message is expected to have
   // two format parameters subsituted by |a| and |b| respectively.
   void AddF(const std::string& key,
             int message_id,
-            const base::string16& a,
-            const base::string16& b);
+            const std::u16string& a,
+            const std::u16string& b);
+
+  // Method to declare localized value. |key| is the i18n key used in html.
+  // |message_id| is a resource id of message. Message is expected to have
+  // two format parameters subsituted by |a|, |b| and |c| respectively.
+  void AddF(const std::string& key,
+            int message_id,
+            const std::u16string& a,
+            const std::u16string& b,
+            const std::u16string& c);
 
   // Method to declare localized value. |key| is the i18n key used in html.
   // |message_id| is a resource id of message. Message is expected to have
@@ -63,11 +65,21 @@ class LOGIN_EXPORT LocalizedValuesBuilder {
             int message_id_a,
             int message_id_b);
 
+  // Method to declare localized value. |key| is the i18n key used in html.
+  // |message_id| is a resource id of message. Message is expected to have
+  // three format parameters subsituted by resource identified by
+  // |message_id_a|, |message_id_b| and |message_id_c| respectively.
+  void AddF(const std::string& key,
+            int message_id,
+            int message_id_a,
+            int message_id_b,
+            int message_id_c);
+
  private:
   std::string prefix_;
 
   // Not owned.
-  base::DictionaryValue* dict_;
+  base::Value::Dict* dict_;
 };
 
 }  // namespace login