diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-01 11:08:40 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-10-01 12:16:21 +0000 |
commit | 03c549e0392f92c02536d3f86d5e1d8dfa3435ac (patch) | |
tree | fe49d170a929b34ba82cd10db1a0bd8e3760fa4b /chromium/base/values.cc | |
parent | 5d013f5804a0d91fcf6c626b2d6fb6eca5c845b0 (diff) |
BASELINE: Update Chromium to 91.0.4472.160
Change-Id: I0def1f08a2412aeed79a9ab95dd50eb5c3f65f31
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/base/values.cc')
-rw-r--r-- | chromium/base/values.cc | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/chromium/base/values.cc b/chromium/base/values.cc index 388bd76d97c..0909a08ee41 100644 --- a/chromium/base/values.cc +++ b/chromium/base/values.cc @@ -11,6 +11,7 @@ #include <ostream> #include <utility> +#include "base/as_const.h" #include "base/bit_cast.h" #include "base/check_op.h" #include "base/containers/checked_iterators.h" @@ -204,7 +205,7 @@ Value::Value(std::string&& in_string) noexcept : data_(std::move(in_string)) { DCHECK(IsStringUTF8AllowingNoncharacters(GetString())); } -Value::Value(const char16* in_string16) : Value(StringPiece16(in_string16)) {} +Value::Value(const char16_t* in_string16) : Value(StringPiece16(in_string16)) {} Value::Value(StringPiece16 in_string16) : Value(UTF16ToUTF8(in_string16)) {} @@ -367,7 +368,7 @@ void Value::Append(std::string&& value) { list().emplace_back(std::move(value)); } -void Value::Append(const char16* value) { +void Value::Append(const char16_t* value) { list().emplace_back(value); } @@ -834,7 +835,7 @@ bool Value::GetAsString(std::string* out_value) const { return is_string(); } -bool Value::GetAsString(string16* out_value) const { +bool Value::GetAsString(std::u16string* out_value) const { if (out_value && is_string()) { *out_value = UTF8ToUTF16(GetString()); return true; @@ -1144,7 +1145,8 @@ Value* DictionaryValue::SetString(StringPiece path, StringPiece in_value) { return Set(path, std::make_unique<Value>(in_value)); } -Value* DictionaryValue::SetString(StringPiece path, const string16& in_value) { +Value* DictionaryValue::SetString(StringPiece path, + const std::u16string& in_value) { return Set(path, std::make_unique<Value>(in_value)); } @@ -1219,7 +1221,8 @@ bool DictionaryValue::GetString(StringPiece path, return value->GetAsString(out_value); } -bool DictionaryValue::GetString(StringPiece path, string16* out_value) const { +bool DictionaryValue::GetString(StringPiece path, + std::u16string* out_value) const { const Value* value; if (!Get(path, &value)) return false; @@ -1351,8 +1354,9 @@ bool DictionaryValue::GetStringWithoutPathExpansion( return value->GetAsString(out_value); } -bool DictionaryValue::GetStringWithoutPathExpansion(StringPiece key, - string16* out_value) const { +bool DictionaryValue::GetStringWithoutPathExpansion( + StringPiece key, + std::u16string* out_value) const { const Value* value; if (!GetWithoutPathExpansion(key, &value)) return false; @@ -1558,7 +1562,7 @@ bool ListValue::GetString(size_t index, std::string* out_value) const { return value->GetAsString(out_value); } -bool ListValue::GetString(size_t index, string16* out_value) const { +bool ListValue::GetString(size_t index, std::u16string* out_value) const { const Value* value; if (!Get(index, &value)) return false; @@ -1656,7 +1660,7 @@ void ListValue::AppendString(StringPiece in_value) { list().emplace_back(in_value); } -void ListValue::AppendString(const string16& in_value) { +void ListValue::AppendString(const std::u16string& in_value) { list().emplace_back(in_value); } |