[LSC] Replace base::string16 in //components/{omnibox,password_manager}
This change replaces base::string16 with std::u16string in
//components/omnibox and //components/password_manager.
Reproduction steps:
$ git grep -lw 'base::string16' components/{omnibox,password_manager} \
| xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format
Bug: 1184339
Change-Id: I074b918355ad76537460b4623efe856f94886773
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2751106
Auto-Submit: Jan Wilken Dörrie <[email protected]>
Commit-Queue: Daniel Cheng <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Owners-Override: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#862296}
diff --git a/components/omnibox/browser/clipboard_provider.cc b/components/omnibox/browser/clipboard_provider.cc
index 0078dab..b19ad9c 100644
--- a/components/omnibox/browser/clipboard_provider.cc
+++ b/components/omnibox/browser/clipboard_provider.cc
@@ -250,10 +250,10 @@
// If the omnibox is not empty, add a default match.
// This match will be opened when the user presses "Enter".
if (!input.text().empty()) {
- const base::string16 description =
+ const std::u16string description =
(base::FeatureList::IsEnabled(omnibox::kDisplayTitleForCurrentUrl))
? input.current_title()
- : base::string16();
+ : std::u16string();
AutocompleteMatch verbatim_match = VerbatimMatchForURL(
this, client_, input, input.current_url(), description, -1);
matches_.push_back(verbatim_match);
@@ -362,13 +362,13 @@
const AutocompleteInput& input,
bool* read_clipboard_content) {
*read_clipboard_content = false;
- base::Optional<base::string16> optional_text =
+ base::Optional<std::u16string> optional_text =
clipboard_content_->GetRecentTextFromClipboard();
if (!optional_text)
return base::nullopt;
*read_clipboard_content = true;
- base::string16 text = std::move(optional_text).value();
+ std::u16string text = std::move(optional_text).value();
// The clipboard can contain the empty string, which shouldn't be suggested.
if (text.empty())
@@ -475,7 +475,7 @@
}
base::Optional<AutocompleteMatch> ClipboardProvider::NewClipboardTextMatch(
- base::string16 text) {
+ std::u16string text) {
// The text in the clipboard is a url. We don't want to prompt the user to
// search for a url.
if (GURL(text).is_valid())