[LSC] Replace base::string16 with std::u16string in //[a-e]*
This change replaces base::string16 with std::u16string in //[a-e]*.
Reproduction steps:
$ git grep -lw 'base::string16' [a-e]* | \
xargs sed -i 's/\bbase::string16\b/std::u16string/g'
$ git cl format
Bug: 1184339
Change-Id: I7930c2c3ae510b6d2232cc1b3a927ad90515ffe9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752407
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#862191}
diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc
index fa402f8..71f14652 100644
--- a/android_webview/browser/aw_autofill_client.cc
+++ b/android_webview/browser/aw_autofill_client.cc
@@ -138,13 +138,13 @@
}
void AwAutofillClient::ConfirmAccountNameFixFlow(
- base::OnceCallback<void(const base::string16&)> callback) {
+ base::OnceCallback<void(const std::u16string&)> callback) {
NOTIMPLEMENTED();
}
void AwAutofillClient::ConfirmExpirationDateFixFlow(
const autofill::CreditCard& card,
- base::OnceCallback<void(const base::string16&, const base::string16&)>
+ base::OnceCallback<void(const std::u16string&, const std::u16string&)>
callback) {
NOTIMPLEMENTED();
}
@@ -205,8 +205,8 @@
}
void AwAutofillClient::UpdateAutofillPopupDataListValues(
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels) {
+ const std::vector<std::u16string>& values,
+ const std::vector<std::u16string>& labels) {
// Leaving as an empty method since updating autofill popup window
// dynamically does not seem to be a useful feature for android webview.
// See crrev.com/18102002 if need to implement.
@@ -257,8 +257,8 @@
const std::vector<autofill::FormStructure*>& forms) {}
void AwAutofillClient::DidFillOrPreviewField(
- const base::string16& autofilled_value,
- const base::string16& profile_full_name) {}
+ const std::u16string& autofilled_value,
+ const std::u16string& profile_full_name) {}
bool AwAutofillClient::IsContextSecure() const {
content::SSLStatus ssl_status;
diff --git a/android_webview/browser/aw_autofill_client.h b/android_webview/browser/aw_autofill_client.h
index f527a28..f3e8e06 100644
--- a/android_webview/browser/aw_autofill_client.h
+++ b/android_webview/browser/aw_autofill_client.h
@@ -84,10 +84,10 @@
base::WeakPtr<autofill::CardUnmaskDelegate> delegate) override;
void OnUnmaskVerificationResult(PaymentsRpcResult result) override;
void ConfirmAccountNameFixFlow(
- base::OnceCallback<void(const base::string16&)> callback) override;
+ base::OnceCallback<void(const std::u16string&)> callback) override;
void ConfirmExpirationDateFixFlow(
const autofill::CreditCard& card,
- base::OnceCallback<void(const base::string16&, const base::string16&)>
+ base::OnceCallback<void(const std::u16string&, const std::u16string&)>
callback) override;
void ConfirmSaveCreditCardLocally(
const autofill::CreditCard& card,
@@ -110,8 +110,8 @@
const autofill::AutofillClient::PopupOpenArgs& open_args,
base::WeakPtr<autofill::AutofillPopupDelegate> delegate) override;
void UpdateAutofillPopupDataListValues(
- const std::vector<base::string16>& values,
- const std::vector<base::string16>& labels) override;
+ const std::vector<std::u16string>& values,
+ const std::vector<std::u16string>& labels) override;
base::span<const autofill::Suggestion> GetPopupSuggestions() const override;
void PinPopupView() override;
autofill::AutofillClient::PopupOpenArgs GetReopenPopupArgs() const override;
@@ -122,8 +122,8 @@
void PropagateAutofillPredictions(
content::RenderFrameHost* rfh,
const std::vector<autofill::FormStructure*>& forms) override;
- void DidFillOrPreviewField(const base::string16& autofilled_value,
- const base::string16& profile_full_name) override;
+ void DidFillOrPreviewField(const std::u16string& autofilled_value,
+ const std::u16string& profile_full_name) override;
bool IsContextSecure() const override;
bool ShouldShowSigninPromo() override;
bool AreServerCardsSupported() const override;
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index 4866c9b..c977399 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -762,7 +762,7 @@
if (client_bridge == nullptr)
return true;
- base::string16 url = base::UTF8ToUTF16(gurl.possibly_invalid_spec());
+ std::u16string url = base::UTF8ToUTF16(gurl.possibly_invalid_spec());
return client_bridge->ShouldOverrideUrlLoading(
url, has_user_gesture, is_redirect, is_main_frame, ignore_navigation);
}
diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc
index 91cdec4c..922ed29 100644
--- a/android_webview/browser/aw_contents.cc
+++ b/android_webview/browser/aw_contents.cc
@@ -535,12 +535,12 @@
const JavaParamRef<jobject>& obj,
const JavaParamRef<jobjectArray>& jvisited_links) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- std::vector<base::string16> visited_link_strings;
+ std::vector<std::u16string> visited_link_strings;
base::android::AppendJavaStringArrayToStringVector(env, jvisited_links,
&visited_link_strings);
std::vector<GURL> visited_link_gurls;
- std::vector<base::string16>::const_iterator itr;
+ std::vector<std::u16string>::const_iterator itr;
for (itr = visited_link_strings.begin(); itr != visited_link_strings.end();
++itr) {
visited_link_gurls.push_back(GURL(*itr));
@@ -1381,12 +1381,12 @@
const base::android::JavaParamRef<jobject>& listener,
const base::android::JavaParamRef<jstring>& js_object_name,
const base::android::JavaParamRef<jobjectArray>& allowed_origin_rules) {
- base::string16 native_js_object_name =
+ std::u16string native_js_object_name =
base::android::ConvertJavaStringToUTF16(env, js_object_name);
std::vector<std::string> native_allowed_origin_rule_strings;
AppendJavaStringArrayToStringVector(env, allowed_origin_rules,
&native_allowed_origin_rule_strings);
- const base::string16 error_message =
+ const std::u16string error_message =
GetJsCommunicationHost()->AddWebMessageHostFactory(
std::make_unique<AwWebMessageHostFactory>(listener),
native_js_object_name, native_allowed_origin_rule_strings);
diff --git a/android_webview/browser/aw_contents_client_bridge.cc b/android_webview/browser/aw_contents_client_bridge.cc
index 04a4f11..07bb7b6 100644
--- a/android_webview/browser/aw_contents_client_bridge.cc
+++ b/android_webview/browser/aw_contents_client_bridge.cc
@@ -293,15 +293,15 @@
void AwContentsClientBridge::RunJavaScriptDialog(
content::JavaScriptDialogType dialog_type,
const GURL& origin_url,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
content::JavaScriptDialogManager::DialogClosedCallback callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (!obj) {
- std::move(callback).Run(false, base::string16());
+ std::move(callback).Run(false, std::u16string());
return;
}
@@ -347,11 +347,11 @@
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
if (!obj) {
- std::move(callback).Run(false, base::string16());
+ std::move(callback).Run(false, std::u16string());
return;
}
- const base::string16 message_text =
+ const std::u16string message_text =
l10n_util::GetStringUTF16(IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE);
int callback_id = pending_js_dialog_callbacks_.Add(
@@ -367,7 +367,7 @@
callback_id);
}
-bool AwContentsClientBridge::ShouldOverrideUrlLoading(const base::string16& url,
+bool AwContentsClientBridge::ShouldOverrideUrlLoading(const std::u16string& url,
bool has_user_gesture,
bool is_redirect,
bool is_main_frame,
@@ -553,7 +553,7 @@
LOG(WARNING) << "Unexpected JS dialog confirm. " << id;
return;
}
- base::string16 prompt_text;
+ std::u16string prompt_text;
if (prompt) {
prompt_text = ConvertJavaStringToUTF16(env, prompt);
}
@@ -588,7 +588,7 @@
LOG(WARNING) << "Unexpected JS dialog cancel. " << id;
return;
}
- std::move(*callback).Run(false, base::string16());
+ std::move(*callback).Run(false, std::u16string());
pending_js_dialog_callbacks_.Remove(id);
}
diff --git a/android_webview/browser/aw_contents_client_bridge.h b/android_webview/browser/aw_contents_client_bridge.h
index 3c64a8d..3090bb3 100644
--- a/android_webview/browser/aw_contents_client_bridge.h
+++ b/android_webview/browser/aw_contents_client_bridge.h
@@ -91,13 +91,13 @@
void RunJavaScriptDialog(
content::JavaScriptDialogType dialog_type,
const GURL& origin_url,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
content::JavaScriptDialogManager::DialogClosedCallback callback);
void RunBeforeUnloadDialog(
const GURL& origin_url,
content::JavaScriptDialogManager::DialogClosedCallback callback);
- bool ShouldOverrideUrlLoading(const base::string16& url,
+ bool ShouldOverrideUrlLoading(const std::u16string& url,
bool has_user_gesture,
bool is_redirect,
bool is_main_frame,
diff --git a/android_webview/browser/aw_javascript_dialog_manager.cc b/android_webview/browser/aw_javascript_dialog_manager.cc
index b292468..9a3cb3a4 100644
--- a/android_webview/browser/aw_javascript_dialog_manager.cc
+++ b/android_webview/browser/aw_javascript_dialog_manager.cc
@@ -21,14 +21,14 @@
content::WebContents* web_contents,
content::RenderFrameHost* render_frame_host,
content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
DialogClosedCallback callback,
bool* did_suppress_message) {
AwContentsClientBridge* bridge =
AwContentsClientBridge::FromWebContents(web_contents);
if (!bridge) {
- std::move(callback).Run(false, base::string16());
+ std::move(callback).Run(false, std::u16string());
return;
}
@@ -45,7 +45,7 @@
AwContentsClientBridge* bridge =
AwContentsClientBridge::FromWebContents(web_contents);
if (!bridge) {
- std::move(callback).Run(false, base::string16());
+ std::move(callback).Run(false, std::u16string());
return;
}
diff --git a/android_webview/browser/aw_javascript_dialog_manager.h b/android_webview/browser/aw_javascript_dialog_manager.h
index c22258c..d8b3daf 100644
--- a/android_webview/browser/aw_javascript_dialog_manager.h
+++ b/android_webview/browser/aw_javascript_dialog_manager.h
@@ -19,8 +19,8 @@
void RunJavaScriptDialog(content::WebContents* web_contents,
content::RenderFrameHost* render_frame_host,
content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
DialogClosedCallback callback,
bool* did_suppress_message) override;
void RunBeforeUnloadDialog(content::WebContents* web_contents,
diff --git a/android_webview/browser/aw_pac_processor.cc b/android_webview/browser/aw_pac_processor.cc
index 9d8dad4..99a04b7 100644
--- a/android_webview/browser/aw_pac_processor.cc
+++ b/android_webview/browser/aw_pac_processor.cc
@@ -262,9 +262,9 @@
public:
Bindings(HostResolver* host_resolver) : host_resolver_(host_resolver) {}
- void Alert(const base::string16& message) override {}
+ void Alert(const std::u16string& message) override {}
- void OnError(int line_number, const base::string16& message) override {}
+ void OnError(int line_number, const std::u16string& message) override {}
proxy_resolver::ProxyHostResolver* GetHostResolver() override {
return host_resolver_;
diff --git a/android_webview/browser/aw_quota_manager_bridge.cc b/android_webview/browser/aw_quota_manager_bridge.cc
index cb3a79fb..b5c4871 100644
--- a/android_webview/browser/aw_quota_manager_bridge.cc
+++ b/android_webview/browser/aw_quota_manager_bridge.cc
@@ -207,14 +207,14 @@
void AwQuotaManagerBridge::DeleteOrigin(JNIEnv* env,
const JavaParamRef<jobject>& object,
const JavaParamRef<jstring>& origin) {
- base::string16 origin_string(
+ std::u16string origin_string(
base::android::ConvertJavaStringToUTF16(env, origin));
RunOnUIThread(base::BindOnce(&AwQuotaManagerBridge::DeleteOriginOnUiThread,
this, origin_string));
}
void AwQuotaManagerBridge::DeleteOriginOnUiThread(
- const base::string16& origin) {
+ const std::u16string& origin) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
StoragePartition* storage_partition = GetStoragePartition();
storage_partition->ClearDataForOrigin(
@@ -285,7 +285,7 @@
const JavaParamRef<jstring>& origin,
jint callback_id,
bool is_quota) {
- base::string16 origin_string(
+ std::u16string origin_string(
base::android::ConvertJavaStringToUTF16(env, origin));
RunOnUIThread(
base::BindOnce(&AwQuotaManagerBridge::GetUsageAndQuotaForOriginOnUiThread,
@@ -293,7 +293,7 @@
}
void AwQuotaManagerBridge::GetUsageAndQuotaForOriginOnUiThread(
- const base::string16& origin,
+ const std::u16string& origin,
jint callback_id,
bool is_quota) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
diff --git a/android_webview/browser/aw_quota_manager_bridge.h b/android_webview/browser/aw_quota_manager_bridge.h
index a9a24630..c091979 100644
--- a/android_webview/browser/aw_quota_manager_bridge.h
+++ b/android_webview/browser/aw_quota_manager_bridge.h
@@ -69,9 +69,9 @@
storage::QuotaManager* GetQuotaManager() const;
void DeleteAllDataOnUiThread();
- void DeleteOriginOnUiThread(const base::string16& origin);
+ void DeleteOriginOnUiThread(const std::u16string& origin);
void GetOriginsOnUiThread(jint callback_id);
- void GetUsageAndQuotaForOriginOnUiThread(const base::string16& origin,
+ void GetUsageAndQuotaForOriginOnUiThread(const std::u16string& origin,
jint callback_id,
bool is_quota);
diff --git a/android_webview/browser/aw_web_contents_delegate.cc b/android_webview/browser/aw_web_contents_delegate.cc
index b1f6f8c12f..8e1b2f4 100644
--- a/android_webview/browser/aw_web_contents_delegate.cc
+++ b/android_webview/browser/aw_web_contents_delegate.cc
@@ -338,7 +338,7 @@
}
std::vector<std::string> file_path_str;
- std::vector<base::string16> display_name_str;
+ std::vector<std::u16string> display_name_str;
// Note file_paths maybe NULL, but this will just yield a zero-length vector.
base::android::AppendJavaStringArrayToStringVector(env, file_paths,
&file_path_str);
diff --git a/android_webview/browser/find_helper.cc b/android_webview/browser/find_helper.cc
index f720aa58..78f1ba4 100644
--- a/android_webview/browser/find_helper.cc
+++ b/android_webview/browser/find_helper.cc
@@ -31,7 +31,7 @@
listener_ = listener;
}
-void FindHelper::FindAllAsync(const base::string16& search_string) {
+void FindHelper::FindAllAsync(const std::u16string& search_string) {
// Stop any ongoing asynchronous request.
web_contents()->StopFinding(content::STOP_FIND_ACTION_KEEP_SELECTION);
@@ -87,7 +87,7 @@
last_active_ordinal_ = -1;
}
-bool FindHelper::MaybeHandleEmptySearch(const base::string16& search_string) {
+bool FindHelper::MaybeHandleEmptySearch(const std::u16string& search_string) {
if (!search_string.empty())
return false;
@@ -96,7 +96,7 @@
return true;
}
-void FindHelper::StartNewSession(const base::string16& search_string) {
+void FindHelper::StartNewSession(const std::u16string& search_string) {
current_request_id_ = find_request_id_counter_++;
current_session_id_ = current_request_id_;
last_search_string_ = search_string;
diff --git a/android_webview/browser/find_helper.h b/android_webview/browser/find_helper.h
index b72d783..442af6ec 100644
--- a/android_webview/browser/find_helper.h
+++ b/android_webview/browser/find_helper.h
@@ -32,7 +32,7 @@
void SetListener(Listener* listener);
// Asynchronous API.
- void FindAllAsync(const base::string16& search_string);
+ void FindAllAsync(const std::u16string& search_string);
void HandleFindReply(int request_id,
int match_count,
int active_ordinal,
@@ -43,8 +43,8 @@
void ClearMatches();
private:
- void StartNewSession(const base::string16& search_string);
- bool MaybeHandleEmptySearch(const base::string16& search_string);
+ void StartNewSession(const std::u16string& search_string);
+ bool MaybeHandleEmptySearch(const std::u16string& search_string);
void NotifyResults(int active_ordinal, int match_count, bool finished);
// Listener results are reported to.
@@ -63,7 +63,7 @@
int current_session_id_;
// Required by FindNext and the incremental find replies.
- base::string16 last_search_string_;
+ std::u16string last_search_string_;
int last_match_count_;
int last_active_ordinal_;
diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc
index cb71c86..e75ae7d 100644
--- a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc
+++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.cc
@@ -26,7 +26,7 @@
void ShouldOverrideUrlLoadingOnUI(
content::WebContents* web_contents,
- const base::string16& url,
+ const std::u16string& url,
bool has_user_gesture,
bool is_redirect,
bool is_main_frame,
@@ -206,7 +206,7 @@
}
void AwRenderViewHostExt::ShouldOverrideUrlLoading(
- const base::string16& url,
+ const std::u16string& url,
bool has_user_gesture,
bool is_redirect,
bool is_main_frame,
diff --git a/android_webview/browser/renderer_host/aw_render_view_host_ext.h b/android_webview/browser/renderer_host/aw_render_view_host_ext.h
index ce90800..9043989 100644
--- a/android_webview/browser/renderer_host/aw_render_view_host_ext.h
+++ b/android_webview/browser/renderer_host/aw_render_view_host_ext.h
@@ -90,7 +90,7 @@
android_webview::mojom::HitTestDataPtr hit_test_data) override;
void ContentsSizeChanged(const gfx::Size& contents_size) override;
void ShouldOverrideUrlLoading(
- const base::string16& url,
+ const std::u16string& url,
bool has_user_gesture,
bool is_redirect,
bool is_main_frame,
diff --git a/android_webview/browser/state_serializer.cc b/android_webview/browser/state_serializer.cc
index 3bb5055..e4a588e 100644
--- a/android_webview/browser/state_serializer.cc
+++ b/android_webview/browser/state_serializer.cc
@@ -233,7 +233,7 @@
}
{
- base::string16 title;
+ std::u16string title;
if (!iterator->ReadString16(&title))
return false;
entry->SetTitle(title);
diff --git a/android_webview/browser/state_serializer_unittest.cc b/android_webview/browser/state_serializer_unittest.cc
index d4a7d6e..e02d30f 100644
--- a/android_webview/browser/state_serializer_unittest.cc
+++ b/android_webview/browser/state_serializer_unittest.cc
@@ -33,7 +33,7 @@
content::Referrer referrer;
referrer.url = GURL("http://referrer_url");
referrer.policy = network::mojom::ReferrerPolicy::kOrigin;
- const base::string16 title(base::UTF8ToUTF16("title"));
+ const std::u16string title(base::UTF8ToUTF16("title"));
const bool has_post_data = true;
const GURL original_request_url("http://original_request_url");
const GURL base_url_for_data_url("http://base_url");
@@ -182,7 +182,7 @@
GURL virtual_url("https://example.com/virtual_url");
content::Referrer referrer(GURL("https://example.com/referrer"),
network::mojom::ReferrerPolicy::kDefault);
- base::string16 title = base::UTF8ToUTF16("title");
+ std::u16string title = base::UTF8ToUTF16("title");
std::string empty_encoded_page_state = "";
bool has_post_data = false;
GURL original_request_url("https://example.com/original");
diff --git a/android_webview/common/aw_content_client.cc b/android_webview/common/aw_content_client.cc
index 4d78b42c..4569105 100644
--- a/android_webview/common/aw_content_client.cc
+++ b/android_webview/common/aw_content_client.cc
@@ -36,7 +36,7 @@
schemes->allow_non_standard_schemes_in_origins = true;
}
-base::string16 AwContentClient::GetLocalizedString(int message_id) {
+std::u16string AwContentClient::GetLocalizedString(int message_id) {
// TODO(boliu): Used only by WebKit, so only bundle those resources for
// Android WebView.
return l10n_util::GetStringUTF16(message_id);
diff --git a/android_webview/common/aw_content_client.h b/android_webview/common/aw_content_client.h
index 3fbb8613..aa78102 100644
--- a/android_webview/common/aw_content_client.h
+++ b/android_webview/common/aw_content_client.h
@@ -26,7 +26,7 @@
~AwContentClient() override;
// ContentClient implementation.
void AddAdditionalSchemes(Schemes* schemes) override;
- base::string16 GetLocalizedString(int message_id) override;
+ std::u16string GetLocalizedString(int message_id) override;
base::StringPiece GetDataResource(int resource_id,
ui::ScaleFactor scale_factor) override;
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
diff --git a/android_webview/renderer/aw_content_renderer_client.cc b/android_webview/renderer/aw_content_renderer_client.cc
index e91a6d1..e9df9c8 100644
--- a/android_webview/renderer/aw_content_renderer_client.cc
+++ b/android_webview/renderer/aw_content_renderer_client.cc
@@ -136,7 +136,7 @@
}
bool ignore_navigation = false;
- base::string16 url = request.Url().GetString().Utf16();
+ std::u16string url = request.Url().GetString().Utf16();
bool has_user_gesture = request.HasUserGesture();
mojo::AssociatedRemote<mojom::FrameHost> frame_host_remote;
diff --git a/android_webview/renderer/aw_render_frame_ext.cc b/android_webview/renderer/aw_render_frame_ext.cc
index b98fe6e..66932ba 100644
--- a/android_webview/renderer/aw_render_frame_ext.cc
+++ b/android_webview/renderer/aw_render_frame_ext.cc
@@ -41,12 +41,12 @@
const char kPhoneNumberPrefix[] = "tel:";
GURL GetAbsoluteUrl(const blink::WebNode& node,
- const base::string16& url_fragment) {
+ const std::u16string& url_fragment) {
return GURL(node.GetDocument().CompleteURL(
blink::WebString::FromUTF16(url_fragment)));
}
-base::string16 GetHref(const blink::WebElement& element) {
+std::u16string GetHref(const blink::WebElement& element) {
// Get the actual 'href' attribute, which might relative if valid or can
// possibly contain garbage otherwise, so not using absoluteLinkURL here.
return element.GetAttribute("href").Utf16();
diff --git a/apps/load_and_launch_browsertest.cc b/apps/load_and_launch_browsertest.cc
index 02c7168..6b7639c8 100644
--- a/apps/load_and_launch_browsertest.cc
+++ b/apps/load_and_launch_browsertest.cc
@@ -216,7 +216,7 @@
#endif
IN_PROC_BROWSER_TEST_F(LoadAndLaunchExtensionBrowserTest,
MAYBE_LoadAndLaunchExtension) {
- const std::vector<base::string16>* errors =
+ const std::vector<std::u16string>* errors =
extensions::LoadErrorReporter::GetInstance()->GetErrors();
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
@@ -225,7 +225,7 @@
#else
// Expect |extension_instead_of_app_error|.
EXPECT_EQ(1u, errors->size());
- EXPECT_NE(base::string16::npos,
+ EXPECT_NE(std::u16string::npos,
errors->at(0).find(base::ASCIIToUTF16(
"App loading flags cannot be used to load extensions")));
#endif
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc
index ee67422..9241cf2 100644
--- a/ash/accelerators/accelerator_controller_impl.cc
+++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -188,8 +188,8 @@
// Ensures that there are no word breaks at the "+"s in the shortcut texts such
// as "Ctrl+Shift+Space".
-void EnsureNoWordBreaks(base::string16* shortcut_text) {
- std::vector<base::string16> keys =
+void EnsureNoWordBreaks(std::u16string* shortcut_text) {
+ std::vector<std::u16string> keys =
base::SplitString(*shortcut_text, base::ASCIIToUTF16("+"),
base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
@@ -198,7 +198,7 @@
// The plus sign surrounded by the word joiner to guarantee an non-breaking
// shortcut.
- const base::string16 non_breaking_plus =
+ const std::u16string non_breaking_plus =
base::UTF8ToUTF16("\xe2\x81\xa0+\xe2\x81\xa0");
shortcut_text->clear();
for (size_t i = 0; i < keys.size() - 1; ++i) {
@@ -211,11 +211,11 @@
// Gets the notification message after it formats it in such a way that there
// are no line breaks in the middle of the shortcut texts.
-base::string16 GetNotificationText(int message_id,
+std::u16string GetNotificationText(int message_id,
int old_shortcut_id,
int new_shortcut_id) {
- base::string16 old_shortcut = l10n_util::GetStringUTF16(old_shortcut_id);
- base::string16 new_shortcut = l10n_util::GetStringUTF16(new_shortcut_id);
+ std::u16string old_shortcut = l10n_util::GetStringUTF16(old_shortcut_id);
+ std::u16string new_shortcut = l10n_util::GetStringUTF16(new_shortcut_id);
EnsureNoWordBreaks(&old_shortcut);
EnsureNoWordBreaks(&new_shortcut);
@@ -227,7 +227,7 @@
int message_id,
int old_shortcut_id,
int new_shortcut_id) {
- const base::string16 message =
+ const std::u16string message =
GetNotificationText(message_id, old_shortcut_id, new_shortcut_id);
auto delegate =
base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
@@ -239,7 +239,7 @@
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
l10n_util::GetStringUTF16(IDS_DEPRECATED_SHORTCUT_TITLE), message,
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierAccelerator),
message_center::RichNotificationData(), std::move(delegate),
@@ -248,7 +248,7 @@
std::move(notification));
}
-void ShowToast(std::string id, const base::string16& text) {
+void ShowToast(std::string id, const std::u16string& text) {
ToastData toast(id, text, kToastDurationMs, base::nullopt,
/*visible_on_lock_screen=*/true);
Shell::Get()->toast_manager()->Show(toast);
@@ -1255,13 +1255,13 @@
return true;
}
-void CreateAndShowStickyNotification(const base::string16& title,
- const base::string16& message,
+void CreateAndShowStickyNotification(const std::u16string& title,
+ const std::u16string& message,
const std::string& notification_id,
const gfx::VectorIcon& icon) {
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title, message,
- base::string16() /* display source */, GURL(),
+ std::u16string() /* display source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierAccelerator),
message_center::RichNotificationData(), nullptr, icon,
@@ -1285,7 +1285,7 @@
int feature_name_id,
bool feature_state,
const std::string& notification_id) {
- const base::string16 organization_manager =
+ const std::u16string organization_manager =
base::UTF8ToUTF16(Shell::Get()
->system_tray_model()
->enterprise_domain()
diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc
index 266b6f6..f00918d 100644
--- a/ash/accelerators/exit_warning_handler.cc
+++ b/ash/accelerators/exit_warning_handler.cc
@@ -79,8 +79,8 @@
}
private:
- base::string16 text_;
- base::string16 accessible_name_;
+ std::u16string text_;
+ std::u16string accessible_name_;
int text_width_;
DISALLOW_COPY_AND_ASSIGN(ExitWarningWidgetDelegateView);
diff --git a/ash/accessibility/accessibility_controller_impl.cc b/ash/accessibility/accessibility_controller_impl.cc
index 538f45eb0..bb994f4 100644
--- a/ash/accessibility/accessibility_controller_impl.cc
+++ b/ash/accessibility/accessibility_controller_impl.cc
@@ -325,8 +325,8 @@
if (type == A11yNotificationType::kNone)
return;
- base::string16 text;
- base::string16 title;
+ std::u16string text;
+ std::u16string title;
if (type == A11yNotificationType::kBrailleDisplayConnected) {
text = l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_BRAILLE_DISPLAY_CONNECTED);
@@ -350,7 +350,7 @@
std::unique_ptr<message_center::Notification> notification =
ash::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, title,
- text, base::string16(), GURL(),
+ text, std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierAccessibility),
@@ -1886,7 +1886,7 @@
NotifyAccessibilityStatusChanged();
}
-base::string16 AccessibilityControllerImpl::GetBatteryDescription() const {
+std::u16string AccessibilityControllerImpl::GetBatteryDescription() const {
// Pass battery status as string to callback function.
return PowerStatus::Get()->GetAccessibleNameString(
/*full_description=*/true);
diff --git a/ash/accessibility/accessibility_controller_impl.h b/ash/accessibility/accessibility_controller_impl.h
index e8b9642..4d2ae0e 100644
--- a/ash/accessibility/accessibility_controller_impl.h
+++ b/ash/accessibility/accessibility_controller_impl.h
@@ -381,7 +381,7 @@
void ToggleDictationFromSource(DictationToggleSource source) override;
void HandleAutoclickScrollableBoundsFound(
gfx::Rect& bounds_in_screen) override;
- base::string16 GetBatteryDescription() const override;
+ std::u16string GetBatteryDescription() const override;
void SetVirtualKeyboardVisible(bool is_visible) override;
void PerformAcceleratorAction(AcceleratorAction accelerator_action) override;
void NotifyAccessibilityStatusChanged() override;
diff --git a/ash/accessibility/accessibility_controller_unittest.cc b/ash/accessibility/accessibility_controller_unittest.cc
index 7ee85d0..fa30938 100644
--- a/ash/accessibility/accessibility_controller_unittest.cc
+++ b/ash/accessibility/accessibility_controller_unittest.cc
@@ -914,9 +914,9 @@
}
TEST_F(AccessibilityControllerTest, ShowNotificationOnSpokenFeedback) {
- const base::string16 kChromeVoxEnabledTitle =
+ const std::u16string kChromeVoxEnabledTitle =
base::ASCIIToUTF16("ChromeVox enabled");
- const base::string16 kChromeVoxEnabled =
+ const std::u16string kChromeVoxEnabled =
base::ASCIIToUTF16("Press Ctrl + Alt + Z to disable spoken feedback.");
AccessibilityControllerImpl* controller =
Shell::Get()->accessibility_controller();
@@ -945,11 +945,11 @@
TEST_F(AccessibilityControllerTest,
ShowNotificationOnBrailleDisplayStateChanged) {
- const base::string16 kBrailleConnected =
+ const std::u16string kBrailleConnected =
base::ASCIIToUTF16("Braille display connected.");
- const base::string16 kChromeVoxEnabled =
+ const std::u16string kChromeVoxEnabled =
base::ASCIIToUTF16("Press Ctrl + Alt + Z to disable spoken feedback.");
- const base::string16 kBrailleConnectedAndChromeVoxEnabledTitle =
+ const std::u16string kBrailleConnectedAndChromeVoxEnabledTitle =
base::ASCIIToUTF16("Braille and ChromeVox are enabled");
AccessibilityControllerImpl* controller =
Shell::Get()->accessibility_controller();
@@ -962,7 +962,7 @@
message_center::NotificationList::Notifications notifications =
MessageCenter::Get()->GetVisibleNotifications();
ASSERT_EQ(1u, notifications.size());
- EXPECT_EQ(base::string16(), (*notifications.begin())->title());
+ EXPECT_EQ(std::u16string(), (*notifications.begin())->title());
EXPECT_EQ(kBrailleConnected, (*notifications.begin())->message());
// Neither disconnecting a braille display, nor disabling spoken feedback
diff --git a/ash/ambient/ui/ambient_background_image_view.cc b/ash/ambient/ui/ambient_background_image_view.cc
index 92274cd..b47798ad 100644
--- a/ash/ambient/ui/ambient_background_image_view.cc
+++ b/ash/ambient/ui/ambient_background_image_view.cc
@@ -118,7 +118,7 @@
}
void AmbientBackgroundImageView::UpdateImageDetails(
- const base::string16& details) {
+ const std::u16string& details) {
ambient_info_view_->UpdateImageDetails(details);
}
diff --git a/ash/ambient/ui/ambient_background_image_view.h b/ash/ambient/ui/ambient_background_image_view.h
index 0b08a44..01f844e 100644
--- a/ash/ambient/ui/ambient_background_image_view.h
+++ b/ash/ambient/ui/ambient_background_image_view.h
@@ -46,7 +46,7 @@
const gfx::ImageSkia& related_image);
// Updates the details for the currently displayed image.
- void UpdateImageDetails(const base::string16& details);
+ void UpdateImageDetails(const std::u16string& details);
const gfx::ImageSkia& GetCurrentImage();
diff --git a/ash/ambient/ui/ambient_info_view.cc b/ash/ambient/ui/ambient_info_view.cc
index fa3afc1..feba612 100644
--- a/ash/ambient/ui/ambient_info_view.cc
+++ b/ash/ambient/ui/ambient_info_view.cc
@@ -39,7 +39,7 @@
AmbientInfoView::~AmbientInfoView() = default;
-void AmbientInfoView::UpdateImageDetails(const base::string16& details) {
+void AmbientInfoView::UpdateImageDetails(const std::u16string& details) {
details_label_->SetText(details);
}
diff --git a/ash/ambient/ui/ambient_info_view.h b/ash/ambient/ui/ambient_info_view.h
index 214f333..d4bbecbf 100644
--- a/ash/ambient/ui/ambient_info_view.h
+++ b/ash/ambient/ui/ambient_info_view.h
@@ -31,7 +31,7 @@
AmbientInfoView& operator=(AmbientInfoView&) = delete;
~AmbientInfoView() override;
- void UpdateImageDetails(const base::string16& details);
+ void UpdateImageDetails(const std::u16string& details);
void SetTextTransform(const gfx::Transform& transform);
diff --git a/ash/ambient/ui/glanceable_info_view.cc b/ash/ambient/ui/glanceable_info_view.cc
index 50fb2c15..5a21e04 100644
--- a/ash/ambient/ui/glanceable_info_view.cc
+++ b/ash/ambient/ui/glanceable_info_view.cc
@@ -107,7 +107,7 @@
temperature_->SetText(GetTemperatureText());
}
-base::string16 GlanceableInfoView::GetTemperatureText() const {
+std::u16string GlanceableInfoView::GetTemperatureText() const {
AmbientBackendModel* ambient_backend_model =
delegate_->GetAmbientBackendModel();
if (ambient_backend_model->show_celsius()) {
diff --git a/ash/ambient/ui/glanceable_info_view.h b/ash/ambient/ui/glanceable_info_view.h
index 23fb212..a00f2c78 100644
--- a/ash/ambient/ui/glanceable_info_view.h
+++ b/ash/ambient/ui/glanceable_info_view.h
@@ -42,7 +42,7 @@
private:
void InitLayout();
- base::string16 GetTemperatureText() const;
+ std::u16string GetTemperatureText() const;
// View for the time info. Owned by the view hierarchy.
ash::tray::TimeView* time_view_ = nullptr;
diff --git a/ash/ambient/ui/media_string_view.cc b/ash/ambient/ui/media_string_view.cc
index 3c39078..260a6d3 100644
--- a/ash/ambient/ui/media_string_view.cc
+++ b/ash/ambient/ui/media_string_view.cc
@@ -156,8 +156,8 @@
media_session::MediaMetadata session_metadata =
metadata.value_or(media_session::MediaMetadata());
- base::string16 media_string;
- base::string16 middle_dot = base::UTF8ToUTF16(kMiddleDotSeparator);
+ std::u16string media_string;
+ std::u16string middle_dot = base::UTF8ToUTF16(kMiddleDotSeparator);
if (!session_metadata.title.empty() && !session_metadata.artist.empty()) {
media_string =
session_metadata.title + middle_dot + session_metadata.artist;
@@ -168,7 +168,7 @@
}
// Reset text and stop any ongoing animation.
- media_text_->SetText(base::string16());
+ media_text_->SetText(std::u16string());
media_text_->layer()->GetAnimator()->StopAnimating();
media_text_->SetText(media_string);
diff --git a/ash/ambient/ui/media_string_view_unittest.cc b/ash/ambient/ui/media_string_view_unittest.cc
index 3ab396f..49235e5 100644
--- a/ash/ambient/ui/media_string_view_unittest.cc
+++ b/ash/ambient/ui/media_string_view_unittest.cc
@@ -35,7 +35,7 @@
AmbientAshTestBase::TearDown();
}
- const base::string16& GetText() {
+ const std::u16string& GetText() {
return GetMediaStringViewTextLabel()->GetText();
}
};
@@ -50,7 +50,7 @@
SimulateMediaMetadataChanged(metadata);
- const base::string16 expected_text = base::UTF8ToUTF16("title \u2022 artist");
+ const std::u16string expected_text = base::UTF8ToUTF16("title \u2022 artist");
EXPECT_EQ(GetMediaStringViewTextLabel()->GetText(), expected_text);
}
diff --git a/ash/app_list/app_list_controller_impl.cc b/ash/app_list/app_list_controller_impl.cc
index 7d15ef4d..7d2ea9f 100644
--- a/ash/app_list/app_list_controller_impl.cc
+++ b/ash/app_list/app_list_controller_impl.cc
@@ -287,7 +287,7 @@
search_model_.SetSearchEngineIsGoogle(is_google);
}
-void AppListControllerImpl::UpdateSearchBox(const base::string16& text,
+void AppListControllerImpl::UpdateSearchBox(const std::u16string& text,
bool initiated_by_user) {
search_model_.search_box()->Update(text, initiated_by_user);
}
@@ -1058,9 +1058,9 @@
AssistantEntryPoint::kLauncherSearchBoxIcon);
}
-void AppListControllerImpl::StartSearch(const base::string16& raw_query) {
+void AppListControllerImpl::StartSearch(const std::u16string& raw_query) {
if (client_) {
- base::string16 query;
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
client_->StartSearch(query);
auto* notifier = GetNotifier();
@@ -1270,11 +1270,11 @@
}
void AppListControllerImpl::NotifySearchResultsForLogging(
- const base::string16& raw_query,
+ const std::u16string& raw_query,
const SearchResultIdWithPositionIndices& results,
int position_index) {
if (client_) {
- base::string16 query;
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
client_->NotifySearchResultsForLogging(query, results, position_index);
}
@@ -1596,7 +1596,7 @@
presenter_.GetView()->CloseOpenedPage();
// Refresh the suggestion chips with empty query.
- StartSearch(base::string16());
+ StartSearch(std::u16string());
}
void AppListControllerImpl::UpdateLauncherContainer(
@@ -1642,7 +1642,7 @@
}
int AppListControllerImpl::GetLastQueryLength() {
- base::string16 query;
+ std::u16string query;
base::TrimWhitespace(search_model_.search_box()->text(), base::TRIM_ALL,
&query);
return query.length();
diff --git a/ash/app_list/app_list_controller_impl.h b/ash/app_list/app_list_controller_impl.h
index 8b7ff8c..85561d4 100644
--- a/ash/app_list/app_list_controller_impl.h
+++ b/ash/app_list/app_list_controller_impl.h
@@ -100,7 +100,7 @@
const std::string& folder_id) override;
void SetStatus(AppListModelStatus status) override;
void SetSearchEngineIsGoogle(bool is_google) override;
- void UpdateSearchBox(const base::string16& text,
+ void UpdateSearchBox(const std::u16string& text,
bool initiated_by_user) override;
void PublishSearchResults(
std::vector<std::unique_ptr<SearchResultMetadata>> results) override;
@@ -169,7 +169,7 @@
SearchModel* GetSearchModel() override;
AppListNotifier* GetNotifier() override;
void StartAssistant() override;
- void StartSearch(const base::string16& raw_query) override;
+ void StartSearch(const std::u16string& raw_query) override;
void OpenSearchResult(const std::string& result_id,
int event_flags,
AppListLaunchedFrom launched_from,
@@ -205,7 +205,7 @@
void OnSearchResultVisibilityChanged(const std::string& id,
bool visibility) override;
void NotifySearchResultsForLogging(
- const base::string16& raw_query,
+ const std::u16string& raw_query,
const SearchResultIdWithPositionIndices& results,
int position_index) override;
void MaybeIncreaseSuggestedContentInfoShownCount() override;
diff --git a/ash/app_list/app_list_controller_impl_unittest.cc b/ash/app_list/app_list_controller_impl_unittest.cc
index 8908cc1..a0dbb88b 100644
--- a/ash/app_list/app_list_controller_impl_unittest.cc
+++ b/ash/app_list/app_list_controller_impl_unittest.cc
@@ -464,7 +464,7 @@
message_center::NOTIFICATION_TYPE_BASE_FORMAT, notification_id,
base::UTF8ToUTF16(notification_title),
base::UTF8ToUTF16("test message"), gfx::Image(),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate()));
base::RunLoop().RunUntilIdle();
diff --git a/ash/app_list/app_list_presenter_delegate_unittest.cc b/ash/app_list/app_list_presenter_delegate_unittest.cc
index 1ffd3fd..b004ae5 100644
--- a/ash/app_list/app_list_presenter_delegate_unittest.cc
+++ b/ash/app_list/app_list_presenter_delegate_unittest.cc
@@ -353,7 +353,7 @@
}
void UpdateFolderName(const std::string& name) {
- base::string16 folder_name = base::UTF8ToUTF16(name);
+ std::u16string folder_name = base::UTF8ToUTF16(name);
folder_view()->folder_header_view()->SetFolderNameForTest(folder_name);
folder_view()->folder_header_view()->ContentsChanged(
folder_view()->folder_header_view()->GetFolderNameViewForTest(),
diff --git a/ash/app_list/app_list_view_delegate.h b/ash/app_list/app_list_view_delegate.h
index b515f294..1e004de 100644
--- a/ash/app_list/app_list_view_delegate.h
+++ b/ash/app_list/app_list_view_delegate.h
@@ -57,7 +57,7 @@
// Invoked to start a new search. This collects a list of search results
// matching the raw query, which is an unhandled string typed into the search
// box by the user.
- virtual void StartSearch(const base::string16& raw_query) = 0;
+ virtual void StartSearch(const std::u16string& raw_query) = 0;
// Invoked to open the search result and log a click. If the result is
// represented by a SuggestedChipView or is a zero state result,
@@ -157,7 +157,7 @@
// |position_index| is the position index of the clicked item (if no item got
// clicked, |position_index| will be -1).
virtual void NotifySearchResultsForLogging(
- const base::string16& raw_query,
+ const std::u16string& raw_query,
const SearchResultIdWithPositionIndices& results,
int position_index) = 0;
diff --git a/ash/app_list/model/search/search_box_model.cc b/ash/app_list/model/search/search_box_model.cc
index a2eafee..2f3633f 100644
--- a/ash/app_list/model/search/search_box_model.cc
+++ b/ash/app_list/model/search/search_box_model.cc
@@ -36,7 +36,7 @@
observer.SearchEngineChanged();
}
-void SearchBoxModel::Update(const base::string16& text,
+void SearchBoxModel::Update(const std::u16string& text,
bool initiated_by_user) {
if (text_ == text)
return;
diff --git a/ash/app_list/model/search/search_box_model.h b/ash/app_list/model/search/search_box_model.h
index 11a3d1b2..c3ed745 100644
--- a/ash/app_list/model/search/search_box_model.h
+++ b/ash/app_list/model/search/search_box_model.h
@@ -37,15 +37,14 @@
// Sets/gets the text for the search box's Textfield and the voice search
// flag.
- void Update(const base::string16& text,
- bool initiated_by_user);
- const base::string16& text() const { return text_; }
+ void Update(const std::u16string& text, bool initiated_by_user);
+ const std::u16string& text() const { return text_; }
void AddObserver(SearchBoxModelObserver* observer);
void RemoveObserver(SearchBoxModelObserver* observer);
private:
- base::string16 text_;
+ std::u16string text_;
bool search_engine_is_google_ = false;
bool is_tablet_mode_ = false;
bool show_assistant_button_ = false;
diff --git a/ash/app_list/model/search/search_result.cc b/ash/app_list/model/search/search_result.cc
index b5d14ee..6149733 100644
--- a/ash/app_list/model/search/search_result.cc
+++ b/ash/app_list/model/search/search_result.cc
@@ -38,7 +38,7 @@
observer.OnMetadataChanged();
}
-void SearchResult::set_title(const base::string16& title) {
+void SearchResult::set_title(const std::u16string& title) {
metadata_->title = title;
for (auto& observer : observers_)
observer.OnMetadataChanged();
@@ -56,7 +56,7 @@
observer.OnMetadataChanged();
}
-void SearchResult::SetFormattedPrice(const base::string16& formatted_price) {
+void SearchResult::SetFormattedPrice(const std::u16string& formatted_price) {
metadata_->formatted_price = formatted_price;
for (auto& observer : observers_)
observer.OnMetadataChanged();
diff --git a/ash/app_list/model/search/search_result.h b/ash/app_list/model/search/search_result.h
index f8d94edc..da294d2 100644
--- a/ash/app_list/model/search/search_result.h
+++ b/ash/app_list/model/search/search_result.h
@@ -57,34 +57,34 @@
const ui::ImageModel& badge_icon() const { return metadata_->badge_icon; }
void SetBadgeIcon(const ui::ImageModel& badge_icon);
- const base::string16& title() const { return metadata_->title; }
- void set_title(const base::string16& title);
+ const std::u16string& title() const { return metadata_->title; }
+ void set_title(const std::u16string& title);
const Tags& title_tags() const { return metadata_->title_tags; }
void set_title_tags(const Tags& tags) { metadata_->title_tags = tags; }
- const base::string16& details() const { return metadata_->details; }
- void set_details(const base::string16& details) {
+ const std::u16string& details() const { return metadata_->details; }
+ void set_details(const std::u16string& details) {
metadata_->details = details;
}
const Tags& details_tags() const { return metadata_->details_tags; }
void set_details_tags(const Tags& tags) { metadata_->details_tags = tags; }
- const base::string16& accessible_name() const {
+ const std::u16string& accessible_name() const {
return metadata_->accessible_name;
}
- void set_accessible_name(const base::string16& name) {
+ void set_accessible_name(const std::u16string& name) {
metadata_->accessible_name = name;
}
float rating() const { return metadata_->rating; }
void SetRating(float rating);
- const base::string16& formatted_price() const {
+ const std::u16string& formatted_price() const {
return metadata_->formatted_price;
}
- void SetFormattedPrice(const base::string16& formatted_price);
+ void SetFormattedPrice(const std::u16string& formatted_price);
const base::Optional<GURL>& query_url() const { return metadata_->query_url; }
void set_query_url(const GURL& url) { metadata_->query_url = url; }
diff --git a/ash/app_list/test/app_list_test_view_delegate.cc b/ash/app_list/test/app_list_test_view_delegate.cc
index d3348a8..2cd3c76 100644
--- a/ash/app_list/test/app_list_test_view_delegate.cc
+++ b/ash/app_list/test/app_list_test_view_delegate.cc
@@ -168,7 +168,7 @@
bool visibility) {}
void AppListTestViewDelegate::NotifySearchResultsForLogging(
- const base::string16& raw_query,
+ const std::u16string& raw_query,
const ash::SearchResultIdWithPositionIndices& results,
int position_index) {}
diff --git a/ash/app_list/test/app_list_test_view_delegate.h b/ash/app_list/test/app_list_test_view_delegate.h
index 7e5826c..aecf1ec 100644
--- a/ash/app_list/test/app_list_test_view_delegate.h
+++ b/ash/app_list/test/app_list_test_view_delegate.h
@@ -62,7 +62,7 @@
SearchModel* GetSearchModel() override;
bool KeyboardTraversalEngaged() override;
void StartAssistant() override {}
- void StartSearch(const base::string16& raw_query) override {}
+ void StartSearch(const std::u16string& raw_query) override {}
void OpenSearchResult(const std::string& result_id,
int event_flags,
ash::AppListLaunchedFrom launched_from,
@@ -95,7 +95,7 @@
void OnSearchResultVisibilityChanged(const std::string& id,
bool visibility) override;
void NotifySearchResultsForLogging(
- const base::string16& raw_query,
+ const std::u16string& raw_query,
const ash::SearchResultIdWithPositionIndices& results,
int position_index) override;
void MaybeIncreaseSuggestedContentInfoShownCount() override;
diff --git a/ash/app_list/test/test_app_list_client.h b/ash/app_list/test/test_app_list_client.h
index 7e59c18..2a8d2441 100644
--- a/ash/app_list/test/test_app_list_client.h
+++ b/ash/app_list/test/test_app_list_client.h
@@ -25,7 +25,7 @@
// AppListClient:
void OnAppListControllerDestroyed() override {}
- void StartSearch(const base::string16& trimmed_query) override {}
+ void StartSearch(const std::u16string& trimmed_query) override {}
void OpenSearchResult(const std::string& result_id,
int event_flags,
AppListLaunchedFrom launched_from,
@@ -60,7 +60,7 @@
const std::string& setting_name,
const std::map<std::string, int>& values) override {}
void NotifySearchResultsForLogging(
- const base::string16& trimmed_query,
+ const std::u16string& trimmed_query,
const SearchResultIdWithPositionIndices& results,
int position_index) override {}
AppListNotifier* GetNotifier() override;
diff --git a/ash/app_list/views/app_list_item_view.cc b/ash/app_list/views/app_list_item_view.cc
index 742dc80..5182f81 100644
--- a/ash/app_list/views/app_list_item_view.cc
+++ b/ash/app_list/views/app_list_item_view.cc
@@ -511,9 +511,9 @@
return apps_grid_view_->GetAppListConfig();
}
-void AppListItemView::SetItemName(const base::string16& display_name,
- const base::string16& full_name) {
- const base::string16 folder_name_placeholder =
+void AppListItemView::SetItemName(const std::u16string& display_name,
+ const std::u16string& full_name) {
+ const std::u16string folder_name_placeholder =
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
IDS_APP_LIST_FOLDER_NAME_PLACEHOLDER);
if (is_folder_ && display_name.empty())
@@ -521,7 +521,7 @@
else
title_->SetText(display_name);
- tooltip_text_ = display_name == full_name ? base::string16() : full_name;
+ tooltip_text_ = display_name == full_name ? std::u16string() : full_name;
// Use full name for accessibility.
SetAccessibleName(
@@ -861,14 +861,14 @@
SchedulePaint();
}
-base::string16 AppListItemView::GetTooltipText(const gfx::Point& p) const {
+std::u16string AppListItemView::GetTooltipText(const gfx::Point& p) const {
// Use the label to generate a tooltip, so that it will consider its text
// truncation in making the tooltip. We do not want the label itself to have a
// tooltip, so we only temporarily enable it to get the tooltip text from the
// label, then disable it again.
title_->SetHandlesTooltips(true);
title_->SetTooltipText(tooltip_text_);
- base::string16 tooltip = title_->GetTooltipText(p);
+ std::u16string tooltip = title_->GetTooltipText(p);
title_->SetHandlesTooltips(false);
return tooltip;
}
diff --git a/ash/app_list/views/app_list_item_view.h b/ash/app_list/views/app_list_item_view.h
index 8135655..bfa584a3 100644
--- a/ash/app_list/views/app_list_item_view.h
+++ b/ash/app_list/views/app_list_item_view.h
@@ -57,8 +57,8 @@
// config state.
void RefreshIcon();
- void SetItemName(const base::string16& display_name,
- const base::string16& full_name);
+ void SetItemName(const std::u16string& display_name,
+ const std::u16string& full_name);
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
@@ -126,7 +126,7 @@
void OnThemeChanged() override;
// views::View overrides:
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
// When a dragged view enters this view, a preview circle is shown for
// non-folder item while the icon is enlarged for folder item. When a
@@ -286,7 +286,7 @@
// Whether |context_menu_| was shown via key event.
bool menu_show_initiated_from_key_ = false;
- base::string16 tooltip_text_;
+ std::u16string tooltip_text_;
// A timer to defer showing drag UI when mouse is pressed.
base::OneShotTimer mouse_drag_timer_;
diff --git a/ash/app_list/views/app_list_main_view.cc b/ash/app_list/views/app_list_main_view.cc
index 34b2794..72c853c7 100644
--- a/ash/app_list/views/app_list_main_view.cc
+++ b/ash/app_list/views/app_list_main_view.cc
@@ -182,8 +182,8 @@
}
void AppListMainView::QueryChanged(SearchBoxViewBase* sender) {
- base::string16 raw_query = search_model_->search_box()->text();
- base::string16 query;
+ std::u16string raw_query = search_model_->search_box()->text();
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
contents_view_->ShowSearchResults(search_box_view_->is_search_box_active() ||
!query.empty());
@@ -199,8 +199,8 @@
if (search_box_view_->is_search_box_active()) {
// Show zero state suggestions when search box is activated with an empty
// query.
- base::string16 raw_query = search_model_->search_box()->text();
- base::string16 query;
+ std::u16string raw_query = search_model_->search_box()->text();
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
if (query.empty())
search_box_view_->ShowZeroStateSuggestions();
diff --git a/ash/app_list/views/app_list_view.cc b/ash/app_list/views/app_list_view.cc
index f5663c2..b7905e7b0f 100644
--- a/ash/app_list/views/app_list_view.cc
+++ b/ash/app_list/views/app_list_view.cc
@@ -1275,7 +1275,7 @@
if (!delegate_->AppListTargetVisibility())
return;
- base::string16 state_announcement;
+ std::u16string state_announcement;
if (new_state == AppListViewState::kPeeking) {
state_announcement = l10n_util::GetStringUTF16(
diff --git a/ash/app_list/views/app_list_view_unittest.cc b/ash/app_list/views/app_list_view_unittest.cc
index bd8f512..310f066 100644
--- a/ash/app_list/views/app_list_view_unittest.cc
+++ b/ash/app_list/views/app_list_view_unittest.cc
@@ -263,7 +263,7 @@
views::Textfield* search_box =
view_->app_list_main_view()->search_box_view()->search_box();
// Set new text as if it is typed by a user.
- search_box->SetText(base::string16());
+ search_box->SetText(std::u16string());
search_box->InsertText(
base::UTF8ToUTF16(text),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -657,7 +657,7 @@
TestLeftAndRightKeyTraversalOnTextfield(textfield);
// Type something in textfield.
- base::string16 text =
+ std::u16string text =
text_rtl
// Arabic word of "test".
? base::UTF8ToUTF16(
@@ -959,7 +959,7 @@
// Enter - it should clear the search box.
SimulateKeyPress(ui::VKEY_RETURN, false /*shift_down*/);
EXPECT_TRUE(search_box_view()->search_box()->HasFocus());
- EXPECT_EQ(base::string16(), search_box_view()->search_box()->GetText());
+ EXPECT_EQ(std::u16string(), search_box_view()->search_box()->GetText());
EXPECT_FALSE(search_box_view()->is_search_box_active());
EXPECT_FALSE(contents_view()->search_results_page_view()->GetVisible());
ResultSelectionController* selection_controller =
@@ -986,7 +986,7 @@
// Type something in search box to transition to HALF state and populate
// fake search results.
// Type something in textfield.
- base::string16 text =
+ std::u16string text =
is_rtl_
// Arabic word of "test".
? base::UTF8ToUTF16(
@@ -1689,7 +1689,7 @@
view_->app_list_main_view()->search_box_view()->search_box();
Show();
- search_box->SetText(base::string16());
+ search_box->SetText(std::u16string());
ASSERT_EQ(ash::AppListViewState::kPeeking, view_->app_list_state());
}
@@ -1770,7 +1770,7 @@
view_->app_list_main_view()->search_box_view()->search_box();
Show();
- search_box->SetText(base::string16());
+ search_box->SetText(std::u16string());
search_box->InsertText(
base::UTF8ToUTF16("nice"),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -1787,7 +1787,7 @@
views::Textfield* search_box =
view_->app_list_main_view()->search_box_view()->search_box();
- search_box->SetText(base::string16());
+ search_box->SetText(std::u16string());
search_box->InsertText(
base::UTF8ToUTF16("https://youtu.be/dQw4w9WgXcQ"),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -1802,7 +1802,7 @@
view_->app_list_main_view()->search_box_view()->search_box();
Show();
- search_box->SetText(base::string16());
+ search_box->SetText(std::u16string());
search_box->InsertText(
base::UTF8ToUTF16("cool!"),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -2217,8 +2217,8 @@
view_->Layout();
EXPECT_TRUE(IsStateShown(ash::AppListState::kStateApps));
- base::string16 search_text = base::UTF8ToUTF16("test");
- main_view->search_box_view()->search_box()->SetText(base::string16());
+ std::u16string search_text = base::UTF8ToUTF16("test");
+ main_view->search_box_view()->search_box()->SetText(std::u16string());
main_view->search_box_view()->search_box()->InsertText(
search_text,
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -2238,8 +2238,8 @@
EXPECT_TRUE(CheckSearchBoxWidget(
contents_view->GetSearchBoxBounds(ash::AppListState::kStateApps)));
- base::string16 new_search_text = base::UTF8ToUTF16("apple");
- main_view->search_box_view()->search_box()->SetText(base::string16());
+ std::u16string new_search_text = base::UTF8ToUTF16("apple");
+ main_view->search_box_view()->search_box()->SetText(std::u16string());
main_view->search_box_view()->search_box()->InsertText(
new_search_text,
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
@@ -2293,8 +2293,8 @@
EXPECT_EQ(1, delegate_->dismiss_count());
// Show the search results.
- base::string16 new_search_text = base::UTF8ToUTF16("apple");
- search_box_view->search_box()->SetText(base::string16());
+ std::u16string new_search_text = base::UTF8ToUTF16("apple");
+ search_box_view->search_box()->SetText(std::u16string());
search_box_view->search_box()->InsertText(
new_search_text,
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
diff --git a/ash/app_list/views/apps_grid_view.cc b/ash/app_list/views/apps_grid_view.cc
index 6e320ec..6bb432a 100644
--- a/ash/app_list/views/apps_grid_view.cc
+++ b/ash/app_list/views/apps_grid_view.cc
@@ -1882,10 +1882,10 @@
if (!CanMoveSelectedToTargetForKeyboardFoldering(target_index))
return;
- const base::string16 moving_view_title = selected_view_->title()->GetText();
+ const std::u16string moving_view_title = selected_view_->title()->GetText();
AppListItemView* target_view =
GetViewDisplayedAtSlotOnCurrentPage(target_index.slot);
- const base::string16 target_view_title = target_view->title()->GetText();
+ const std::u16string target_view_title = target_view->title()->GetText();
const bool target_view_is_folder = target_view->is_folder();
AppListItemView* folder_item = MoveItemToFolder(selected_view_, target_index);
@@ -3755,7 +3755,7 @@
// Start animation.
auto animation_view = std::make_unique<TopIconAnimationView>(
- this, drag_item->GetIcon(GetAppListConfig().type()), base::string16(),
+ this, drag_item->GetIcon(GetAppListConfig().type()), std::u16string(),
target_bounds, false, true);
auto* animation_view_ptr =
items_container_->AddChildView(std::move(animation_view));
@@ -3784,7 +3784,7 @@
}
void AppsGridView::AnnounceItemNotificationBadge(
- const base::string16& selected_view_title) {
+ const std::u16string& selected_view_title) {
// Set a11y name to announce the notification badge for the focused item.
auto* announcement_view =
contents_view_->app_list_view()->announcement_view();
@@ -3794,8 +3794,8 @@
announcement_view->NotifyAccessibilityEvent(ax::mojom::Event::kAlert, true);
}
-void AppsGridView::AnnounceFolderDrop(const base::string16& moving_view_title,
- const base::string16& target_view_title,
+void AppsGridView::AnnounceFolderDrop(const std::u16string& moving_view_title,
+ const std::u16string& target_view_title,
bool target_is_folder) {
// Set a11y name to announce possible move to folder or creation of folder.
auto* announcement_view =
@@ -3810,8 +3810,8 @@
}
void AppsGridView::AnnounceKeyboardFoldering(
- const base::string16& moving_view_title,
- const base::string16& target_view_title,
+ const std::u16string& moving_view_title,
+ const std::u16string& target_view_title,
bool target_is_folder) {
// Set a11y name to announce keyboard move to folder or creation of folder.
auto* announcement_view =
diff --git a/ash/app_list/views/apps_grid_view.h b/ash/app_list/views/apps_grid_view.h
index d0db0e8..600662e 100644
--- a/ash/app_list/views/apps_grid_view.h
+++ b/ash/app_list/views/apps_grid_view.h
@@ -712,21 +712,21 @@
// Modifies the announcement view to verbalize that the focused view has new
// updates, based on the item having a notification badge.
- void AnnounceItemNotificationBadge(const base::string16& selected_view_title);
+ void AnnounceItemNotificationBadge(const std::u16string& selected_view_title);
// Modifies the announcement view to verbalize that the current drag will move
// |moving_view_title| and create a folder or move it into an existing folder
// with |target_view_title|.
- void AnnounceFolderDrop(const base::string16& moving_view_title,
- const base::string16& target_view_title,
+ void AnnounceFolderDrop(const std::u16string& moving_view_title,
+ const std::u16string& target_view_title,
bool target_is_folder);
// Modifies the announcement view to vervalize that the most recent keyboard
// foldering action has either moved |moving_view_title| into
// |target_view_title| folder or that |moving_view_title| and
// |target_view_title| have formed a new folder.
- void AnnounceKeyboardFoldering(const base::string16& moving_view_title,
- const base::string16& target_view_title,
+ void AnnounceKeyboardFoldering(const std::u16string& moving_view_title,
+ const std::u16string& target_view_title,
bool target_is_folder);
// During an app drag, creates an a11y event to verbalize drop target
diff --git a/ash/app_list/views/assistant/assistant_dialog_plate.cc b/ash/app_list/views/assistant/assistant_dialog_plate.cc
index 35154ee..6edd54f 100644
--- a/ash/app_list/views/assistant/assistant_dialog_plate.cc
+++ b/ash/app_list/views/assistant/assistant_dialog_plate.cc
@@ -127,7 +127,7 @@
void AssistantDialogPlate::OnButtonPressed(AssistantButtonId button_id) {
delegate_->OnDialogPlateButtonPressed(button_id);
- textfield_->SetText(base::string16());
+ textfield_->SetText(std::u16string());
}
bool AssistantDialogPlate::HandleKeyEvent(views::Textfield* textfield,
@@ -153,7 +153,7 @@
base::UTF16ToUTF8(trimmed_text));
}
- textfield_->SetText(base::string16());
+ textfield_->SetText(std::u16string());
return true;
}
@@ -281,7 +281,7 @@
} else {
// When the Assistant UI is no longer visible we need to clear the dialog
// plate so that text does not persist across Assistant launches.
- textfield_->SetText(base::string16());
+ textfield_->SetText(std::u16string());
HideKeyboardIfEnabled();
}
diff --git a/ash/app_list/views/assistant/assistant_page_view_unittest.cc b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
index d481d03..66cf6f3 100644
--- a/ash/app_list/views/assistant/assistant_page_view_unittest.cc
+++ b/ash/app_list/views/assistant/assistant_page_view_unittest.cc
@@ -854,7 +854,7 @@
}
TEST_F(AssistantPageViewTest, ShouldNotClearQueryWhenSwitchingToTabletMode) {
- const base::string16 query_text = base::UTF8ToUTF16("unsubmitted query");
+ const std::u16string query_text = base::UTF8ToUTF16("unsubmitted query");
ShowAssistantUiInTextMode();
input_text_field()->SetText(query_text);
diff --git a/ash/app_list/views/folder_header_view.cc b/ash/app_list/views/folder_header_view.cc
index 5f95f90..4cbe5106 100644
--- a/ash/app_list/views/folder_header_view.cc
+++ b/ash/app_list/views/folder_header_view.cc
@@ -217,7 +217,7 @@
// Name of the folder when FolderNameView is focused, used to track folder
// rename metric.
- base::string16 starting_name_;
+ std::u16string starting_name_;
// If the view is focused via a mouse press event, then selection will be
// cleared by its mouse release. To address this, defer selecting all
@@ -295,8 +295,8 @@
folder_name_view_->SetVisible(folder_name_visible_);
if (folder_name_visible_) {
- base::string16 folder_name = base::UTF8ToUTF16(folder_item_->name());
- base::string16 elided_folder_name = GetElidedFolderName(folder_name);
+ std::u16string folder_name = base::UTF8ToUTF16(folder_item_->name());
+ std::u16string elided_folder_name = GetElidedFolderName(folder_name);
folder_name_view_->SetText(elided_folder_name);
UpdateFolderNameAccessibleName();
}
@@ -309,17 +309,17 @@
// |folder_name_view_| is blank; otherwise, clear the accessible name, the
// accessible state's value is set to be folder_name_view_->GetText() by
// TextField.
- base::string16 accessible_name = folder_name_view_->GetText().empty()
+ std::u16string accessible_name = folder_name_view_->GetText().empty()
? folder_name_placeholder_text_
- : base::string16();
+ : std::u16string();
folder_name_view_->SetAccessibleName(accessible_name);
}
-const base::string16& FolderHeaderView::GetFolderNameForTest() {
+const std::u16string& FolderHeaderView::GetFolderNameForTest() {
return folder_name_view_->GetText();
}
-void FolderHeaderView::SetFolderNameForTest(const base::string16& name) {
+void FolderHeaderView::SetFolderNameForTest(const std::u16string& name) {
folder_name_view_->SetText(name);
}
@@ -348,17 +348,17 @@
return AppListConfig::instance().folder_header_max_width();
}
-base::string16 FolderHeaderView::GetElidedFolderName(
- const base::string16& folder_name) const {
+std::u16string FolderHeaderView::GetElidedFolderName(
+ const std::u16string& folder_name) const {
// Enforce the maximum folder name length.
- base::string16 name =
+ std::u16string name =
folder_name.substr(0, AppListConfig::instance().max_folder_name_chars());
// Get maximum text width for fitting into |folder_name_view_|.
int text_width = std::min(GetMaxFolderNameWidth(), width()) -
folder_name_view_->GetCaretBounds().width() -
folder_name_view_->GetInsets().width();
- base::string16 elided_name = gfx::ElideText(
+ std::u16string elided_name = gfx::ElideText(
name, folder_name_view_->GetFontList(), text_width, gfx::ELIDE_TAIL);
return elided_name;
}
@@ -370,7 +370,7 @@
gfx::Rect text_bounds(rect);
- base::string16 text = folder_name_view_->GetText().empty()
+ std::u16string text = folder_name_view_->GetText().empty()
? folder_name_placeholder_text_
: folder_name_view_->GetText();
int text_width =
@@ -390,7 +390,7 @@
}
void FolderHeaderView::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
// Temporarily remove from observer to ignore data change caused by us.
if (!folder_item_)
return;
@@ -445,7 +445,7 @@
}
void FolderHeaderView::SetPreviousFolderNameForTest(
- const base::string16& previous_name) {
+ const std::u16string& previous_name) {
previous_folder_name_ = previous_name;
}
diff --git a/ash/app_list/views/folder_header_view.h b/ash/app_list/views/folder_header_view.h
index c3e7f3e..762bf4e 100644
--- a/ash/app_list/views/folder_header_view.h
+++ b/ash/app_list/views/folder_header_view.h
@@ -58,8 +58,8 @@
void UpdateFolderNameAccessibleName();
// Gets and sets the folder name for test.
- const base::string16& GetFolderNameForTest();
- void SetFolderNameForTest(const base::string16& name);
+ const std::u16string& GetFolderNameForTest();
+ void SetFolderNameForTest(const std::u16string& name);
// Returns true if folder name is enabled, only for testing use.
bool IsFolderNameEnabledForTest() const;
@@ -67,7 +67,7 @@
int GetMaxFolderNameWidth() const;
// Returns elided folder name from |folder_name|.
- base::string16 GetElidedFolderName(const base::string16& folder_name) const;
+ std::u16string GetElidedFolderName(const std::u16string& folder_name) const;
// Returns whether |folder_name_view_| should clear focus based on
// |key_event_|.
@@ -78,7 +78,7 @@
// views::TextfieldController overrides:
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) override;
void OnBeforeUserAction(views::Textfield* sender) override;
@@ -90,11 +90,11 @@
void SetPreviousCursorPositionForTest(const size_t cursor_position);
// Sets the |previous_folder_name_|, only for testing use
- void SetPreviousFolderNameForTest(const base::string16& previous_name);
+ void SetPreviousFolderNameForTest(const std::u16string& previous_name);
// Used to restore the folder name if the new folder name is longer than the
// max chars folder length allowed
- base::Optional<base::string16> previous_folder_name_;
+ base::Optional<std::u16string> previous_folder_name_;
// Used to restore the cursor position to its last known location when
// resetting the folder name in textfield
@@ -104,7 +104,7 @@
FolderNameView* folder_name_view_; // Owned by views hierarchy.
- const base::string16 folder_name_placeholder_text_;
+ const std::u16string folder_name_placeholder_text_;
FolderHeaderViewDelegate* delegate_;
diff --git a/ash/app_list/views/folder_header_view_unittest.cc b/ash/app_list/views/folder_header_view_unittest.cc
index 2b03bc12..19678a1 100644
--- a/ash/app_list/views/folder_header_view_unittest.cc
+++ b/ash/app_list/views/folder_header_view_unittest.cc
@@ -89,7 +89,7 @@
protected:
void UpdateFolderName(const std::string& name) {
- base::string16 folder_name = base::UTF8ToUTF16(name);
+ std::u16string folder_name = base::UTF8ToUTF16(name);
folder_header_view_->SetFolderNameForTest(folder_name);
folder_header_view_->ContentsChanged(textfield_.get(), folder_name);
}
@@ -107,7 +107,7 @@
previous_cursor_position);
}
- void UpdatePreviousFolderName(const base::string16& previous_name) {
+ void UpdatePreviousFolderName(const std::u16string& previous_name) {
folder_header_view_->SetPreviousFolderNameForTest(previous_name);
}
@@ -164,7 +164,7 @@
}
std::string too_long_name = max_len_name + "a";
UpdatePreviousCursorPosition(0);
- UpdatePreviousFolderName(base::string16());
+ UpdatePreviousFolderName(std::u16string());
// Expect that the folder name does not change, and does not truncate
UpdateFolderName(too_long_name);
diff --git a/ash/app_list/views/privacy_info_view.cc b/ash/app_list/views/privacy_info_view.cc
index 083a042a..36662715 100644
--- a/ash/app_list/views/privacy_info_view.cc
+++ b/ash/app_list/views/privacy_info_view.cc
@@ -245,9 +245,9 @@
}
void PrivacyInfoView::InitText() {
- const base::string16 link = l10n_util::GetStringUTF16(link_string_id_);
+ const std::u16string link = l10n_util::GetStringUTF16(link_string_id_);
size_t offset;
- const base::string16 text =
+ const std::u16string text =
l10n_util::GetStringFUTF16(info_string_id_, link, &offset);
text_view_ = AddChildView(std::make_unique<PrivacyTextView>(this));
text_view_->SetText(text);
@@ -286,7 +286,7 @@
gfx::kGoogleGrey700));
close_button->SetImageHorizontalAlignment(views::ImageButton::ALIGN_CENTER);
close_button->SetImageVerticalAlignment(views::ImageButton::ALIGN_MIDDLE);
- base::string16 close_button_label(l10n_util::GetStringUTF16(IDS_APP_CLOSE));
+ std::u16string close_button_label(l10n_util::GetStringUTF16(IDS_APP_CLOSE));
close_button->SetAccessibleName(close_button_label);
close_button->SetTooltipText(close_button_label);
close_button->SetFocusBehavior(FocusBehavior::ALWAYS);
diff --git a/ash/app_list/views/remove_query_confirmation_dialog.cc b/ash/app_list/views/remove_query_confirmation_dialog.cc
index a23f7258..78d814b 100644
--- a/ash/app_list/views/remove_query_confirmation_dialog.cc
+++ b/ash/app_list/views/remove_query_confirmation_dialog.cc
@@ -24,7 +24,7 @@
} // namespace
RemoveQueryConfirmationDialog::RemoveQueryConfirmationDialog(
- const base::string16& query,
+ const std::u16string& query,
RemovalConfirmationCallback confirm_callback)
: confirm_callback_(std::move(confirm_callback)) {
SetModalType(ui::MODAL_TYPE_WINDOW);
diff --git a/ash/app_list/views/remove_query_confirmation_dialog.h b/ash/app_list/views/remove_query_confirmation_dialog.h
index ce623c5..939352e 100644
--- a/ash/app_list/views/remove_query_confirmation_dialog.h
+++ b/ash/app_list/views/remove_query_confirmation_dialog.h
@@ -21,7 +21,7 @@
// associated result.
using RemovalConfirmationCallback = base::OnceCallback<void(bool)>;
- RemoveQueryConfirmationDialog(const base::string16& query,
+ RemoveQueryConfirmationDialog(const std::u16string& query,
RemovalConfirmationCallback callback);
~RemoveQueryConfirmationDialog() override;
diff --git a/ash/app_list/views/result_selection_controller_unittest.cc b/ash/app_list/views/result_selection_controller_unittest.cc
index dd15ba9f..780b8212 100644
--- a/ash/app_list/views/result_selection_controller_unittest.cc
+++ b/ash/app_list/views/result_selection_controller_unittest.cc
@@ -120,7 +120,7 @@
result_view->GetActionsView()->SetActions(
std::vector<SearchResult::Action>(
params.actions_per_result.value(),
- SearchResult::Action(gfx::ImageSkia(), base::string16(),
+ SearchResult::Action(gfx::ImageSkia(), std::u16string(),
false)));
search_result_views_.emplace_back(std::move(result_view));
} else {
@@ -1284,7 +1284,7 @@
// Remove two trailing actions - the result action is de-selected.
selected_view->AsResultViewWithActions()->GetActionsView()->SetActions(
std::vector<SearchResult::Action>(
- 1, SearchResult::Action(gfx::ImageSkia(), base::string16(), false)));
+ 1, SearchResult::Action(gfx::ImageSkia(), std::u16string(), false)));
ASSERT_EQ(create_test_location(0, 1), GetCurrentLocation());
EXPECT_TRUE(CurrentResultActionNotSelected());
diff --git a/ash/app_list/views/search_box_view.cc b/ash/app_list/views/search_box_view.cc
index aa15c5f4..69f0b6b 100644
--- a/ash/app_list/views/search_box_view.cc
+++ b/ash/app_list/views/search_box_view.cc
@@ -75,8 +75,8 @@
return 1.f;
}
-bool IsTrimmedQueryEmpty(const base::string16& query) {
- base::string16 trimmed_query;
+bool IsTrimmedQueryEmpty(const std::u16string& query) {
+ std::u16string trimmed_query;
base::TrimWhitespace(query, base::TrimPositions::TRIM_ALL, &trimmed_query);
return trimmed_query.empty();
}
@@ -244,7 +244,7 @@
AppListColorProvider::Get()->GetSearchBoxIconColor(
gfx::kGoogleGrey700)));
close->SetVisible(false);
- base::string16 close_button_label(
+ std::u16string close_button_label(
l10n_util::GetStringUTF16(IDS_APP_LIST_CLEAR_SEARCHBOX));
close->SetAccessibleName(close_button_label);
close->SetTooltipText(close_button_label);
@@ -258,7 +258,7 @@
back->SetImageHorizontalAlignment(views::ImageButton::ALIGN_CENTER);
back->SetImageVerticalAlignment(views::ImageButton::ALIGN_MIDDLE);
back->SetVisible(false);
- base::string16 back_button_label(
+ std::u16string back_button_label(
l10n_util::GetStringUTF16(IDS_APP_LIST_BACK));
back->SetAccessibleName(back_button_label);
back->SetTooltipText(back_button_label);
@@ -293,7 +293,7 @@
void SearchBoxView::OnSearchBoxActiveChanged(bool active) {
if (active) {
- search_box()->SetAccessibleName(base::string16());
+ search_box()->SetAccessibleName(std::u16string());
} else {
search_box()->SetAccessibleName(l10n_util::GetStringUTF16(
is_tablet_mode_
@@ -399,7 +399,7 @@
void SearchBoxView::ShowZeroStateSuggestions() {
base::RecordAction(
base::UserMetricsAction("AppList_ShowZeroStateSuggestions"));
- base::string16 empty_query;
+ std::u16string empty_query;
ContentsChanged(search_box(), empty_query);
}
@@ -439,7 +439,7 @@
}
// Current non-autocompleted text.
- const base::string16& user_typed_text =
+ const std::u16string& user_typed_text =
search_box()->GetText().substr(0, highlight_range_.start());
if (last_key_pressed_ == ui::VKEY_BACK ||
last_key_pressed_ == ui::VKEY_DELETE || IsArrowKey(last_key_pressed_) ||
@@ -450,8 +450,8 @@
return;
}
- const base::string16& details = first_visible_result->details();
- const base::string16& search_text = first_visible_result->title();
+ const std::u16string& details = first_visible_result->details();
+ const std::u16string& search_text = first_visible_result->title();
if (base::StartsWith(details, user_typed_text,
base::CompareCase::INSENSITIVE_ASCII)) {
// Current text in the search_box matches the first result's url.
@@ -523,7 +523,7 @@
}
void SearchBoxView::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
if (IsTrimmedQueryEmpty(current_query_) && !IsSearchBoxTrimmedQueryEmpty()) {
// User enters a new search query. Record the action.
base::RecordAction(base::UserMetricsAction("AppList_SearchQueryStarted"));
@@ -540,11 +540,11 @@
}
void SearchBoxView::SetAutocompleteText(
- const base::string16& autocomplete_text) {
+ const std::u16string& autocomplete_text) {
if (!ShouldProcessAutocomplete())
return;
- const base::string16& current_text = search_box()->GetText();
+ const std::u16string& current_text = search_box()->GetText();
// Currrent text is a prefix of autocomplete text.
DCHECK(base::StartsWith(autocomplete_text, current_text,
base::CompareCase::INSENSITIVE_ASCII));
@@ -552,7 +552,7 @@
if (autocomplete_text == current_text)
return;
- const base::string16& highlighted_text =
+ const std::u16string& highlighted_text =
autocomplete_text.substr(highlight_range_.start());
// Don't set autocomplete text if the highlighted text is the same as before.
@@ -581,7 +581,7 @@
NotifyAccessibilityEvent(ax::mojom::Event::kValueChanged, true);
}
-void SearchBoxView::UpdateQuery(const base::string16& new_query) {
+void SearchBoxView::UpdateQuery(const std::u16string& new_query) {
search_box()->SetText(new_query);
ContentsChanged(search_box(), new_query);
}
@@ -670,7 +670,7 @@
selected_result->OnKeyEvent(&event);
// Reset the selected result to the default result.
selection_controller->ResetSelection(nullptr, true /* default_selection */);
- search_box()->SetText(base::string16());
+ search_box()->SetText(std::u16string());
return true;
}
@@ -819,7 +819,7 @@
gfx::CreateVectorIcon(chromeos::kAssistantIcon, kSearchBoxIconSize,
AppListColorProvider::Get()->GetSearchBoxIconColor(
gfx::kGoogleGrey700)));
- base::string16 assistant_button_label(
+ std::u16string assistant_button_label(
l10n_util::GetStringUTF16(IDS_APP_LIST_START_ASSISTANT));
assistant->SetAccessibleName(assistant_button_label);
assistant->SetTooltipText(assistant_button_label);
diff --git a/ash/app_list/views/search_box_view.h b/ash/app_list/views/search_box_view.h
index 98ab7ef1d..839afa8 100644
--- a/ash/app_list/views/search_box_view.h
+++ b/ash/app_list/views/search_box_view.h
@@ -99,7 +99,7 @@
void ProcessAutocomplete();
// Updates the search box with |new_query| and starts a new search.
- void UpdateQuery(const base::string16& new_query);
+ void UpdateQuery(const std::u16string& new_query);
// Clears the search query and de-activate the search box.
void ClearSearchAndDeactivateSearchBox();
@@ -133,12 +133,12 @@
// After verifying autocomplete text is valid, sets the current searchbox
// text to the autocomplete text and sets the text highlight.
- void SetAutocompleteText(const base::string16& autocomplete_text);
+ void SetAutocompleteText(const std::u16string& autocomplete_text);
// Overridden from views::TextfieldController:
void OnBeforeUserAction(views::Textfield* sender) override;
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) override;
bool HandleMouseEvent(views::Textfield* sender,
@@ -161,7 +161,7 @@
// Clear highlight range.
void ResetHighlightRange();
- base::string16 current_query_;
+ std::u16string current_query_;
// The range of highlighted text for autocomplete.
gfx::Range highlight_range_;
diff --git a/ash/app_list/views/search_box_view_unittest.cc b/ash/app_list/views/search_box_view_unittest.cc
index 151a3e6..60b318a 100644
--- a/ash/app_list/views/search_box_view_unittest.cc
+++ b/ash/app_list/views/search_box_view_unittest.cc
@@ -123,13 +123,13 @@
if (::isalnum(static_cast<int>(key_code))) {
char16_t character = ::tolower(static_cast<int>(key_code));
view()->search_box()->InsertText(
- base::string16(1, character),
+ std::u16string(1, character),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
}
}
std::string GetLastQueryAndReset() {
- base::string16 query = last_query_;
+ std::u16string query = last_query_;
last_query_.clear();
return base::UTF16ToUTF8(query);
}
@@ -143,8 +143,8 @@
// Creates a SearchResult with the given parameters.
void CreateSearchResult(ash::SearchResultDisplayType display_type,
double display_score,
- const base::string16& title,
- const base::string16& details) {
+ const std::u16string& title,
+ const std::u16string& details) {
CreateSearchResultAt(results()->item_count(), display_type, display_score,
title, details);
}
@@ -154,8 +154,8 @@
void CreateSearchResultAt(size_t index,
ash::SearchResultDisplayType display_type,
double display_score,
- const base::string16& title,
- const base::string16& details) {
+ const std::u16string& title,
+ const std::u16string& details) {
auto search_result = std::make_unique<TestSearchResult>();
search_result->set_result_id(base::NumberToString(++last_result_id_));
search_result->set_display_type(display_type);
@@ -186,7 +186,7 @@
AppListView* app_list_view_ = nullptr;
std::unique_ptr<SearchBoxView> view_;
KeyPressCounterView* counter_view_;
- base::string16 last_query_;
+ std::u16string last_query_;
int query_changed_count_ = 0;
int last_result_id_ = 0;
@@ -312,9 +312,9 @@
SetSearchBoxActive(true, ui::ET_UNKNOWN);
view()->search_box()->SetText(base::ASCIIToUTF16("test"));
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.7,
- base::ASCIIToUTF16("tester"), base::string16());
+ base::ASCIIToUTF16("tester"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("testing"), base::string16());
+ base::ASCIIToUTF16("testing"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -330,7 +330,7 @@
// Add a new result - the selection controller is updated asynchronously, so
// the result is expected to remain the same until the loop is run.
CreateSearchResultAt(0, ash::SearchResultDisplayType::kList, 1.,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
EXPECT_EQ(selection,
result_page_view->result_selection_controller()->selected_result());
EXPECT_EQ(base::ASCIIToUTF16("tester"), selection->result()->title());
@@ -365,9 +365,9 @@
SetSearchBoxActive(true, ui::ET_UNKNOWN);
view()->search_box()->SetText(base::ASCIIToUTF16("test"));
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.7,
- base::ASCIIToUTF16("tester"), base::string16());
+ base::ASCIIToUTF16("tester"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("testing"), base::string16());
+ base::ASCIIToUTF16("testing"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -385,7 +385,7 @@
// the loop is run.
results()->RemoveAll();
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
EXPECT_EQ(selection,
result_page_view->result_selection_controller()->selected_result());
EXPECT_FALSE(selection->result());
@@ -414,9 +414,9 @@
SetSearchBoxActive(true, ui::ET_UNKNOWN);
view()->search_box()->SetText(base::ASCIIToUTF16("test"));
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.7,
- base::ASCIIToUTF16("tester"), base::string16());
+ base::ASCIIToUTF16("tester"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("testing"), base::string16());
+ base::ASCIIToUTF16("testing"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -438,7 +438,7 @@
// Add a new result - verify the selected result remains the same.
CreateSearchResultAt(0, ash::SearchResultDisplayType::kList, 0.9,
- base::ASCIIToUTF16("test1"), base::string16());
+ base::ASCIIToUTF16("test1"), std::u16string());
// Finish results update.
base::RunLoop().RunUntilIdle();
@@ -448,7 +448,7 @@
// Add a new result at the end, and verify the selection stays the same.
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.2,
- base::ASCIIToUTF16("testing almost"), base::string16());
+ base::ASCIIToUTF16("testing almost"), std::u16string());
base::RunLoop().RunUntilIdle();
selection =
@@ -480,7 +480,7 @@
// New result can override the default selection.
CreateSearchResultAt(0, ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
selection =
@@ -493,9 +493,9 @@
SetSearchBoxActive(true, ui::ET_UNKNOWN);
view()->search_box()->SetText(base::ASCIIToUTF16("test"));
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.7,
- base::ASCIIToUTF16("tester"), base::string16());
+ base::ASCIIToUTF16("tester"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("testing"), base::string16());
+ base::ASCIIToUTF16("testing"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -518,7 +518,7 @@
// Add a new result in a tile container - verify the selected result remains
// the same.
CreateSearchResultAt(0, ash::SearchResultDisplayType::kTile, 0.9,
- base::ASCIIToUTF16("test tile"), base::string16());
+ base::ASCIIToUTF16("test tile"), std::u16string());
// Finish results update.
base::RunLoop().RunUntilIdle();
@@ -528,7 +528,7 @@
// Add a new result at the end, and verify the selection stays the same.
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.2,
- base::ASCIIToUTF16("testing almost"), base::string16());
+ base::ASCIIToUTF16("testing almost"), std::u16string());
base::RunLoop().RunUntilIdle();
selection =
@@ -554,7 +554,7 @@
// New result can override the default selection.
CreateSearchResultAt(0, ash::SearchResultDisplayType::kTile, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
selection =
@@ -567,9 +567,9 @@
TEST_F(SearchBoxViewTest, ResetSelectionAfterResettingSearchBox) {
SetSearchBoxActive(true, ui::ET_UNKNOWN);
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.7,
- base::ASCIIToUTF16("test1"), base::string16());
+ base::ASCIIToUTF16("test1"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("test2"), base::string16());
+ base::ASCIIToUTF16("test2"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -647,7 +647,7 @@
// Set up the search box.
SetSearchBoxActive(true, ui::ET_UNKNOWN);
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
SearchResultPageView* const result_page_view =
@@ -701,7 +701,7 @@
// Set up the search box.
SetSearchBoxActive(true, ui::ET_UNKNOWN);
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
EXPECT_EQ(contents_view->search_results_page_view()
@@ -731,7 +731,7 @@
// Set up the search box.
SetSearchBoxActive(true, ui::ET_UNKNOWN);
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
ResultSelectionController* const selection_controller =
@@ -749,7 +749,7 @@
// Create a new search result. The privacy view should have no actions
// remaining.
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("testing"), base::string16());
+ base::ASCIIToUTF16("testing"), std::u16string());
base::RunLoop().RunUntilIdle();
KeyPress(ui::VKEY_TAB);
@@ -773,7 +773,7 @@
// Set up the search box.
SetSearchBoxActive(true, ui::ET_UNKNOWN);
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("test"), base::string16());
+ base::ASCIIToUTF16("test"), std::u16string());
base::RunLoop().RunUntilIdle();
ResultSelectionController* const selection_controller =
@@ -872,7 +872,7 @@
void SetupAutocompleteBehaviorTest() {
// Add a search result with a non-empty title field.
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("hello world!"), base::string16());
+ base::ASCIIToUTF16("hello world!"), std::u16string());
base::RunLoop().RunUntilIdle();
// Send H, E to the SearchBoxView textfield, then trigger an autocomplete.
@@ -884,7 +884,7 @@
// Clears all existing text from search_box() and all existing SearchResults
// from results().
void ResetAutocompleteBehaviorTest() {
- view()->search_box()->SetText(base::string16());
+ view()->search_box()->SetText(std::u16string());
results()->RemoveAll();
}
@@ -972,9 +972,9 @@
// Add two SearchResults, one tile and one list result. Initialize their title
// field to a non-empty string.
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("hello list"), base::string16());
+ base::ASCIIToUTF16("hello list"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kTile, 0.5,
- base::ASCIIToUTF16("hello tile"), base::string16());
+ base::ASCIIToUTF16("hello tile"), std::u16string());
base::RunLoop().RunUntilIdle();
// Send H, E to the SearchBoxView textfield, then trigger an autocomplete.
@@ -994,9 +994,9 @@
// Add two SearchResults, one tile and one list result. Initialize their title
// field to a non-empty string.
CreateSearchResult(ash::SearchResultDisplayType::kTile, 1.0,
- base::ASCIIToUTF16("hello tile"), base::string16());
+ base::ASCIIToUTF16("hello tile"), std::u16string());
CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5,
- base::ASCIIToUTF16("hello list"), base::string16());
+ base::ASCIIToUTF16("hello list"), std::u16string());
base::RunLoop().RunUntilIdle();
// Send H, E to the SearchBoxView textfield, then trigger an autocomplete.
@@ -1015,9 +1015,9 @@
// Add two SearchResults, one tile and one list result. The tile should
// display first, despite having a lower score. Initialize their details field
// to a non-empty string.
- CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0, base::string16(),
+ CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0, std::u16string(),
base::ASCIIToUTF16("hello list"));
- CreateSearchResult(ash::SearchResultDisplayType::kTile, 0.5, base::string16(),
+ CreateSearchResult(ash::SearchResultDisplayType::kTile, 0.5, std::u16string(),
base::ASCIIToUTF16("hello tile"));
base::RunLoop().RunUntilIdle();
@@ -1036,9 +1036,9 @@
SearchBoxAutocompletesTopTileResultDetails) {
// Add two SearchResults, one tile and one list result. Initialize their
// details field to a non-empty string.
- CreateSearchResult(ash::SearchResultDisplayType::kTile, 1.0, base::string16(),
+ CreateSearchResult(ash::SearchResultDisplayType::kTile, 1.0, std::u16string(),
base::ASCIIToUTF16("hello tile"));
- CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5, base::string16(),
+ CreateSearchResult(ash::SearchResultDisplayType::kList, 0.5, std::u16string(),
base::ASCIIToUTF16("hello list"));
base::RunLoop().RunUntilIdle();
@@ -1073,7 +1073,7 @@
TEST_F(SearchBoxViewAutocompleteTest, SearchBoxAutocompletesAcceptsNextChar) {
// Add a search result with a non-empty title field.
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("hello world!"), base::string16());
+ base::ASCIIToUTF16("hello world!"), std::u16string());
base::RunLoop().RunUntilIdle();
// Send H, E to the SearchBoxView textfield, then trigger an autocomplete.
@@ -1083,7 +1083,7 @@
// After typing L, the highlighted text will be replaced by L.
KeyPress(ui::VKEY_L);
- base::string16 selected_text = view()->search_box()->GetSelectedText();
+ std::u16string selected_text = view()->search_box()->GetSelectedText();
EXPECT_EQ(view()->search_box()->GetText(), base::ASCIIToUTF16("hel"));
EXPECT_EQ(base::ASCIIToUTF16(""), selected_text);
@@ -1111,7 +1111,7 @@
TEST_F(SearchBoxViewAutocompleteTest, SearchBoxAutocompletesNotHandledForIME) {
// Add a search result with a non-empty title field.
CreateSearchResult(ash::SearchResultDisplayType::kList, 1.0,
- base::ASCIIToUTF16("hello world!"), base::string16());
+ base::ASCIIToUTF16("hello world!"), std::u16string());
base::RunLoop().RunUntilIdle();
// Simulate uncomposited text. The autocomplete should be handled.
@@ -1120,11 +1120,11 @@
view()->set_highlight_range_for_test(gfx::Range(2, 2));
view()->ProcessAutocomplete();
- base::string16 selected_text = view()->search_box()->GetSelectedText();
+ std::u16string selected_text = view()->search_box()->GetSelectedText();
EXPECT_EQ(view()->search_box()->GetText(),
base::ASCIIToUTF16("hello world!"));
EXPECT_EQ(base::ASCIIToUTF16("llo world!"), selected_text);
- view()->search_box()->SetText(base::string16());
+ view()->search_box()->SetText(std::u16string());
// Simulate IME composition text. The autocomplete should not be handled.
ui::CompositionText composition_text;
diff --git a/ash/app_list/views/search_result_base_view.cc b/ash/app_list/views/search_result_base_view.cc
index 3233f93..5d283d8 100644
--- a/ash/app_list/views/search_result_base_view.cc
+++ b/ash/app_list/views/search_result_base_view.cc
@@ -82,14 +82,14 @@
SetResult(nullptr);
}
-base::string16 SearchResultBaseView::ComputeAccessibleName() const {
+std::u16string SearchResultBaseView::ComputeAccessibleName() const {
if (!result())
- return base::string16();
+ return std::u16string();
if (!result()->accessible_name().empty())
return result()->accessible_name();
- base::string16 accessible_name = result()->title();
+ std::u16string accessible_name = result()->title();
if (!result()->title().empty() && !result()->details().empty())
accessible_name += base::ASCIIToUTF16(", ");
accessible_name += result()->details();
diff --git a/ash/app_list/views/search_result_base_view.h b/ash/app_list/views/search_result_base_view.h
index eb31696..4e67029 100644
--- a/ash/app_list/views/search_result_base_view.h
+++ b/ash/app_list/views/search_result_base_view.h
@@ -63,7 +63,7 @@
void OnResultDestroying() override;
// Computes the button's spoken feedback name.
- virtual base::string16 ComputeAccessibleName() const;
+ virtual std::u16string ComputeAccessibleName() const;
// Clears the result without calling |OnResultChanged| or |OnResultChanging|
void ClearResult();
diff --git a/ash/app_list/views/search_result_page_view.cc b/ash/app_list/views/search_result_page_view.cc
index 58c425ca2..9aabe3f 100644
--- a/ash/app_list/views/search_result_page_view.cc
+++ b/ash/app_list/views/search_result_page_view.cc
@@ -262,8 +262,8 @@
node_data->role = ax::mojom::Role::kListBox;
- base::string16 value;
- base::string16 query = search_model_->search_box()->text();
+ std::u16string value;
+ std::u16string query = search_model_->search_box()->text();
if (!query.empty()) {
if (last_search_result_count_ == 1) {
value = l10n_util::GetStringFUTF16(
diff --git a/ash/app_list/views/search_result_suggestion_chip_view.cc b/ash/app_list/views/search_result_suggestion_chip_view.cc
index 6f7ac35..b6b725d5 100644
--- a/ash/app_list/views/search_result_suggestion_chip_view.cc
+++ b/ash/app_list/views/search_result_suggestion_chip_view.cc
@@ -190,29 +190,29 @@
icon_view_->SetVisible(true);
}
-void SearchResultSuggestionChipView::SetText(const base::string16& text) {
+void SearchResultSuggestionChipView::SetText(const std::u16string& text) {
text_view_->SetText(text);
gfx::Size size = text_view_->CalculatePreferredSize();
size.set_width(std::min(kMaxTextWidth, size.width()));
text_view_->SetPreferredSize(size);
}
-const base::string16& SearchResultSuggestionChipView::GetText() const {
+const std::u16string& SearchResultSuggestionChipView::GetText() const {
return text_view_->GetText();
}
void SearchResultSuggestionChipView::UpdateSuggestionChipView() {
if (!result()) {
SetIcon(gfx::ImageSkia());
- SetText(base::string16());
- SetAccessibleName(base::string16());
+ SetText(std::u16string());
+ SetAccessibleName(std::u16string());
return;
}
SetIcon(result()->chip_icon());
SetText(result()->title());
- base::string16 accessible_name = result()->title();
+ std::u16string accessible_name = result()->title();
if (result()->id() == kInternalAppIdContinueReading) {
accessible_name = l10n_util::GetStringFUTF16(
IDS_APP_LIST_CONTINUE_READING_ACCESSIBILE_NAME, accessible_name);
@@ -242,7 +242,7 @@
text_view_->SetAutoColorReadabilityEnabled(false);
text_view_->SetSubpixelRenderingEnabled(false);
text_view_->SetFontList(AppListConfig::instance().app_title_font());
- SetText(base::string16());
+ SetText(std::u16string());
text_view_->SetEnabledColor(
AppListColorProvider::Get()->GetSuggestionChipTextColor());
}
diff --git a/ash/app_list/views/search_result_suggestion_chip_view.h b/ash/app_list/views/search_result_suggestion_chip_view.h
index 80ff776..89b0714 100644
--- a/ash/app_list/views/search_result_suggestion_chip_view.h
+++ b/ash/app_list/views/search_result_suggestion_chip_view.h
@@ -60,8 +60,8 @@
void SetIcon(const gfx::ImageSkia& icon);
- void SetText(const base::string16& text);
- const base::string16& GetText() const;
+ void SetText(const std::u16string& text);
+ const std::u16string& GetText() const;
private:
// Updates the suggestion chip view's title and icon.
diff --git a/ash/app_list/views/search_result_tile_item_list_view.cc b/ash/app_list/views/search_result_tile_item_list_view.cc
index 45380c1..9ceda9f 100644
--- a/ash/app_list/views/search_result_tile_item_list_view.cc
+++ b/ash/app_list/views/search_result_tile_item_list_view.cc
@@ -194,7 +194,7 @@
// Track play store results and start the timer for recording their impression
// UMA metrics.
- base::string16 user_typed_query = GetUserTypedQuery();
+ std::u16string user_typed_query = GetUserTypedQuery();
if (found_playstore_results && user_typed_query != recent_playstore_query_) {
recent_playstore_query_ = user_typed_query;
playstore_impression_timer_.Stop();
@@ -250,8 +250,8 @@
}
std::vector<SearchResult*> SearchResultTileItemListView::GetDisplayResults() {
- base::string16 raw_query = search_box_->GetText();
- base::string16 query;
+ std::u16string raw_query = search_box_->GetText();
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
// We ask for |max_search_result_tiles_| policy tile results first,
@@ -315,13 +315,13 @@
return display_results;
}
-base::string16 SearchResultTileItemListView::GetUserTypedQuery() {
- base::string16 search_box_text = search_box_->GetText();
+std::u16string SearchResultTileItemListView::GetUserTypedQuery() {
+ std::u16string search_box_text = search_box_->GetText();
gfx::Range range = search_box_->GetSelectedRange();
- base::string16 raw_query = range.is_empty()
+ std::u16string raw_query = range.is_empty()
? search_box_text
: search_box_text.substr(0, range.start());
- base::string16 query;
+ std::u16string query;
base::TrimWhitespace(raw_query, base::TRIM_ALL, &query);
return query;
}
diff --git a/ash/app_list/views/search_result_tile_item_list_view.h b/ash/app_list/views/search_result_tile_item_list_view.h
index 8fc2b17..2460da6 100644
--- a/ash/app_list/views/search_result_tile_item_list_view.h
+++ b/ash/app_list/views/search_result_tile_item_list_view.h
@@ -57,7 +57,7 @@
std::vector<SearchResult*> GetDisplayResults();
- base::string16 GetUserTypedQuery();
+ std::u16string GetUserTypedQuery();
void OnPlayStoreImpressionTimer();
@@ -73,7 +73,7 @@
views::Textfield* search_box_ = nullptr;
views::BoxLayout* layout_ = nullptr;
- base::string16 recent_playstore_query_;
+ std::u16string recent_playstore_query_;
base::OneShotTimer playstore_impression_timer_;
diff --git a/ash/app_list/views/search_result_tile_item_view.cc b/ash/app_list/views/search_result_tile_item_view.cc
index 6d6ae70d..b642f65 100644
--- a/ash/app_list/views/search_result_tile_item_view.cc
+++ b/ash/app_list/views/search_result_tile_item_view.cc
@@ -198,8 +198,8 @@
UpdateAccessibleName();
}
-base::string16 SearchResultTileItemView::ComputeAccessibleName() const {
- base::string16 accessible_name;
+std::u16string SearchResultTileItemView::ComputeAccessibleName() const {
+ std::u16string accessible_name;
if (!result()->accessible_name().empty())
return result()->accessible_name();
@@ -440,7 +440,7 @@
badge_->SetVisible(true);
}
-void SearchResultTileItemView::SetTitle(const base::string16& title) {
+void SearchResultTileItemView::SetTitle(const std::u16string& title) {
title_->SetText(title);
}
@@ -459,7 +459,7 @@
rating_star_->SetVisible(true);
}
-void SearchResultTileItemView::SetPrice(const base::string16& price) {
+void SearchResultTileItemView::SetPrice(const std::u16string& price) {
if (!price_)
return;
@@ -592,14 +592,14 @@
AppListConfig::instance().search_tile_height());
}
-base::string16 SearchResultTileItemView::GetTooltipText(
+std::u16string SearchResultTileItemView::GetTooltipText(
const gfx::Point& p) const {
// Use the label to generate a tooltip, so that it will consider its text
// truncation in making the tooltip. We do not want the label itself to have a
// tooltip, so we only temporarily enable it to get the tooltip text from the
// label, then disable it again.
title_->SetHandlesTooltips(true);
- base::string16 tooltip = title_->GetTooltipText(p);
+ std::u16string tooltip = title_->GetTooltipText(p);
title_->SetHandlesTooltips(false);
return tooltip;
}
diff --git a/ash/app_list/views/search_result_tile_item_view.h b/ash/app_list/views/search_result_tile_item_view.h
index e022536..38f1523 100644
--- a/ash/app_list/views/search_result_tile_item_view.h
+++ b/ash/app_list/views/search_result_tile_item_view.h
@@ -40,7 +40,7 @@
void OnResultChanged() override;
// Overridden from SearchResultBaseView:
- base::string16 ComputeAccessibleName() const override;
+ std::u16string ComputeAccessibleName() const override;
// Informs the SearchResultTileItemView of its parent's background color. The
// controls within the SearchResultTileItemView will adapt to suit the given
@@ -88,9 +88,9 @@
void SetIcon(const gfx::ImageSkia& icon);
void SetBadgeIcon(const ui::ImageModel& badge_icon,
bool use_badge_icon_background);
- void SetTitle(const base::string16& title);
+ void SetTitle(const std::u16string& title);
void SetRating(float rating);
- void SetPrice(const base::string16& price);
+ void SetPrice(const std::u16string& price);
AppListMenuModelAdapter::AppListViewAppType GetAppType() const;
@@ -106,7 +106,7 @@
void Layout() override;
const char* GetClassName() const override;
gfx::Size CalculatePreferredSize() const override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
AppListViewDelegate* const view_delegate_; // Owned by AppListView.
diff --git a/ash/app_list/views/top_icon_animation_view.cc b/ash/app_list/views/top_icon_animation_view.cc
index 6ab7abf..89e6477 100644
--- a/ash/app_list/views/top_icon_animation_view.cc
+++ b/ash/app_list/views/top_icon_animation_view.cc
@@ -18,7 +18,7 @@
TopIconAnimationView::TopIconAnimationView(AppsGridView* grid,
const gfx::ImageSkia& icon,
- const base::string16& title,
+ const std::u16string& title,
const gfx::Rect& scaled_rect,
bool open_folder,
bool item_in_folder_icon)
diff --git a/ash/app_list/views/top_icon_animation_view.h b/ash/app_list/views/top_icon_animation_view.h
index 1cd7a9c..139ba43 100644
--- a/ash/app_list/views/top_icon_animation_view.h
+++ b/ash/app_list/views/top_icon_animation_view.h
@@ -45,7 +45,7 @@
// The view will be self-cleaned by the end of animation.
TopIconAnimationView(AppsGridView* grid,
const gfx::ImageSkia& icon,
- const base::string16& title,
+ const std::u16string& title,
const gfx::Rect& scaled_rect,
bool open_folder,
bool item_in_folder_icon);
diff --git a/ash/app_menu/notification_item_view.cc b/ash/app_menu/notification_item_view.cc
index 0697dd0..1f8dbfd 100644
--- a/ash/app_menu/notification_item_view.cc
+++ b/ash/app_menu/notification_item_view.cc
@@ -47,8 +47,8 @@
NotificationItemView::NotificationItemView(
NotificationMenuView::Delegate* delegate,
views::SlideOutControllerDelegate* slide_out_controller_delegate,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
const gfx::Image& icon,
const std::string& notification_id)
: delegate_(delegate),
@@ -95,8 +95,8 @@
NotificationItemView::~NotificationItemView() = default;
-void NotificationItemView::UpdateContents(const base::string16& title,
- const base::string16& message,
+void NotificationItemView::UpdateContents(const std::u16string& title,
+ const std::u16string& message,
const gfx::Image& icon) {
if (title_ != title) {
title_ = title;
diff --git a/ash/app_menu/notification_item_view.h b/ash/app_menu/notification_item_view.h
index c949bb5..1d54e21 100644
--- a/ash/app_menu/notification_item_view.h
+++ b/ash/app_menu/notification_item_view.h
@@ -36,16 +36,16 @@
NotificationItemView(
NotificationMenuView::Delegate* delegate,
views::SlideOutControllerDelegate* slide_out_controller_delegate,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
const gfx::Image& icon,
const std::string& notification_id);
~NotificationItemView() override;
// Updates the contents of the view.
- void UpdateContents(const base::string16& title,
- const base::string16& message,
+ void UpdateContents(const std::u16string& title,
+ const std::u16string& message,
const gfx::Image& icon);
// views::View overrides:
@@ -57,8 +57,8 @@
void OnGestureEvent(ui::GestureEvent* event) override;
const std::string& notification_id() const { return notification_id_; }
- const base::string16& title() const { return title_; }
- const base::string16& message() const { return message_; }
+ const std::u16string& title() const { return title_; }
+ const std::u16string& message() const { return message_; }
const message_center::ProportionalImageView& proportional_image_view() const {
return *proportional_icon_view_;
}
@@ -83,8 +83,8 @@
std::unique_ptr<views::SlideOutController> slide_out_controller_;
// Notification properties.
- base::string16 title_;
- base::string16 message_;
+ std::u16string title_;
+ std::u16string message_;
// The identifier used by MessageCenter to identify this notification.
const std::string notification_id_;
diff --git a/ash/app_menu/notification_menu_controller.cc b/ash/app_menu/notification_menu_controller.cc
index b845346..ad567bad 100644
--- a/ash/app_menu/notification_menu_controller.cc
+++ b/ash/app_menu/notification_menu_controller.cc
@@ -125,7 +125,7 @@
}
app_menu_model_adapter_->model()->AddItem(NOTIFICATION_CONTAINER,
- base::string16());
+ std::u16string());
// Add the container MenuItemView to |root_menu_|.
views::MenuItemView* container =
root_menu_->AppendMenuItem(NOTIFICATION_CONTAINER);
diff --git a/ash/app_menu/notification_menu_header_view.cc b/ash/app_menu/notification_menu_header_view.cc
index ed30b80..5f88e3d 100644
--- a/ash/app_menu/notification_menu_header_view.cc
+++ b/ash/app_menu/notification_menu_header_view.cc
@@ -30,7 +30,7 @@
kNotificationVerticalPadding, kNotificationHorizontalPadding)));
notification_title_ = new views::Label(
- base::string16(l10n_util::GetStringUTF16(
+ std::u16string(l10n_util::GetStringUTF16(
IDS_MESSAGE_CENTER_NOTIFICATION_ACCESSIBLE_NAME_PLURAL)),
{views::Label::GetDefaultFontList().DeriveWithSizeDelta(1)});
notification_title_->SetEnabledColor(kNotificationHeaderTextColor);
@@ -38,7 +38,7 @@
AddChildView(notification_title_);
counter_ = new views::Label(
- base::string16(),
+ std::u16string(),
{views::Label::GetDefaultFontList().DeriveWithSizeDelta(1)});
counter_->SetEnabledColor(kNotificationHeaderTextColor);
counter_->SetLineHeight(kNotificationHeaderLineHeight);
diff --git a/ash/app_menu/notification_menu_view_test_api.cc b/ash/app_menu/notification_menu_view_test_api.cc
index 5d60059..d990af5a 100644
--- a/ash/app_menu/notification_menu_view_test_api.cc
+++ b/ash/app_menu/notification_menu_view_test_api.cc
@@ -19,7 +19,7 @@
NotificationMenuViewTestAPI::~NotificationMenuViewTestAPI() = default;
-base::string16 NotificationMenuViewTestAPI::GetCounterViewContents() const {
+std::u16string NotificationMenuViewTestAPI::GetCounterViewContents() const {
return notification_menu_view_->header_view_->counter_->GetText();
}
diff --git a/ash/app_menu/notification_menu_view_test_api.h b/ash/app_menu/notification_menu_view_test_api.h
index 5f8a271..a97b9cb 100644
--- a/ash/app_menu/notification_menu_view_test_api.h
+++ b/ash/app_menu/notification_menu_view_test_api.h
@@ -23,7 +23,7 @@
~NotificationMenuViewTestAPI();
// Returns the numeric string contained in the counter view.
- base::string16 GetCounterViewContents() const;
+ std::u16string GetCounterViewContents() const;
// Returns the number of NotificationItemViews.
int GetItemViewCount() const;
diff --git a/ash/app_menu/notification_menu_view_unittest.cc b/ash/app_menu/notification_menu_view_unittest.cc
index 3d77602..efbcc02f 100644
--- a/ash/app_menu/notification_menu_view_unittest.cc
+++ b/ash/app_menu/notification_menu_view_unittest.cc
@@ -119,8 +119,8 @@
message_center::Notification AddNotification(
const std::string& notification_id,
- const base::string16& title,
- const base::string16& message) {
+ const std::u16string& title,
+ const std::u16string& message) {
const message_center::NotifierId notifier_id(
message_center::NotifierType::APPLICATION, kTestAppId);
message_center::Notification notification(
@@ -135,8 +135,8 @@
message_center::Notification UpdateNotification(
const std::string& notification_id,
- const base::string16& title,
- const base::string16& message) {
+ const std::u16string& title,
+ const std::u16string& message) {
const message_center::NotifierId notifier_id(
message_center::NotifierType::APPLICATION, kTestAppId);
message_center::Notification notification(
diff --git a/ash/assistant/assistant_notification_controller_impl.cc b/ash/assistant/assistant_notification_controller_impl.cc
index 968e9880..f146c7fc 100644
--- a/ash/assistant/assistant_notification_controller_impl.cc
+++ b/ash/assistant/assistant_notification_controller_impl.cc
@@ -35,9 +35,9 @@
std::unique_ptr<message_center::Notification> CreateSystemNotification(
const message_center::NotifierId& notifier_id,
const chromeos::assistant::AssistantNotification& notification) {
- const base::string16 title = base::UTF8ToUTF16(notification.title);
- const base::string16 message = base::UTF8ToUTF16(notification.message);
- const base::string16 display_source =
+ const std::u16string title = base::UTF8ToUTF16(notification.title);
+ const std::u16string message = base::UTF8ToUTF16(notification.message);
+ const std::u16string display_source =
l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_NOTIFICATION_DISPLAY_SOURCE);
message_center::RichNotificationData data;
@@ -174,7 +174,7 @@
void AssistantNotificationControllerImpl::OnNotificationClicked(
const std::string& id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
const AssistantNotification* notification = model_.GetNotificationById(id);
if (!notification)
return;
diff --git a/ash/assistant/assistant_notification_controller_impl.h b/ash/assistant/assistant_notification_controller_impl.h
index 0dd40ea..5974ed9 100644
--- a/ash/assistant/assistant_notification_controller_impl.h
+++ b/ash/assistant/assistant_notification_controller_impl.h
@@ -60,7 +60,7 @@
void OnNotificationClicked(
const std::string& id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
void OnNotificationUpdated(const std::string& notification) override {}
void OnNotificationRemoved(const std::string& notification_id,
bool by_user) override;
diff --git a/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.cc b/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.cc
index ff7fa8a..f9f011f 100644
--- a/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.cc
+++ b/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.cc
@@ -117,7 +117,7 @@
return icon_->GetImage();
}
-const base::string16& AssistantOnboardingSuggestionView::GetText() const {
+const std::u16string& AssistantOnboardingSuggestionView::GetText() const {
return label_->GetText();
}
diff --git a/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.h b/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.h
index ce409d5..89cfff0 100644
--- a/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.h
+++ b/ash/assistant/ui/main_stage/assistant_onboarding_suggestion_view.h
@@ -52,7 +52,7 @@
const gfx::ImageSkia& GetIcon() const;
// Returns the text for the suggestion.
- const base::string16& GetText() const;
+ const std::u16string& GetText() const;
private:
void InitLayout(const chromeos::assistant::AssistantSuggestion& suggestion);
diff --git a/ash/assistant/ui/main_stage/assistant_opt_in_view.cc b/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
index 8cb6ef4..f89910f 100644
--- a/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
+++ b/ash/assistant/ui/main_stage/assistant_opt_in_view.cc
@@ -39,7 +39,7 @@
return style;
}
-base::string16 GetAction(int consent_status) {
+std::u16string GetAction(int consent_status) {
return consent_status ==
chromeos::assistant::prefs::ConsentStatus::kUnauthorized
? l10n_util::GetStringUTF16(
@@ -154,11 +154,11 @@
void AssistantOptInView::UpdateLabel(int consent_status) {
// First substitution string: "Unlock more Assistant features."
- const base::string16 unlock_features =
+ const std::u16string unlock_features =
l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_OPT_IN_UNLOCK_MORE_FEATURES);
// Second substitution string specifies the action to be taken.
- const base::string16 action = GetAction(consent_status);
+ const std::u16string action = GetAction(consent_status);
// Set the text, having replaced placeholders in the opt in prompt with
// substitution strings and caching their offset positions for styling.
diff --git a/ash/assistant/ui/main_stage/assistant_query_view.cc b/ash/assistant/ui/main_stage/assistant_query_view.cc
index a8c0ce8..960f440f 100644
--- a/ash/assistant/ui/main_stage/assistant_query_view.cc
+++ b/ash/assistant/ui/main_stage/assistant_query_view.cc
@@ -115,12 +115,12 @@
// When coming from the server, both |high_confidence_text| and
// |low_confidence_text| may be HTML escaped, so we need to unescape both
// before displaying to avoid printing HTML entities to the user.
- const base::string16& high_confidence_text_16 =
+ const std::u16string& high_confidence_text_16 =
net::UnescapeForHTML(base::UTF8ToUTF16(high_confidence_text));
high_confidence_label_->SetText(high_confidence_text_16);
- const base::string16& low_confidence_text_16 =
+ const std::u16string& low_confidence_text_16 =
net::UnescapeForHTML(base::UTF8ToUTF16(low_confidence_text));
low_confidence_label_->SetText(low_confidence_text_16);
diff --git a/ash/assistant/ui/main_stage/suggestion_chip_view.cc b/ash/assistant/ui/main_stage/suggestion_chip_view.cc
index db90fc3..8170bd45 100644
--- a/ash/assistant/ui/main_stage/suggestion_chip_view.cc
+++ b/ash/assistant/ui/main_stage/suggestion_chip_view.cc
@@ -72,7 +72,7 @@
}
void SuggestionChipView::InitLayout(const AssistantSuggestion& suggestion) {
- const base::string16 text = base::UTF8ToUTF16(suggestion.text);
+ const std::u16string text = base::UTF8ToUTF16(suggestion.text);
// Accessibility.
SetAccessibleName(text);
@@ -174,11 +174,11 @@
return icon_view_->GetImage();
}
-void SuggestionChipView::SetText(const base::string16& text) {
+void SuggestionChipView::SetText(const std::u16string& text) {
text_view_->SetText(text);
}
-const base::string16& SuggestionChipView::GetText() const {
+const std::u16string& SuggestionChipView::GetText() const {
return text_view_->GetText();
}
diff --git a/ash/assistant/ui/main_stage/suggestion_chip_view.h b/ash/assistant/ui/main_stage/suggestion_chip_view.h
index ecc09ec7f..8ba3e30 100644
--- a/ash/assistant/ui/main_stage/suggestion_chip_view.h
+++ b/ash/assistant/ui/main_stage/suggestion_chip_view.h
@@ -46,8 +46,8 @@
void SetIcon(const gfx::ImageSkia& icon);
const gfx::ImageSkia& GetIcon() const;
- void SetText(const base::string16& text);
- const base::string16& GetText() const;
+ void SetText(const std::u16string& text);
+ const std::u16string& GetText() const;
const base::UnguessableToken& suggestion_id() const { return suggestion_id_; }
diff --git a/ash/capture_mode/capture_label_view.cc b/ash/capture_mode/capture_label_view.cc
index 677347f3..91ae15f8 100644
--- a/ash/capture_mode/capture_label_view.cc
+++ b/ash/capture_mode/capture_label_view.cc
@@ -153,7 +153,7 @@
label_button_ = AddChildView(std::make_unique<views::LabelButton>(
base::BindRepeating(&CaptureLabelView::OnButtonPressed,
base::Unretained(this)),
- base::string16()));
+ std::u16string()));
label_button_->SetPaintToLayer();
label_button_->layer()->SetFillsBoundsOpaquely(false);
label_button_->SetEnabledTextColors(text_color);
@@ -167,7 +167,7 @@
label_button_->SetInkDropBaseColor(ripple_attributes.base_color);
label_button_->SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY);
- label_ = AddChildView(std::make_unique<views::Label>(base::string16()));
+ label_ = AddChildView(std::make_unique<views::Label>(std::u16string()));
label_->SetPaintToLayer();
label_->layer()->SetFillsBoundsOpaquely(false);
label_->SetEnabledColor(text_color);
@@ -188,7 +188,7 @@
AshColorProvider::ContentLayerType::kIconColorPrimary);
gfx::ImageSkia icon;
- base::string16 text;
+ std::u16string text;
switch (source) {
case CaptureModeSource::kFullscreen:
text = l10n_util::GetStringUTF16(
diff --git a/ash/capture_mode/capture_mode_toggle_button.cc b/ash/capture_mode/capture_mode_toggle_button.cc
index 72539b6e..5ab7e9c 100644
--- a/ash/capture_mode/capture_mode_toggle_button.cc
+++ b/ash/capture_mode/capture_mode_toggle_button.cc
@@ -53,7 +53,7 @@
void CaptureModeToggleButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
ImageButton::GetAccessibleNodeData(node_data);
- const base::string16 tooltip = GetTooltipText(gfx::Point());
+ const std::u16string tooltip = GetTooltipText(gfx::Point());
DCHECK(!tooltip.empty());
node_data->SetName(tooltip);
node_data->role = ax::mojom::Role::kToggleButton;
diff --git a/ash/capture_mode/stop_recording_button_tray.cc b/ash/capture_mode/stop_recording_button_tray.cc
index 612a460b..4322c4d 100644
--- a/ash/capture_mode/stop_recording_button_tray.cc
+++ b/ash/capture_mode/stop_recording_button_tray.cc
@@ -47,7 +47,7 @@
return true;
}
-base::string16 StopRecordingButtonTray::GetAccessibleNameForTray() {
+std::u16string StopRecordingButtonTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(
IDS_ASH_STATUS_AREA_STOP_RECORDING_BUTTON_ACCESSIBLE_NAME);
}
diff --git a/ash/capture_mode/stop_recording_button_tray.h b/ash/capture_mode/stop_recording_button_tray.h
index 4de93d6..0534b37c 100644
--- a/ash/capture_mode/stop_recording_button_tray.h
+++ b/ash/capture_mode/stop_recording_button_tray.h
@@ -22,7 +22,7 @@
// TrayBackgroundView:
bool PerformAction(const ui::Event& event) override;
void ClickedOutsideBubble() override {}
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override {}
void HideBubbleWithView(const TrayBubbleView* bubble_view) override {}
};
diff --git a/ash/child_accounts/parent_access_controller_impl.cc b/ash/child_accounts/parent_access_controller_impl.cc
index ab201bd9..c385ee68 100644
--- a/ash/child_accounts/parent_access_controller_impl.cc
+++ b/ash/child_accounts/parent_access_controller_impl.cc
@@ -24,7 +24,7 @@
// Number of digits displayed in parent access code input.
constexpr int kParentAccessCodePinLength = 6;
-base::string16 GetTitle(SupervisedAction action) {
+std::u16string GetTitle(SupervisedAction action) {
int title_id;
switch (action) {
case SupervisedAction::kUnlockTimeLimits:
@@ -44,7 +44,7 @@
return l10n_util::GetStringUTF16(title_id);
}
-base::string16 GetDescription(SupervisedAction action) {
+std::u16string GetDescription(SupervisedAction action) {
int description_id;
switch (action) {
case SupervisedAction::kUnlockTimeLimits:
@@ -64,7 +64,7 @@
return l10n_util::GetStringUTF16(description_id);
}
-base::string16 GetAccessibleTitle() {
+std::u16string GetAccessibleTitle() {
return l10n_util::GetStringUTF16(IDS_ASH_LOGIN_PARENT_ACCESS_DIALOG_NAME);
}
diff --git a/ash/clipboard/clipboard_history_menu_model_adapter.cc b/ash/clipboard/clipboard_history_menu_model_adapter.cc
index 420f017..cd27f6e 100644
--- a/ash/clipboard/clipboard_history_menu_model_adapter.cc
+++ b/ash/clipboard/clipboard_history_menu_model_adapter.cc
@@ -89,7 +89,7 @@
const ui::DataTransferEndpoint data_dst(ui::EndpointType::kDefault,
/*notify_if_restricted=*/false);
for (const auto& item : items) {
- model_->AddItem(command_id, base::string16());
+ model_->AddItem(command_id, std::u16string());
item_snapshots_.emplace(command_id, item);
++command_id;
}
diff --git a/ash/clipboard/clipboard_history_resource_manager.cc b/ash/clipboard/clipboard_history_resource_manager.cc
index 1795b8c..c8bdb90 100644
--- a/ash/clipboard/clipboard_history_resource_manager.cc
+++ b/ash/clipboard/clipboard_history_resource_manager.cc
@@ -86,21 +86,21 @@
// Helpers ---------------------------------------------------------------------
// Returns the localized string for the specified |resource_id|.
-base::string16 GetLocalizedString(int resource_id) {
+std::u16string GetLocalizedString(int resource_id) {
return ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
resource_id);
}
// Returns the label to display for the custom data contained within |data|.
-base::string16 GetLabelForCustomData(const ui::ClipboardData& data) {
+std::u16string GetLabelForCustomData(const ui::ClipboardData& data) {
// Currently the only supported type of custom data is file system data. This
// code should not be reached if `data` does not contain file system data.
- base::string16 sources;
+ std::u16string sources;
std::vector<base::StringPiece16> source_list;
ClipboardHistoryUtil::GetSplitFileSystemData(data, &source_list, &sources);
if (sources.empty()) {
NOTREACHED();
- return base::string16();
+ return std::u16string();
}
// Strip path information, so all that's left are file names.
@@ -149,7 +149,7 @@
return cached_image_model->image_model;
}
-base::string16 ClipboardHistoryResourceManager::GetLabel(
+std::u16string ClipboardHistoryResourceManager::GetLabel(
const ClipboardHistoryItem& item) const {
const ui::ClipboardData& data = item.data();
switch (ClipboardHistoryUtil::CalculateMainFormat(data).value()) {
diff --git a/ash/clipboard/clipboard_history_resource_manager.h b/ash/clipboard/clipboard_history_resource_manager.h
index 7790d6c..c2dc264 100644
--- a/ash/clipboard/clipboard_history_resource_manager.h
+++ b/ash/clipboard/clipboard_history_resource_manager.h
@@ -42,7 +42,7 @@
ui::ImageModel GetImageModel(const ClipboardHistoryItem& item) const;
// Returns the label to display for the specified clipboard history |item|.
- base::string16 GetLabel(const ClipboardHistoryItem& item) const;
+ std::u16string GetLabel(const ClipboardHistoryItem& item) const;
void AddObserver(Observer* observer) const;
void RemoveObserver(Observer* observer) const;
diff --git a/ash/clipboard/clipboard_history_unittest.cc b/ash/clipboard/clipboard_history_unittest.cc
index 9624c83..73994eb5 100644
--- a/ash/clipboard/clipboard_history_unittest.cc
+++ b/ash/clipboard/clipboard_history_unittest.cc
@@ -65,8 +65,8 @@
// |expected_strings| are retained in history. If |in_same_sequence| is true,
// writes to the buffer will be performed in the same task sequence.
void WriteAndEnsureTextHistory(
- const std::vector<base::string16>& input_strings,
- const std::vector<base::string16>& expected_strings,
+ const std::vector<std::u16string>& input_strings,
+ const std::vector<std::u16string>& expected_strings,
bool in_same_sequence = false) {
for (const auto& input_string : input_strings) {
{
@@ -81,7 +81,7 @@
EnsureTextHistory(expected_strings);
}
- void EnsureTextHistory(const std::vector<base::string16>& expected_strings) {
+ void EnsureTextHistory(const std::vector<std::u16string>& expected_strings) {
const std::list<ClipboardHistoryItem>& items = GetClipboardHistoryItems();
EXPECT_EQ(expected_strings.size(), items.size());
@@ -118,8 +118,8 @@
// |expected_data| is retained in history. After writing to the buffer, the
// current task sequence is run to idle to simulate real world behavior.
void WriteAndEnsureCustomDataHistory(
- const std::unordered_map<base::string16, base::string16>& input_data,
- const std::unordered_map<base::string16, base::string16>& expected_data) {
+ const std::unordered_map<std::u16string, std::u16string>& input_data,
+ const std::unordered_map<std::u16string, std::u16string>& expected_data) {
base::Pickle input_data_pickle;
ui::WriteCustomDataToPickle(input_data, &input_data_pickle);
@@ -136,7 +136,7 @@
if (expected_data.empty())
return;
- std::unordered_map<base::string16, base::string16> actual_data;
+ std::unordered_map<std::u16string, std::u16string> actual_data;
ui::ReadCustomDataIntoMap(items.front().data().custom_data_data().c_str(),
items.front().data().custom_data_data().size(),
&actual_data);
@@ -162,8 +162,8 @@
// Tests that if one thing is copied, one thing is saved.
TEST_F(ClipboardHistoryTest, OneThingCopiedOneThingSaved) {
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test")};
- std::vector<base::string16> expected_strings = input_strings;
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test")};
+ std::vector<std::u16string> expected_strings = input_strings;
// Test that only one string is in history.
WriteAndEnsureTextHistory(input_strings, expected_strings);
@@ -172,9 +172,9 @@
// Tests that if the same (non bitmap) thing is copied, only one of the
// duplicates is in the list.
TEST_F(ClipboardHistoryTest, DuplicateBasic) {
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test"),
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test"),
base::UTF8ToUTF16("test")};
- std::vector<base::string16> expected_strings{base::UTF8ToUTF16("test")};
+ std::vector<std::u16string> expected_strings{base::UTF8ToUTF16("test")};
// Test that both things are saved.
WriteAndEnsureTextHistory(input_strings, expected_strings);
@@ -183,12 +183,12 @@
// Tests that if multiple things are copied in the same task sequence, only the
// most recent thing is saved.
TEST_F(ClipboardHistoryTest, InSameSequenceBasic) {
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test1"),
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test1"),
base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test3")};
// Because |input_strings| will be copied in the same task sequence, history
// should only retain the most recent thing.
- std::vector<base::string16> expected_strings{base::UTF8ToUTF16("test3")};
+ std::vector<std::u16string> expected_strings{base::UTF8ToUTF16("test3")};
// Test that only the most recent thing is saved.
WriteAndEnsureTextHistory(input_strings, expected_strings,
@@ -197,10 +197,10 @@
// Tests the ordering of history is in reverse chronological order.
TEST_F(ClipboardHistoryTest, HistoryIsReverseChronological) {
- std::vector<base::string16> input_strings{
+ std::vector<std::u16string> input_strings{
base::UTF8ToUTF16("test1"), base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test3"), base::UTF8ToUTF16("test4")};
- std::vector<base::string16> expected_strings = input_strings;
+ std::vector<std::u16string> expected_strings = input_strings;
// Reverse the vector, history should match this ordering.
std::reverse(std::begin(expected_strings), std::end(expected_strings));
WriteAndEnsureTextHistory(input_strings, expected_strings);
@@ -210,13 +210,13 @@
// to the front of the clipboard history.
TEST_F(ClipboardHistoryTest, DuplicatePrecedesPreviousRecord) {
// Input holds a unique string sandwiched by a copy.
- std::vector<base::string16> input_strings{
+ std::vector<std::u16string> input_strings{
base::UTF8ToUTF16("test1"), base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test1"), base::UTF8ToUTF16("test3")};
// The result should be a reversal of the copied elements. When a duplicate
// is copied, history will have that item moved to the front instead of adding
// a new item.
- std::vector<base::string16> expected_strings{base::UTF8ToUTF16("test3"),
+ std::vector<std::u16string> expected_strings{base::UTF8ToUTF16("test3"),
base::UTF8ToUTF16("test1"),
base::UTF8ToUTF16("test2")};
@@ -226,12 +226,12 @@
// Tests that nothing is saved after history is cleared.
TEST_F(ClipboardHistoryTest, ClearHistoryBasic) {
// Input holds a unique string sandwhiched by a copy.
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test1"),
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test1"),
base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test1")};
// The result should be a reversal of the last two elements. When a duplicate
// is copied, history will show the most recent version of that duplicate.
- std::vector<base::string16> expected_strings{};
+ std::vector<std::u16string> expected_strings{};
for (const auto& input_string : input_strings) {
ui::ScopedClipboardWriter scw(ui::ClipboardBuffer::kCopyPaste);
@@ -250,12 +250,12 @@
// Tests that clipboard history is cleared when the clipboard is cleared.
TEST_F(ClipboardHistoryTest, ClearHistoryFromClipboardWithHistory) {
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test1"),
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test1"),
base::UTF8ToUTF16("test2")};
- std::vector<base::string16> expected_strings_before_clear{
+ std::vector<std::u16string> expected_strings_before_clear{
base::UTF8ToUTF16("test2"), base::UTF8ToUTF16("test1")};
- std::vector<base::string16> expected_strings_after_clear{};
+ std::vector<std::u16string> expected_strings_after_clear{};
for (const auto& input_string : input_strings) {
{
@@ -274,13 +274,13 @@
// Tests that the limit of clipboard history is respected.
TEST_F(ClipboardHistoryTest, HistoryLimit) {
- std::vector<base::string16> input_strings{
+ std::vector<std::u16string> input_strings{
base::UTF8ToUTF16("test1"), base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test3"), base::UTF8ToUTF16("test4"),
base::UTF8ToUTF16("test5"), base::UTF8ToUTF16("test6")};
// The result should be a reversal of the last five elements.
- std::vector<base::string16> expected_strings{input_strings.begin() + 1,
+ std::vector<std::u16string> expected_strings{input_strings.begin() + 1,
input_strings.end()};
std::reverse(expected_strings.begin(), expected_strings.end());
WriteAndEnsureTextHistory(input_strings, expected_strings);
@@ -288,11 +288,11 @@
// Tests that pausing clipboard history results in no history collected.
TEST_F(ClipboardHistoryTest, PauseHistory) {
- std::vector<base::string16> input_strings{base::UTF8ToUTF16("test1"),
+ std::vector<std::u16string> input_strings{base::UTF8ToUTF16("test1"),
base::UTF8ToUTF16("test2"),
base::UTF8ToUTF16("test1")};
// Because history is paused, there should be nothing stored.
- std::vector<base::string16> expected_strings{};
+ std::vector<std::u16string> expected_strings{};
ScopedClipboardHistoryPauseImpl scoped_pause(clipboard_history());
WriteAndEnsureTextHistory(input_strings, expected_strings);
@@ -327,7 +327,7 @@
// Tests that unrecognized custom data is omitted from clipboard history.
TEST_F(ClipboardHistoryTest, BasicCustomData) {
- const std::unordered_map<base::string16, base::string16> input_data = {
+ const std::unordered_map<std::u16string, std::u16string> input_data = {
{base::UTF8ToUTF16("custom-format-1"),
base::UTF8ToUTF16("custom-data-1")},
{base::UTF8ToUTF16("custom-format-2"),
@@ -339,11 +339,11 @@
// Tests that file system data is recorded in clipboard history.
TEST_F(ClipboardHistoryTest, BasicFileSystemData) {
- const std::unordered_map<base::string16, base::string16> input_data = {
+ const std::unordered_map<std::u16string, std::u16string> input_data = {
{base::UTF8ToUTF16("fs/sources"),
base::UTF8ToUTF16("/path/to/My%20File.txt")}};
- const std::unordered_map<base::string16, base::string16> expected_data =
+ const std::unordered_map<std::u16string, std::u16string> expected_data =
input_data;
WriteAndEnsureCustomDataHistory(input_data, expected_data);
diff --git a/ash/clipboard/clipboard_history_util.cc b/ash/clipboard/clipboard_history_util.cc
index 2b8314c..cbbff78c 100644
--- a/ash/clipboard/clipboard_history_util.cc
+++ b/ash/clipboard/clipboard_history_util.cc
@@ -93,7 +93,7 @@
void GetSplitFileSystemData(const ui::ClipboardData& data,
std::vector<base::StringPiece16>* source_list,
- base::string16* sources) {
+ std::u16string* sources) {
DCHECK(sources);
DCHECK(sources->empty());
DCHECK(source_list);
@@ -112,7 +112,7 @@
}
size_t GetCountOfCopiedFiles(const ui::ClipboardData& data) {
- base::string16 sources;
+ std::u16string sources;
std::vector<base::StringPiece16> source_list;
GetSplitFileSystemData(data, &source_list, &sources);
@@ -124,12 +124,12 @@
return source_list.size();
}
-base::string16 GetFileSystemSources(const ui::ClipboardData& data) {
+std::u16string GetFileSystemSources(const ui::ClipboardData& data) {
if (!ContainsFormat(data, ui::ClipboardInternalFormat::kCustom))
- return base::string16();
+ return std::u16string();
// Attempt to read file system sources in the custom data.
- base::string16 sources;
+ std::u16string sources;
ui::ReadCustomDataForType(
data.custom_data_data().c_str(), data.custom_data_data().size(),
base::UTF8ToUTF16(kFileSystemSourcesType), &sources);
diff --git a/ash/clipboard/clipboard_history_util.h b/ash/clipboard/clipboard_history_util.h
index 8127d5f7..9ce61a4 100644
--- a/ash/clipboard/clipboard_history_util.h
+++ b/ash/clipboard/clipboard_history_util.h
@@ -105,14 +105,14 @@
ASH_EXPORT void GetSplitFileSystemData(
const ui::ClipboardData& data,
std::vector<base::StringPiece16>* source_list,
- base::string16* sources);
+ std::u16string* sources);
// Returns the count of copied files contained by the clipboard data.
ASH_EXPORT size_t GetCountOfCopiedFiles(const ui::ClipboardData& data);
// Returns file system sources contained in `data`. If `data` does not contain
// file system sources, an empty string is returned.
-ASH_EXPORT base::string16 GetFileSystemSources(const ui::ClipboardData& data);
+ASH_EXPORT std::u16string GetFileSystemSources(const ui::ClipboardData& data);
// Returns true if `data` is supported by clipboard history.
ASH_EXPORT bool IsSupported(const ui::ClipboardData& data);
diff --git a/ash/clipboard/clipboard_history_util_unittest.cc b/ash/clipboard/clipboard_history_util_unittest.cc
index a76e99f..19cb86b 100644
--- a/ash/clipboard/clipboard_history_util_unittest.cc
+++ b/ash/clipboard/clipboard_history_util_unittest.cc
@@ -107,7 +107,7 @@
const std::string file_name1("File1.txt"), file_name2("File2.txt");
ClipboardHistoryItemBuilder builder;
builder.SetFileSystemData({file_name1, file_name2});
- base::string16 sources;
+ std::u16string sources;
std::vector<base::StringPiece16> source_list;
GetSplitFileSystemData(builder.Build().data(), &source_list, &sources);
EXPECT_EQ(file_name1, base::UTF16ToUTF8(source_list[0]));
diff --git a/ash/clipboard/clipboard_nudge.cc b/ash/clipboard/clipboard_nudge.cc
index 436b25b..5234de75 100644
--- a/ash/clipboard/clipboard_nudge.cc
+++ b/ash/clipboard/clipboard_nudge.cc
@@ -117,11 +117,11 @@
keyboard_shortcut_icon->SetBorder(views::CreateEmptyBorder(2, 4, 0, -2));
// Set the text for |label_|.
- base::string16 shortcut_key = l10n_util::GetStringUTF16(
+ std::u16string shortcut_key = l10n_util::GetStringUTF16(
use_launcher_key ? IDS_ASH_SHORTCUT_MODIFIER_LAUNCHER
: IDS_ASH_SHORTCUT_MODIFIER_SEARCH);
size_t offset;
- base::string16 label_text = l10n_util::GetStringFUTF16(
+ std::u16string label_text = l10n_util::GetStringFUTF16(
nudge_type == kZeroStateNudge
? IDS_ASH_MULTIPASTE_ZERO_STATE_CONTEXTUAL_NUDGE
: IDS_ASH_MULTIPASTE_CONTEXTUAL_NUDGE,
diff --git a/ash/clipboard/test_support/clipboard_history_item_builder.cc b/ash/clipboard/test_support/clipboard_history_item_builder.cc
index 859dbff..a94e3d7 100644
--- a/ash/clipboard/test_support/clipboard_history_item_builder.cc
+++ b/ash/clipboard/test_support/clipboard_history_item_builder.cc
@@ -202,7 +202,7 @@
base::Pickle custom_data;
ui::WriteCustomDataToPickle(
- std::unordered_map<base::string16, base::string16>(
+ std::unordered_map<std::u16string, std::u16string>(
{{base::UTF8ToUTF16(kFileSystemSourcesType),
base::UTF8ToUTF16(base::JoinString(source_list, "\n"))}}),
&custom_data);
diff --git a/ash/clipboard/views/clipboard_history_bitmap_item_view.cc b/ash/clipboard/views/clipboard_history_bitmap_item_view.cc
index 2fba5460..8e8296c 100644
--- a/ash/clipboard/views/clipboard_history_bitmap_item_view.cc
+++ b/ash/clipboard/views/clipboard_history_bitmap_item_view.cc
@@ -313,7 +313,7 @@
return std::make_unique<BitmapContentsView>(this);
}
-base::string16 ClipboardHistoryBitmapItemView::GetAccessibleName() const {
+std::u16string ClipboardHistoryBitmapItemView::GetAccessibleName() const {
switch (data_format_) {
case ui::ClipboardInternalFormat::kHtml:
return l10n_util::GetStringUTF16(IDS_CLIPBOARD_HISTORY_MENU_HTML_IMAGE);
@@ -321,7 +321,7 @@
return l10n_util::GetStringUTF16(IDS_CLIPBOARD_HISTORY_MENU_BITMAP_IMAGE);
default:
NOTREACHED();
- return base::string16();
+ return std::u16string();
}
}
diff --git a/ash/clipboard/views/clipboard_history_bitmap_item_view.h b/ash/clipboard/views/clipboard_history_bitmap_item_view.h
index 8088e3f..5ae57f2 100644
--- a/ash/clipboard/views/clipboard_history_bitmap_item_view.h
+++ b/ash/clipboard/views/clipboard_history_bitmap_item_view.h
@@ -31,7 +31,7 @@
// ClipboardHistoryItemView:
const char* GetClassName() const override;
std::unique_ptr<ContentsView> CreateContentsView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// Owned by ClipboardHistoryController.
const ClipboardHistoryResourceManager* const resource_manager_;
diff --git a/ash/clipboard/views/clipboard_history_item_view.h b/ash/clipboard/views/clipboard_history_item_view.h
index 8443f013..254f983 100644
--- a/ash/clipboard/views/clipboard_history_item_view.h
+++ b/ash/clipboard/views/clipboard_history_item_view.h
@@ -108,7 +108,7 @@
virtual std::unique_ptr<ContentsView> CreateContentsView() = 0;
// Returns the name of the accessible node.
- virtual base::string16 GetAccessibleName() const = 0;
+ virtual std::u16string GetAccessibleName() const = 0;
const ClipboardHistoryItem* clipboard_history_item() const {
return clipboard_history_item_;
diff --git a/ash/clipboard/views/clipboard_history_label.cc b/ash/clipboard/views/clipboard_history_label.cc
index 9662b46..17c78bd 100644
--- a/ash/clipboard/views/clipboard_history_label.cc
+++ b/ash/clipboard/views/clipboard_history_label.cc
@@ -9,7 +9,7 @@
#include "ash/style/scoped_light_mode_as_default.h"
namespace ash {
-ClipboardHistoryLabel::ClipboardHistoryLabel(const base::string16& text)
+ClipboardHistoryLabel::ClipboardHistoryLabel(const std::u16string& text)
: views::Label(text) {
SetPreferredSize(
gfx::Size(INT_MAX, ClipboardHistoryViews::kLabelPreferredHeight));
diff --git a/ash/clipboard/views/clipboard_history_label.h b/ash/clipboard/views/clipboard_history_label.h
index ee426bf..3548f29 100644
--- a/ash/clipboard/views/clipboard_history_label.h
+++ b/ash/clipboard/views/clipboard_history_label.h
@@ -12,7 +12,7 @@
// The text label used by the clipboard history menu.
class ClipboardHistoryLabel : public views::Label {
public:
- explicit ClipboardHistoryLabel(const base::string16& text);
+ explicit ClipboardHistoryLabel(const std::u16string& text);
ClipboardHistoryLabel(const ClipboardHistoryLabel& rhs) = delete;
ClipboardHistoryLabel& operator=(const ClipboardHistoryLabel& rhs) = delete;
~ClipboardHistoryLabel() override = default;
diff --git a/ash/clipboard/views/clipboard_history_text_item_view.cc b/ash/clipboard/views/clipboard_history_text_item_view.cc
index 7903ec9..61bfd00 100644
--- a/ash/clipboard/views/clipboard_history_text_item_view.cc
+++ b/ash/clipboard/views/clipboard_history_text_item_view.cc
@@ -75,7 +75,7 @@
return std::make_unique<TextContentsView>(this);
}
-base::string16 ClipboardHistoryTextItemView::GetAccessibleName() const {
+std::u16string ClipboardHistoryTextItemView::GetAccessibleName() const {
return text_;
}
diff --git a/ash/clipboard/views/clipboard_history_text_item_view.h b/ash/clipboard/views/clipboard_history_text_item_view.h
index 05b0281a..a9c93a24 100644
--- a/ash/clipboard/views/clipboard_history_text_item_view.h
+++ b/ash/clipboard/views/clipboard_history_text_item_view.h
@@ -26,7 +26,7 @@
~ClipboardHistoryTextItemView() override;
protected:
- const base::string16& text() const { return text_; }
+ const std::u16string& text() const { return text_; }
// ClipboardHistoryItemView:
std::unique_ptr<ContentsView> CreateContentsView() override;
@@ -35,11 +35,11 @@
class TextContentsView;
// ClipboardHistoryItemView:
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
const char* GetClassName() const override;
// Text to show.
- const base::string16 text_;
+ const std::u16string text_;
};
} // namespace ash
diff --git a/ash/debug.cc b/ash/debug.cc
index 8941a69..f2921a2 100644
--- a/ash/debug.cc
+++ b/ash/debug.cc
@@ -83,7 +83,7 @@
*out << " ax_tree_id=" << *tree_id;
if (!scrub_data) {
- base::string16 title(window->GetTitle());
+ std::u16string title(window->GetTitle());
if (!title.empty())
*out << " title=" << title;
}
diff --git a/ash/detachable_base/detachable_base_notification_controller.cc b/ash/detachable_base/detachable_base_notification_controller.cc
index 3dfc190..9a147c29b 100644
--- a/ash/detachable_base/detachable_base_notification_controller.cc
+++ b/ash/detachable_base/detachable_base_notification_controller.cc
@@ -58,15 +58,15 @@
return;
}
- base::string16 title = l10n_util::GetStringUTF16(
+ std::u16string title = l10n_util::GetStringUTF16(
IDS_ASH_DETACHABLE_BASE_NOTIFICATION_UPDATE_NEEDED_TITLE);
- base::string16 message = l10n_util::GetStringUTF16(
+ std::u16string message = l10n_util::GetStringUTF16(
IDS_ASH_DETACHABLE_BASE_NOTIFICATION_UPDATE_NEEDED_MESSAGE);
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
- kBaseRequiresUpdateNotificationId, title, message, base::string16(),
+ kBaseRequiresUpdateNotificationId, title, message, std::u16string(),
GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
@@ -134,15 +134,15 @@
options.never_timeout = true;
options.priority = message_center::MAX_PRIORITY;
- base::string16 title = l10n_util::GetStringUTF16(
+ std::u16string title = l10n_util::GetStringUTF16(
IDS_ASH_DETACHABLE_BASE_NOTIFICATION_DEVICE_CHANGED_TITLE);
- base::string16 message = l10n_util::GetStringUTF16(
+ std::u16string message = l10n_util::GetStringUTF16(
IDS_ASH_DETACHABLE_BASE_NOTIFICATION_DEVICE_CHANGED_MESSAGE);
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kBaseChangedNotificationId,
- title, message, base::string16(), GURL(),
+ title, message, std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kDetachableBaseNotifierId),
diff --git a/ash/display/display_alignment_indicator.cc b/ash/display/display_alignment_indicator.cc
index 52d5c14..f3bbacb4 100644
--- a/ash/display/display_alignment_indicator.cc
+++ b/ash/display/display_alignment_indicator.cc
@@ -211,7 +211,7 @@
// of the target display.
class IndicatorPillView : public views::View {
public:
- explicit IndicatorPillView(const base::string16& text)
+ explicit IndicatorPillView(const std::u16string& text)
: // TODO(1070352): Replace current placeholder arrow in
// IndicatorPillView
icon_(AddChildView(std::make_unique<views::ImageView>())),
diff --git a/ash/display/display_change_dialog.cc b/ash/display/display_change_dialog.cc
index a4e907dd..c3b7099 100644
--- a/ash/display/display_change_dialog.cc
+++ b/ash/display/display_change_dialog.cc
@@ -32,8 +32,8 @@
} // namespace
DisplayChangeDialog::DisplayChangeDialog(
- base::string16 window_title,
- base::string16 timeout_message_with_placeholder,
+ std::u16string window_title,
+ std::u16string timeout_message_with_placeholder,
base::OnceClosure on_accept_callback,
CancelCallback on_cancel_callback)
: timeout_message_with_placeholder_(
@@ -96,8 +96,8 @@
label_->SetText(GetRevertTimeoutString());
}
-base::string16 DisplayChangeDialog::GetRevertTimeoutString() const {
- const base::string16 timer = ui::TimeFormat::Simple(
+std::u16string DisplayChangeDialog::GetRevertTimeoutString() const {
+ const std::u16string timer = ui::TimeFormat::Simple(
ui::TimeFormat::FORMAT_DURATION, ui::TimeFormat::LENGTH_LONG,
base::TimeDelta::FromSeconds(timeout_count_));
return base::ReplaceStringPlaceholders(timeout_message_with_placeholder_,
diff --git a/ash/display/display_change_dialog.h b/ash/display/display_change_dialog.h
index f06fad1..daef757 100644
--- a/ash/display/display_change_dialog.h
+++ b/ash/display/display_change_dialog.h
@@ -26,8 +26,8 @@
public:
using CancelCallback = base::OnceCallback<void(bool display_was_removed)>;
- DisplayChangeDialog(base::string16 window_title,
- base::string16 timeout_message_with_placeholder,
+ DisplayChangeDialog(std::u16string window_title,
+ std::u16string timeout_message_with_placeholder,
base::OnceClosure on_accept_callback,
CancelCallback on_cancel_callback);
~DisplayChangeDialog() override;
@@ -54,12 +54,12 @@
// Returns the string displayed as a message in the dialog which includes a
// countdown timer.
- base::string16 GetRevertTimeoutString() const;
+ std::u16string GetRevertTimeoutString() const;
// The remaining timeout in seconds.
uint16_t timeout_count_ = kDefaultTimeoutInSeconds;
- const base::string16 timeout_message_with_placeholder_;
+ const std::u16string timeout_message_with_placeholder_;
views::Label* label_ = nullptr; // Not owned.
base::OnceClosure on_accept_callback_;
diff --git a/ash/display/display_error_observer.cc b/ash/display/display_error_observer.cc
index d8bf4af0..91ca598 100644
--- a/ash/display/display_error_observer.cc
+++ b/ash/display/display_error_observer.cc
@@ -41,7 +41,7 @@
return;
}
- base::string16 message =
+ std::u16string message =
(new_state == display::MULTIPLE_DISPLAY_STATE_MULTI_MIRROR)
? l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_FAILURE_ON_MIRRORING)
: ui::SubstituteChromeOSDeviceType(
diff --git a/ash/display/display_error_observer_unittest.cc b/ash/display/display_error_observer_unittest.cc
index a49fdca3..f70a3cf 100644
--- a/ash/display/display_error_observer_unittest.cc
+++ b/ash/display/display_error_observer_unittest.cc
@@ -32,7 +32,7 @@
protected:
DisplayErrorObserver* observer() { return observer_.get(); }
- base::string16 GetMessageContents() {
+ std::u16string GetMessageContents() {
return GetDisplayErrorNotificationMessageForTest();
}
@@ -56,13 +56,13 @@
observer()->OnDisplayModeChangeFailed(
display::DisplayConfigurator::DisplayStateList(),
display::MULTIPLE_DISPLAY_STATE_MULTI_MIRROR);
- base::string16 message = GetMessageContents();
+ std::u16string message = GetMessageContents();
EXPECT_FALSE(message.empty());
observer()->OnDisplayModeChangeFailed(
display::DisplayConfigurator::DisplayStateList(),
display::MULTIPLE_DISPLAY_STATE_MULTI_MIRROR);
- base::string16 message2 = GetMessageContents();
+ std::u16string message2 = GetMessageContents();
EXPECT_FALSE(message2.empty());
EXPECT_EQ(message, message2);
}
diff --git a/ash/display/display_util.cc b/ash/display/display_util.cc
index b130ab4..dcb4fc37 100644
--- a/ash/display/display_util.cc
+++ b/ash/display/display_util.cc
@@ -139,7 +139,7 @@
}
}
-void ShowDisplayErrorNotification(const base::string16& message,
+void ShowDisplayErrorNotification(const std::u16string& message,
bool allow_feedback) {
// Always remove the notification to make sure the notification appears
// as a popup in any situation.
@@ -156,9 +156,9 @@
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kDisplayErrorNotificationId,
- base::string16(), // title
+ std::u16string(), // title
message,
- base::string16(), // display_source
+ std::u16string(), // display_source
GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
@@ -175,7 +175,7 @@
std::move(notification));
}
-base::string16 ConvertRefreshRateToString16(float refresh_rate) {
+std::u16string ConvertRefreshRateToString16(float refresh_rate) {
std::string str = base::StringPrintf("%.2f", refresh_rate);
// Remove the mantissa for whole numbers.
@@ -185,14 +185,14 @@
return base::UTF8ToUTF16(str);
}
-base::string16 GetDisplayErrorNotificationMessageForTest() {
+std::u16string GetDisplayErrorNotificationMessageForTest() {
message_center::NotificationList::Notifications notifications =
message_center::MessageCenter::Get()->GetVisibleNotifications();
for (auto* const notification : notifications) {
if (notification->id() == kDisplayErrorNotificationId)
return notification->message();
}
- return base::string16();
+ return std::u16string();
}
} // namespace ash
diff --git a/ash/display/display_util.h b/ash/display/display_util.h
index 293501d..907b0f5a4 100644
--- a/ash/display/display_util.h
+++ b/ash/display/display_util.h
@@ -50,15 +50,15 @@
// Shows the notification message for display related issues, and optionally
// adds a button to send a feedback report.
-void ShowDisplayErrorNotification(const base::string16& message,
+void ShowDisplayErrorNotification(const std::u16string& message,
bool allow_feedback);
// Takes a refresh rate represented as a float and rounds it to two decimal
// places. If the rounded refresh rate is a whole number, the mantissa is
// removed. Ex: 54.60712 -> "54.61"
-ASH_EXPORT base::string16 ConvertRefreshRateToString16(float refresh_rate);
+ASH_EXPORT std::u16string ConvertRefreshRateToString16(float refresh_rate);
-ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest();
+ASH_EXPORT std::u16string GetDisplayErrorNotificationMessageForTest();
} // namespace ash
diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc
index 43d6d65..5c92b76 100644
--- a/ash/display/resolution_notification_controller.cc
+++ b/ash/display/resolution_notification_controller.cc
@@ -131,15 +131,15 @@
if (!change_info_)
return;
- const base::string16 display_name =
+ const std::u16string display_name =
base::UTF8ToUTF16(Shell::Get()->display_manager()->GetDisplayNameForId(
change_info_->display_id));
- const base::string16 actual_display_size =
+ const std::u16string actual_display_size =
base::UTF8ToUTF16(change_info_->current_resolution.size().ToString());
- const base::string16 requested_display_size =
+ const std::u16string requested_display_size =
base::UTF8ToUTF16(change_info_->new_resolution.size().ToString());
- base::string16 dialog_title =
+ std::u16string dialog_title =
l10n_util::GetStringUTF16(IDS_ASH_RESOLUTION_CHANGE_DIALOG_TITLE);
// Construct the timeout message, leaving a placeholder for the countdown
@@ -147,14 +147,14 @@
// timer tick.
constexpr char kTimeoutPlaceHolder[] = "$1";
- base::string16 timeout_message_with_placeholder;
+ std::u16string timeout_message_with_placeholder;
if (display::features::IsListAllDisplayModesEnabled()) {
dialog_title = l10n_util::GetStringUTF16(
IDS_ASH_RESOLUTION_REFRESH_CHANGE_DIALOG_TITLE);
- const base::string16 actual_refresh_rate = ConvertRefreshRateToString16(
+ const std::u16string actual_refresh_rate = ConvertRefreshRateToString16(
change_info_->current_resolution.refresh_rate());
- const base::string16 requested_refresh_rate = ConvertRefreshRateToString16(
+ const std::u16string requested_refresh_rate = ConvertRefreshRateToString16(
change_info_->new_resolution.refresh_rate());
const bool no_fallback = actual_display_size == requested_display_size &&
diff --git a/ash/display/resolution_notification_controller_unittest.cc b/ash/display/resolution_notification_controller_unittest.cc
index 0a9b29b..4c6d977 100644
--- a/ash/display/resolution_notification_controller_unittest.cc
+++ b/ash/display/resolution_notification_controller_unittest.cc
@@ -35,12 +35,12 @@
~ResolutionNotificationControllerTest() override = default;
- base::string16 ExpectedNotificationMessage(int64_t display_id,
+ std::u16string ExpectedNotificationMessage(int64_t display_id,
const gfx::Size& new_resolution,
float new_refresh_rate) {
- const base::string16 display_name =
+ const std::u16string display_name =
base::UTF8ToUTF16(display_manager()->GetDisplayNameForId(display_id));
- const base::string16 countdown = ui::TimeFormat::Simple(
+ const std::u16string countdown = ui::TimeFormat::Simple(
ui::TimeFormat::FORMAT_DURATION, ui::TimeFormat::LENGTH_LONG,
base::TimeDelta::FromSeconds(15));
if (::display::features::IsListAllDisplayModesEnabled()) {
@@ -54,15 +54,15 @@
base::UTF8ToUTF16(new_resolution.ToString()), countdown);
}
- base::string16 ExpectedFallbackNotificationMessage(
+ std::u16string ExpectedFallbackNotificationMessage(
int64_t display_id,
const gfx::Size& specified_resolution,
float specified_refresh_rate,
const gfx::Size& fallback_resolution,
float fallback_refresh_rate) {
- const base::string16 display_name =
+ const std::u16string display_name =
base::UTF8ToUTF16(display_manager()->GetDisplayNameForId(display_id));
- const base::string16 countdown = ui::TimeFormat::Simple(
+ const std::u16string countdown = ui::TimeFormat::Simple(
ui::TimeFormat::FORMAT_DURATION, ui::TimeFormat::LENGTH_LONG,
base::TimeDelta::FromSeconds(15));
if (::display::features::IsListAllDisplayModesEnabled()) {
@@ -145,7 +145,7 @@
new_is_native, source);
}
- static base::string16 GetNotificationMessage() {
+ static std::u16string GetNotificationMessage() {
return controller()->dialog_for_testing()->label_->GetText();
}
diff --git a/ash/display/touch_calibrator_view.cc b/ash/display/touch_calibrator_view.cc
index 6c0c122..acc11d5 100644
--- a/ash/display/touch_calibrator_view.cc
+++ b/ash/display/touch_calibrator_view.cc
@@ -96,7 +96,7 @@
}
// Returns the size of bounding box required for |text| of given |font_list|.
-gfx::Size GetSizeForString(const base::string16& text,
+gfx::Size GetSizeForString(const std::u16string& text,
const gfx::FontList& font_list) {
int height = 0, width = 0;
gfx::Canvas::SizeStringInt(text, font_list, &width, &height, 0, 0);
@@ -274,14 +274,14 @@
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
- void SetLabel(const base::string16& text, const SkColor& color);
- void SetSubLabel(const base::string16& text, const SkColor& color);
+ void SetLabel(const std::u16string& text, const SkColor& color);
+ void SetSubLabel(const std::u16string& text, const SkColor& color);
private:
void UpdateWidth(int updated_width);
- base::string16 label_text_;
- base::string16 sublabel_text_;
+ std::u16string label_text_;
+ std::u16string sublabel_text_;
SkColor label_color_;
SkColor sublabel_color_;
@@ -352,7 +352,7 @@
rounded_rect_bounds_ = GetContentsBounds();
}
-void HintBox::SetLabel(const base::string16& text, const SkColor& color) {
+void HintBox::SetLabel(const std::u16string& text, const SkColor& color) {
label_text_ = text;
label_color_ = color;
@@ -372,7 +372,7 @@
UpdateWidth(minimum_expected_width);
}
-void HintBox::SetSubLabel(const base::string16& text, const SkColor& color) {
+void HintBox::SetSubLabel(const std::u16string& text, const SkColor& color) {
sublabel_text_ = text;
sublabel_color_ = color;
@@ -404,14 +404,14 @@
class CompletionMessageView : public views::View {
public:
- CompletionMessageView(const gfx::Rect& bounds, const base::string16& message);
+ CompletionMessageView(const gfx::Rect& bounds, const std::u16string& message);
~CompletionMessageView() override;
// views::View:
void OnPaint(gfx::Canvas* canvas) override;
private:
- const base::string16 message_;
+ const std::u16string message_;
gfx::FontList font_list_;
gfx::Rect text_bounds_;
@@ -424,7 +424,7 @@
};
CompletionMessageView::CompletionMessageView(const gfx::Rect& bounds,
- const base::string16& message)
+ const std::u16string& message)
: message_(message) {
SetBoundsRect(bounds);
@@ -547,9 +547,9 @@
tap_label_->SetVisible(false);
// Initialize the Hint Box view.
- base::string16 hint_label_text =
+ std::u16string hint_label_text =
rb.GetLocalizedString(IDS_DISPLAY_TOUCH_CALIBRATION_HINT_LABEL_TEXT);
- base::string16 hint_sublabel_text =
+ std::u16string hint_sublabel_text =
rb.GetLocalizedString(IDS_DISPLAY_TOUCH_CALIBRATION_HINT_SUBLABEL_TEXT);
int tpv_width = touch_point_view_->width();
@@ -579,7 +579,7 @@
// Initialize the view that contains the calibration complete message which
// will be displayed at the end.
- base::string16 finish_msg_text =
+ std::u16string finish_msg_text =
rb.GetLocalizedString(IDS_DISPLAY_TOUCH_CALIBRATION_FINISH_LABEL);
gfx::Rect msg_view_bounds(
diff --git a/ash/display/window_tree_host_manager.cc b/ash/display/window_tree_host_manager.cc
index 3441a49..d95aa30a 100644
--- a/ash/display/window_tree_host_manager.cc
+++ b/ash/display/window_tree_host_manager.cc
@@ -791,7 +791,7 @@
GetRootWindowSettings(non_primary_window)->display_id =
old_primary_display.id();
- base::string16 old_primary_title = primary_window->GetTitle();
+ std::u16string old_primary_title = primary_window->GetTitle();
primary_window->SetTitle(non_primary_window->GetTitle());
non_primary_window->SetTitle(old_primary_title);
diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc
index 74df551..7abaf72 100644
--- a/ash/drag_drop/drag_drop_controller_unittest.cc
+++ b/ash/drag_drop/drag_drop_controller_unittest.cc
@@ -209,7 +209,7 @@
int num_drag_updates_;
bool drop_received_;
bool drag_canceled_;
- base::string16 drag_string_;
+ std::u16string drag_string_;
private:
DISALLOW_COPY_AND_ASSIGN(TestDragDropController);
diff --git a/ash/hud_display/graph_page_view_base.cc b/ash/hud_display/graph_page_view_base.cc
index 76f008a..521b80f 100644
--- a/ash/hud_display/graph_page_view_base.cc
+++ b/ash/hud_display/graph_page_view_base.cc
@@ -145,8 +145,8 @@
float top,
float right,
float bottom,
- const base::string16& x_unit,
- const base::string16& y_unit,
+ const std::u16string& x_unit,
+ const std::u16string& y_unit,
int horizontal_points_number,
int horizontal_ticks_interval,
float vertical_ticks_interval) {
diff --git a/ash/hud_display/graph_page_view_base.h b/ash/hud_display/graph_page_view_base.h
index 2f8268d8..20780e9 100644
--- a/ash/hud_display/graph_page_view_base.h
+++ b/ash/hud_display/graph_page_view_base.h
@@ -41,8 +41,8 @@
float top,
float right,
float bottom,
- const base::string16& x_unit,
- const base::string16& y_unit,
+ const std::u16string& x_unit,
+ const std::u16string& y_unit,
int horizontal_points_number,
int horizontal_ticks_interval,
float vertical_ticks_interval);
diff --git a/ash/hud_display/grid.cc b/ash/hud_display/grid.cc
index 2249eeb..f8b30d1 100644
--- a/ash/hud_display/grid.cc
+++ b/ash/hud_display/grid.cc
@@ -23,7 +23,7 @@
constexpr SkColor kGridColor = SkColorSetRGB(162, 162, 220);
-base::string16 GenerateLabelText(float value, const base::string16& dimention) {
+std::u16string GenerateLabelText(float value, const std::u16string& dimention) {
if (value == (int)value) {
return base::ASCIIToUTF16(base::StringPrintf("%d ", (int)value).c_str()) +
dimention;
@@ -43,8 +43,8 @@
float top,
float right,
float bottom,
- const base::string16& x_unit,
- const base::string16& y_unit,
+ const std::u16string& x_unit,
+ const std::u16string& y_unit,
int horizontal_points_number,
int horizontal_ticks_interval,
float vertical_ticks_interval)
@@ -63,13 +63,13 @@
// Text is set later.
right_top_label_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
right_middle_label_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
right_bottom_label_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
left_bottom_label_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
// Set label text.
SetTopLabel(top_);
diff --git a/ash/hud_display/grid.h b/ash/hud_display/grid.h
index 1337370..b386194 100644
--- a/ash/hud_display/grid.h
+++ b/ash/hud_display/grid.h
@@ -38,8 +38,8 @@
float top,
float right,
float bottom,
- const base::string16& x_unit,
- const base::string16& y_unit,
+ const std::u16string& x_unit,
+ const std::u16string& y_unit,
int horizontal_points_number,
int horizontal_ticks_interval,
float vertical_ticks_interval);
@@ -70,8 +70,8 @@
float right_ = 0;
float bottom_ = 0;
- base::string16 x_unit_;
- base::string16 y_unit_;
+ std::u16string x_unit_;
+ std::u16string y_unit_;
// horizontal ticks
int horizontal_points_number_ = 0;
diff --git a/ash/hud_display/hud_settings_view.cc b/ash/hud_display/hud_settings_view.cc
index 3a94f20..947ffb3 100644
--- a/ash/hud_display/hud_settings_view.cc
+++ b/ash/hud_display/hud_settings_view.cc
@@ -123,7 +123,7 @@
public:
METADATA_HEADER(SettingsCheckbox);
- SettingsCheckbox(const base::string16& label, const base::string16& tooltip)
+ SettingsCheckbox(const std::u16string& label, const std::u16string& tooltip)
: views::Checkbox(label, views::Button::PressedCallback()) {
SetTooltipText(tooltip);
}
@@ -245,7 +245,7 @@
auto add_speed_point = [](AnimationSpeedControl* self, views::View* container,
std::vector<float>& multipliers, float multiplier,
- const base::string16& text) {
+ const std::u16string& text) {
const int kLabelBorderWidth = 3;
views::Label* label = container->AddChildView(
std::make_unique<views::Label>(text, views::style::CONTEXT_LABEL));
@@ -342,7 +342,7 @@
std::unique_ptr<views::LabelButton> CreateActionButton(
views::Button::PressedCallback::Callback callback,
- const base::string16& text) {
+ const std::u16string& text) {
auto button = std::make_unique<views::LabelButton>(callback, text);
button->SetHorizontalAlignment(gfx::ALIGN_CENTER);
button->SetEnabledTextColors(kHUDBackground);
@@ -384,7 +384,7 @@
auto add_checkbox =
[](HUDSettingsView* self, views::View* container,
- const base::string16& text, const base::string16& tooltip,
+ const std::u16string& text, const std::u16string& tooltip,
base::RepeatingCallback<void(views::Checkbox*)> callback) {
views::Checkbox* checkbox = container->AddChildView(
std::make_unique<SettingsCheckbox>(text, tooltip));
@@ -465,7 +465,7 @@
ui_devtools_controls->AddChildView(CreateActionButton(
base::BindRepeating(&HUDSettingsView::OnEnableUiDevToolsButtonPressed,
base::Unretained(this)),
- base::string16()));
+ std::u16string()));
UpdateDevToolsControlButtonLabel();
}
diff --git a/ash/hud_display/legend.cc b/ash/hud_display/legend.cc
index 1afa3738..814b9c3a 100644
--- a/ash/hud_display/legend.cc
+++ b/ash/hud_display/legend.cc
@@ -78,7 +78,7 @@
constexpr int kLabelToValueSpece = 5;
value_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
layout_manager->SetFlexForView(value_, /*flex=*/1);
value_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_RIGHT);
value_->SetBorder(views::CreateEmptyBorder(0, kLabelToValueSpece, 0, 0));
@@ -136,15 +136,15 @@
if (graph_.IsFilledIndex(value_index_)) {
value_->SetText(formatter_.Run(graph_.GetUnscaledValueAt(value_index_)));
} else {
- value_->SetText(base::string16());
+ value_->SetText(std::u16string());
}
}
} // namespace
Legend::Entry::Entry(const Graph& graph,
- base::string16 label,
- base::string16 tooltip,
+ std::u16string label,
+ std::u16string tooltip,
Formatter formatter)
: graph(graph), label(label), tooltip(tooltip), formatter(formatter) {}
diff --git a/ash/hud_display/legend.h b/ash/hud_display/legend.h
index c6587e3..bb23e5f 100644
--- a/ash/hud_display/legend.h
+++ b/ash/hud_display/legend.h
@@ -21,21 +21,21 @@
// Draws legend view.
class Legend : public views::View {
public:
- using Formatter = base::RepeatingCallback<base::string16(float)>;
+ using Formatter = base::RepeatingCallback<std::u16string(float)>;
METADATA_HEADER(Legend);
struct Entry {
Entry(const Graph& graph,
- base::string16 label,
- base::string16 tooltip,
+ std::u16string label,
+ std::u16string tooltip,
Formatter formatter);
Entry(const Entry&);
~Entry();
const Graph& graph;
- base::string16 label;
- base::string16 tooltip;
+ std::u16string label;
+ std::u16string tooltip;
Formatter formatter; // formatting function
};
diff --git a/ash/hud_display/tab_strip.cc b/ash/hud_display/tab_strip.cc
index edcbd9b..2f54483 100644
--- a/ash/hud_display/tab_strip.cc
+++ b/ash/hud_display/tab_strip.cc
@@ -78,7 +78,7 @@
HUDTabButton::HUDTabButton(Style style,
const DisplayMode display_mode,
- const base::string16& text)
+ const std::u16string& text)
: views::LabelButton(views::Button::PressedCallback(), text),
style_(style),
display_mode_(display_mode) {
@@ -172,7 +172,7 @@
HUDTabStrip::~HUDTabStrip() = default;
HUDTabButton* HUDTabStrip::AddTabButton(const DisplayMode display_mode,
- const base::string16& label) {
+ const std::u16string& label) {
CHECK_NE(static_cast<int>(display_mode), 0);
// Make first tab active by default.
HUDTabButton* tab_button = AddChildView(std::make_unique<HUDTabButton>(
diff --git a/ash/hud_display/tab_strip.h b/ash/hud_display/tab_strip.h
index 74ab95d..e25f8bd 100644
--- a/ash/hud_display/tab_strip.h
+++ b/ash/hud_display/tab_strip.h
@@ -40,7 +40,7 @@
HUDTabButton(Style style,
const DisplayMode display_mode,
- const base::string16& text);
+ const std::u16string& text);
HUDTabButton(const HUDTabButton&) = delete;
HUDTabButton& operator=(const HUDTabButton&) = delete;
@@ -73,7 +73,7 @@
~HUDTabStrip() override;
HUDTabButton* AddTabButton(const DisplayMode display_mode,
- const base::string16& label);
+ const std::u16string& label);
// Mark tabs around the active one need repaint to modify borders.
void ActivateTab(DisplayMode mode);
diff --git a/ash/ime/ime_controller_impl.cc b/ash/ime/ime_controller_impl.cc
index 7eef525c..b46df87f 100644
--- a/ash/ime/ime_controller_impl.cc
+++ b/ash/ime/ime_controller_impl.cc
@@ -190,7 +190,7 @@
void ImeControllerImpl::ShowModeIndicator(
const gfx::Rect& anchor_bounds,
- const base::string16& ime_short_name) {
+ const std::u16string& ime_short_name) {
ImeModeIndicatorView* mi_view =
new ImeModeIndicatorView(anchor_bounds, ime_short_name);
views::BubbleDialogDelegateView::CreateBubble(mi_view);
diff --git a/ash/ime/ime_controller_impl.h b/ash/ime/ime_controller_impl.h
index 8d5f4db..ba49622a 100644
--- a/ash/ime/ime_controller_impl.h
+++ b/ash/ime/ime_controller_impl.h
@@ -110,7 +110,7 @@
// Show the mode indicator UI with the given text at the anchor bounds.
// The anchor bounds is in the universal screen coordinates in DIP.
void ShowModeIndicator(const gfx::Rect& anchor_bounds,
- const base::string16& ime_short_name) override;
+ const std::u16string& ime_short_name) override;
// display::DisplayObserver:
void OnDisplayMetricsChanged(const display::Display& display,
diff --git a/ash/ime/ime_controller_impl_unittest.cc b/ash/ime/ime_controller_impl_unittest.cc
index 159cffe0..7d53f9a 100644
--- a/ash/ime/ime_controller_impl_unittest.cc
+++ b/ash/ime/ime_controller_impl_unittest.cc
@@ -295,7 +295,7 @@
TEST_F(ImeControllerImplTest, ShowModeIndicator) {
ImeControllerImpl* controller = Shell::Get()->ime_controller();
- base::string16 text = base::ASCIIToUTF16("US");
+ std::u16string text = base::ASCIIToUTF16("US");
gfx::Rect cursor1_bounds(100, 100, 1, 20);
controller->ShowModeIndicator(cursor1_bounds, text);
diff --git a/ash/ime/ime_mode_indicator_view.cc b/ash/ime/ime_mode_indicator_view.cc
index b6402b58..d9cf92b 100644
--- a/ash/ime/ime_mode_indicator_view.cc
+++ b/ash/ime/ime_mode_indicator_view.cc
@@ -53,7 +53,7 @@
} // namespace
ImeModeIndicatorView::ImeModeIndicatorView(const gfx::Rect& cursor_bounds,
- const base::string16& label)
+ const std::u16string& label)
: cursor_bounds_(cursor_bounds), label_view_(new views::Label(label)) {
SetButtons(ui::DIALOG_BUTTON_NONE);
SetCanActivate(false);
diff --git a/ash/ime/ime_mode_indicator_view.h b/ash/ime/ime_mode_indicator_view.h
index d737c482..cf7a666 100644
--- a/ash/ime/ime_mode_indicator_view.h
+++ b/ash/ime/ime_mode_indicator_view.h
@@ -30,7 +30,7 @@
// The cursor bounds is in the universal screen coordinates in DIP.
ImeModeIndicatorView(const gfx::Rect& cursor_bounds,
- const base::string16& label);
+ const std::u16string& label);
ImeModeIndicatorView(const ImeModeIndicatorView&) = delete;
ImeModeIndicatorView& operator=(const ImeModeIndicatorView&) = delete;
~ImeModeIndicatorView() override;
diff --git a/ash/in_session_auth/auth_dialog_contents_view.cc b/ash/in_session_auth/auth_dialog_contents_view.cc
index c5ec5422..dae5553 100644
--- a/ash/in_session_auth/auth_dialog_contents_view.cc
+++ b/ash/in_session_auth/auth_dialog_contents_view.cc
@@ -91,14 +91,14 @@
node_data->SetName(accessible_name_);
}
- void SetAccessibleName(const base::string16& name) {
+ void SetAccessibleName(const std::u16string& name) {
accessible_name_ = name;
NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged,
true /*send_native_event*/);
}
private:
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
};
FingerprintView() {
@@ -202,7 +202,7 @@
SetVisible(state_ != FingerprintState::UNAVAILABLE);
SetIcon(state_);
if (state_ != FingerprintState::UNAVAILABLE) {
- base::string16 fingerprint_text =
+ std::u16string fingerprint_text =
l10n_util::GetStringUTF16(GetTextIdFromState());
label_->SetText(fingerprint_text);
label_->SetAccessibleName(
@@ -287,7 +287,7 @@
bool IsShowingError() const { return is_showing_error_; }
void ShowTitle() {
- base::string16 title =
+ std::u16string title =
l10n_util::GetStringUTF16(IDS_ASH_IN_SESSION_AUTH_TITLE);
SetText(title);
SetEnabledColor(kTextColorPrimary);
@@ -295,7 +295,7 @@
SetAccessibleName(title);
}
- void ShowError(const base::string16& error_text) {
+ void ShowError(const std::u16string& error_text) {
SetText(error_text);
SetEnabledColor(kErrorColor);
is_showing_error_ = true;
@@ -311,14 +311,14 @@
}
private:
- void SetAccessibleName(const base::string16& name) {
+ void SetAccessibleName(const std::u16string& name) {
accessible_name_ = name;
NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged,
true /*send_native_event*/);
}
bool is_showing_error_ = false;
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
};
AuthDialogContentsView::AuthDialogContentsView(
@@ -572,7 +572,7 @@
InSessionAuthDialogController::Get()->OpenInSessionAuthHelpPage();
}
-void AuthDialogContentsView::OnAuthSubmit(const base::string16& pin) {
+void AuthDialogContentsView::OnAuthSubmit(const std::u16string& pin) {
if (pin_autosubmit_on_) {
pin_digit_input_view_->SetReadOnly(true);
} else {
@@ -591,7 +591,7 @@
return;
pin_attempts_++;
- base::string16 error_text =
+ std::u16string error_text =
pin_attempts_ >= kMaxPinAttempts
? l10n_util::GetStringUTF16(
IDS_ASH_IN_SESSION_AUTH_PIN_TOO_MANY_ATTEMPTS)
diff --git a/ash/in_session_auth/auth_dialog_contents_view.h b/ash/in_session_auth/auth_dialog_contents_view.h
index ce2fd56..73dfac3 100644
--- a/ash/in_session_auth/auth_dialog_contents_view.h
+++ b/ash/in_session_auth/auth_dialog_contents_view.h
@@ -106,7 +106,7 @@
void OnPinTextChanged(bool is_empty);
// Called when the user submits password or PIN.
- void OnAuthSubmit(const base::string16& password);
+ void OnAuthSubmit(const std::u16string& password);
// Called when PIN authentication of the user completes.
void OnPinAuthComplete(base::Optional<bool> success);
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc
index 048a2cf..ec4d0fe 100644
--- a/ash/login/login_screen_controller.cc
+++ b/ash/login/login_screen_controller.cc
@@ -280,7 +280,7 @@
void LoginScreenController::ShowKioskAppError(const std::string& message) {
ToastData toast_data(
"KioskAppError", base::UTF8ToUTF16(message), -1 /*duration_ms*/,
- base::Optional<base::string16>(base::string16()) /*dismiss_text*/,
+ base::Optional<std::u16string>(std::u16string()) /*dismiss_text*/,
true /*visible_on_lock_screen*/);
Shell::Get()->toast_manager()->Show(toast_data);
}
@@ -371,7 +371,7 @@
security_token_request_controller_.ClosePinUi();
}
bool LoginScreenController::SetLoginShelfGestureHandler(
- const base::string16& nudge_text,
+ const std::u16string& nudge_text,
const base::RepeatingClosure& fling_callback,
base::OnceClosure exit_callback) {
return Shelf::ForWindow(Shell::Get()->GetPrimaryRootWindow())
diff --git a/ash/login/login_screen_controller.h b/ash/login/login_screen_controller.h
index 0c02bd9..b14a475 100644
--- a/ash/login/login_screen_controller.h
+++ b/ash/login/login_screen_controller.h
@@ -121,7 +121,7 @@
void RequestSecurityTokenPin(SecurityTokenPinRequest request) override;
void ClearSecurityTokenPinRequest() override;
- bool SetLoginShelfGestureHandler(const base::string16& nudge_text,
+ bool SetLoginShelfGestureHandler(const std::u16string& nudge_text,
const base::RepeatingClosure& fling_callback,
base::OnceClosure exit_callback) override;
void ClearLoginShelfGestureHandler() override;
diff --git a/ash/login/login_screen_test_api.cc b/ash/login/login_screen_test_api.cc
index c6877eb..ba3877fb 100644
--- a/ash/login/login_screen_test_api.cc
+++ b/ash/login/login_screen_test_api.cc
@@ -367,22 +367,22 @@
}
// static
-base::string16 LoginScreenTestApi::GetChallengeResponseLabel(
+std::u16string LoginScreenTestApi::GetChallengeResponseLabel(
const AccountId& account_id) {
if (GetFocusedUser() != account_id) {
ADD_FAILURE() << "The user " << account_id.Serialize() << " is not focused";
- return base::string16();
+ return std::u16string();
}
LoginBigUserView* big_user_view = GetBigUserView(account_id);
if (!big_user_view) {
ADD_FAILURE() << "Could not find user " << account_id.Serialize();
- return base::string16();
+ return std::u16string();
}
LoginAuthUserView::TestApi auth_test(big_user_view->auth_user());
if (!auth_test.challenge_response_label()->IsDrawn()) {
ADD_FAILURE() << "Challenge-response label is not drawn for user "
<< account_id.Serialize();
- return base::string16();
+ return std::u16string();
}
return auth_test.challenge_response_label()->GetText();
}
@@ -691,12 +691,12 @@
}
// static
-base::string16 LoginScreenTestApi::GetDisabledAuthMessage(
+std::u16string LoginScreenTestApi::GetDisabledAuthMessage(
const AccountId& account_id) {
LoginBigUserView* big_user_view = GetBigUserView(account_id);
if (!big_user_view) {
ADD_FAILURE() << "Could not find user " << account_id.Serialize();
- return base::string16();
+ return std::u16string();
}
LoginAuthUserView::TestApi auth_test(big_user_view->auth_user());
@@ -704,12 +704,12 @@
}
// static
-base::string16 LoginScreenTestApi::GetManagementDisclosureText(
+std::u16string LoginScreenTestApi::GetManagementDisclosureText(
const AccountId& account_id) {
LoginBigUserView* big_user_view = GetBigUserView(account_id);
if (!big_user_view) {
ADD_FAILURE() << "Could not find user " << account_id.Serialize();
- return base::string16();
+ return std::u16string();
}
LoginUserView::TestApi user_test(big_user_view->GetUserView());
LoginUserMenuView::TestApi user_menu_test(user_test.menu());
@@ -725,10 +725,10 @@
}
// static
-base::string16 LoginScreenTestApi::GetShutDownButtonLabel() {
+std::u16string LoginScreenTestApi::GetShutDownButtonLabel() {
views::View* button = GetShutDownButton();
if (!button)
- return base::string16();
+ return std::u16string();
return static_cast<views::LabelButton*>(button)->GetText();
}
@@ -758,10 +758,10 @@
}
// static
-base::string16 LoginScreenTestApi::GetPinRequestWidgetTitle() {
+std::u16string LoginScreenTestApi::GetPinRequestWidgetTitle() {
if (!PinRequestWidget::Get()) {
ADD_FAILURE() << "No PIN request widget is shown";
- return base::string16();
+ return std::u16string();
}
PinRequestWidget::TestApi pin_widget_test(PinRequestWidget::Get());
PinRequestView::TestApi pin_view_test(pin_widget_test.pin_request_view());
diff --git a/ash/login/security_token_request_controller.cc b/ash/login/security_token_request_controller.cc
index 94c63d6..9b14ed4 100644
--- a/ash/login/security_token_request_controller.cc
+++ b/ash/login/security_token_request_controller.cc
@@ -20,17 +20,17 @@
namespace {
-base::string16 GetTitle() {
+std::u16string GetTitle() {
return l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_SECURITY_TOKEN_REQUEST_DIALOG_TITLE);
}
-base::string16 GetDescription() {
+std::u16string GetDescription() {
return l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_SECURITY_TOKEN_REQUEST_DIALOG_DESCRIPTION);
}
-base::string16 GetAccessibleTitle() {
+std::u16string GetAccessibleTitle() {
return l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_SECURITY_TOKEN_REQUEST_DIALOG_TITLE);
}
@@ -111,7 +111,7 @@
chromeos::security_token_pin::GenerateErrorMessage(
request.error_label, request.attempts_left,
request.enable_user_input),
- /*description=*/base::string16());
+ /*description=*/std::u16string());
}
return true;
}
diff --git a/ash/login/ui/access_code_input.cc b/ash/login/ui/access_code_input.cc
index 507582a..f44f638 100644
--- a/ash/login/ui/access_code_input.cc
+++ b/ash/login/ui/access_code_input.cc
@@ -73,7 +73,7 @@
FlexCodeInput::~FlexCodeInput() = default;
-void FlexCodeInput::SetAccessibleName(const base::string16& name) {
+void FlexCodeInput::SetAccessibleName(const std::u16string& name) {
code_field_->SetAccessibleName(name);
}
@@ -101,7 +101,7 @@
}
base::Optional<std::string> FlexCodeInput::GetCode() const {
- base::string16 code = code_field_->GetText();
+ std::u16string code = code_field_->GetText();
if (!code.length()) {
return base::nullopt;
}
@@ -121,7 +121,7 @@
}
void FlexCodeInput::ClearInput() {
- code_field_->SetText(base::string16());
+ code_field_->SetText(std::u16string());
on_input_change_.Run(false);
}
@@ -130,7 +130,7 @@
}
void FlexCodeInput::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
const bool has_content = new_contents.length() > 0;
on_input_change_.Run(has_content);
}
@@ -233,7 +233,7 @@
layout->SetFlexForView(field, 1);
}
- text_value_for_a11y_ = base::string16(length, ' ');
+ text_value_for_a11y_ = std::u16string(length, ' ');
}
FixedLengthCodeInput::~FixedLengthCodeInput() = default;
@@ -263,7 +263,7 @@
FocusPreviousField();
}
- ActiveField()->SetText(base::string16());
+ ActiveField()->SetText(std::u16string());
ResetTextValueForA11y();
NotifyAccessibilityEvent(ax::mojom::Event::kTextSelectionChanged, true);
@@ -304,7 +304,7 @@
}
void FixedLengthCodeInput::ResetTextValueForA11y() {
- base::string16 result;
+ std::u16string result;
for (size_t i = 0; i < input_fields_.size(); ++i) {
if (input_fields_[i]->GetText().empty()) {
@@ -445,7 +445,7 @@
void FixedLengthCodeInput::ClearInput() {
for (auto* field : input_fields_) {
- field->SetText(base::string16());
+ field->SetText(std::u16string());
}
active_input_index_ = 0;
text_value_for_a11y_.clear();
@@ -492,7 +492,7 @@
return input_fields_[active_input_index_];
}
-const base::string16& FixedLengthCodeInput::ActiveInput() const {
+const std::u16string& FixedLengthCodeInput::ActiveInput() const {
return ActiveField()->GetText();
}
diff --git a/ash/login/ui/access_code_input.h b/ash/login/ui/access_code_input.h
index 8444c8c..3b573a33 100644
--- a/ash/login/ui/access_code_input.h
+++ b/ash/login/ui/access_code_input.h
@@ -72,7 +72,7 @@
FlexCodeInput& operator=(const FlexCodeInput&) = delete;
~FlexCodeInput() override;
- void SetAccessibleName(const base::string16& name);
+ void SetAccessibleName(const std::u16string& name);
// Appends |value| to the code
void InsertDigit(int value) override;
@@ -97,7 +97,7 @@
// views::TextfieldController
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
// views::TextfieldController
bool HandleKeyEvent(views::Textfield* sender,
@@ -253,7 +253,7 @@
AccessibleInputField* ActiveField() const;
// Returns text in the active input field.
- const base::string16& ActiveInput() const;
+ const std::u16string& ActiveInput() const;
// To be called when access input code changes (digit is inserted, deleted or
// updated). Passes true when code is complete (all digits have input value)
@@ -274,7 +274,7 @@
// Value of current input, associate with AX event. The value will be the
// concat string of input fields. i.e. [1][2][3][|][][], text_value_for_a11y_
// = "123 ".
- base::string16 text_value_for_a11y_;
+ std::u16string text_value_for_a11y_;
// Whether the user can navigate the input fields with the arrow keys.
bool arrow_navigation_allowed_ = true;
diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc
index 2b53435..f16defa 100644
--- a/ash/login/ui/lock_contents_view.cc
+++ b/ash/login/ui/lock_contents_view.cc
@@ -195,7 +195,7 @@
// |bold_start|: The position in |text| to start bolding.
// |bold_length|: The length of bold text.
void MakeSectionBold(views::StyledLabel* label,
- const base::string16& text,
+ const std::u16string& text,
const base::Optional<int>& bold_start,
int bold_length) {
auto create_style = [&](bool is_bold) {
@@ -326,7 +326,7 @@
info_icon_ = AddChildView(new views::ImageView());
info_icon_->SetPreferredSize(gfx::Size(kInfoIconSizeDp, kInfoIconSizeDp));
- base::string16 message =
+ std::u16string message =
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_USER_ADDING_BANNER);
label_ = AddChildView(login_views_utils::CreateBubbleLabel(message, this));
label_->SetText(message);
@@ -383,7 +383,7 @@
class LockContentsView::ManagementBubble : public LoginTooltipView {
public:
- ManagementBubble(const base::string16& message, views::View* anchor_view)
+ ManagementBubble(const std::u16string& message, views::View* anchor_view)
: LoginTooltipView(message, anchor_view) {
views::BoxLayout* layout_manager =
SetLayoutManager(std::make_unique<views::BoxLayout>(
@@ -1185,7 +1185,7 @@
}
}
-void LockContentsView::OnWarningMessageUpdated(const base::string16& message) {
+void LockContentsView::OnWarningMessageUpdated(const std::u16string& message) {
if (message.empty()) {
if (warning_banner_bubble_->GetVisible())
warning_banner_bubble_->Hide();
@@ -1357,7 +1357,7 @@
if (auth_error_bubble_->GetVisible())
auth_error_bubble_->Hide();
- base::string16 error_text =
+ std::u16string error_text =
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_ERROR_DETACHABLE_BASE_CHANGED);
detachable_base_error_bubble_->SetTextContent(error_text);
@@ -2010,13 +2010,13 @@
// Hide easy unlock icon if there is no data is available.
if (!state->easy_unlock_state) {
big_view->auth_user()->SetEasyUnlockIcon(EasyUnlockIconId::NONE,
- base::string16());
+ std::u16string());
return;
}
// TODO(jdufault): Make easy unlock backend always send aria_label, right now
// it is only sent if there is no tooltip.
- base::string16 accessibility_label = state->easy_unlock_state->aria_label;
+ std::u16string accessibility_label = state->easy_unlock_state->aria_label;
if (accessibility_label.empty())
accessibility_label = state->easy_unlock_state->tooltip;
@@ -2050,7 +2050,7 @@
return;
}
- base::string16 error_text = l10n_util::GetStringUTF16(
+ std::u16string error_text = l10n_util::GetStringUTF16(
unlock_attempt_ > 1 ? IDS_ASH_LOGIN_ERROR_AUTHENTICATING_2ND_TIME
: IDS_ASH_LOGIN_ERROR_AUTHENTICATING);
ImeControllerImpl* ime_controller = Shell::Get()->ime_controller();
@@ -2066,7 +2066,7 @@
if (ime_controller->available_imes().size() > 1 && !IsTabletMode()) {
error_text += base::ASCIIToUTF16(" ");
bold_start = error_text.length();
- base::string16 shortcut =
+ std::u16string shortcut =
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_KEYBOARD_SWITCH_SHORTCUT);
bold_length = shortcut.length();
diff --git a/ash/login/ui/lock_contents_view.h b/ash/login/ui/lock_contents_view.h
index 5c96b8b..6035058 100644
--- a/ash/login/ui/lock_contents_view.h
+++ b/ash/login/ui/lock_contents_view.h
@@ -180,7 +180,7 @@
void OnForceOnlineSignInForUser(const AccountId& user) override;
void OnShowEasyUnlockIcon(const AccountId& user,
const EasyUnlockIconOptions& icon) override;
- void OnWarningMessageUpdated(const base::string16& message) override;
+ void OnWarningMessageUpdated(const std::u16string& message) override;
void OnSystemInfoChanged(bool show,
bool enforced,
const std::string& os_version_label_text,
diff --git a/ash/login/ui/lock_debug_view.cc b/ash/login/ui/lock_debug_view.cc
index a9c2056..8189209 100644
--- a/ash/login/ui/lock_debug_view.cc
+++ b/ash/login/ui/lock_debug_view.cc
@@ -219,7 +219,7 @@
int GetUserCount() const { return debug_users_.size(); }
- base::string16 GetDisplayNameForUserIndex(size_t user_index) {
+ std::u16string GetDisplayNameForUserIndex(size_t user_index) {
DCHECK(user_index >= 0 && user_index < debug_users_.size());
return base::UTF8ToUTF16(debug_users_[user_index].display_name);
}
@@ -431,7 +431,7 @@
adb_sideloading_enabled);
}
- void UpdateWarningMessage(const base::string16& message) {
+ void UpdateWarningMessage(const std::u16string& message) {
debug_dispatcher_.UpdateWarningMessage(message);
}
@@ -934,7 +934,7 @@
void LockDebugView::ToggleWarningBannerButtonPressed() {
debug_data_dispatcher_->UpdateWarningMessage(
is_warning_banner_shown_
- ? base::string16()
+ ? std::u16string()
: base::ASCIIToUTF16("A critical update is ready to install. Sign "
"in to get started."));
is_warning_banner_shown_ = !is_warning_banner_shown_;
diff --git a/ash/login/ui/lock_screen_media_controls_view.cc b/ash/login/ui/lock_screen_media_controls_view.cc
index ca83a54..527db8c 100644
--- a/ash/login/ui/lock_screen_media_controls_view.cc
+++ b/ash/login/ui/lock_screen_media_controls_view.cc
@@ -138,7 +138,7 @@
MediaActionButton(LockScreenMediaControlsView* view,
int icon_size,
MediaSessionAction action,
- const base::string16& accessible_name)
+ const std::u16string& accessible_name)
: views::ImageButton(base::BindRepeating(
// Handle dynamically-updated button tags without rebinding.
[](LockScreenMediaControlsView* controls,
@@ -172,7 +172,7 @@
~MediaActionButton() override = default;
void SetAction(MediaSessionAction action,
- const base::string16& accessible_name) {
+ const std::u16string& accessible_name) {
set_tag(static_cast<int>(action));
SetTooltipText(accessible_name);
UpdateIcon();
@@ -535,7 +535,7 @@
media_session::MediaMetadata session_metadata =
metadata.value_or(media_session::MediaMetadata());
- base::string16 source_title =
+ std::u16string source_title =
session_metadata.source_title.empty()
? message_center::MessageCenter::Get()->GetSystemNotificationAppName()
: session_metadata.source_title;
diff --git a/ash/login/ui/lock_screen_media_controls_view.h b/ash/login/ui/lock_screen_media_controls_view.h
index 1adea90..b59ac1a7 100644
--- a/ash/login/ui/lock_screen_media_controls_view.h
+++ b/ash/login/ui/lock_screen_media_controls_view.h
@@ -233,7 +233,7 @@
// Caches the text to be read by screen readers describing the media controls
// view.
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
// Set of enabled actions.
base::flat_set<media_session::mojom::MediaSessionAction> enabled_actions_;
diff --git a/ash/login/ui/lock_screen_media_controls_view_unittest.cc b/ash/login/ui/lock_screen_media_controls_view_unittest.cc
index 26c39f1..5147f340 100644
--- a/ash/login/ui/lock_screen_media_controls_view_unittest.cc
+++ b/ash/login/ui/lock_screen_media_controls_view_unittest.cc
@@ -40,7 +40,7 @@
constexpr int kArtworkViewHeight = 48;
constexpr int kArtworkCornerRadius = 4;
-const base::string16 kTestAppName = base::ASCIIToUTF16("Test app");
+const std::u16string kTestAppName = base::ASCIIToUTF16("Test app");
MediaSessionAction kActionButtonOrder[] = {
MediaSessionAction::kPreviousTrack, MediaSessionAction::kSeekBackward,
@@ -247,7 +247,7 @@
return header_row()->app_icon_for_testing();
}
- const base::string16& GetAppName() const {
+ const std::u16string& GetAppName() const {
return header_row()->app_name_for_testing();
}
@@ -424,7 +424,7 @@
EnableAction(MediaSessionAction::kPause);
auto* button = GetButtonForAction(MediaSessionAction::kPause);
- base::string16 tooltip = button->GetTooltipText(gfx::Point());
+ std::u16string tooltip = button->GetTooltipText(gfx::Point());
EXPECT_FALSE(tooltip.empty());
media_session::mojom::MediaSessionInfoPtr session_info(
@@ -433,7 +433,7 @@
media_session::mojom::MediaPlaybackState::kPaused;
media_controls_view_->MediaSessionInfoChanged(session_info.Clone());
- base::string16 new_tooltip = button->GetTooltipText(gfx::Point());
+ std::u16string new_tooltip = button->GetTooltipText(gfx::Point());
EXPECT_FALSE(new_tooltip.empty());
EXPECT_NE(tooltip, new_tooltip);
}
diff --git a/ash/login/ui/login_auth_user_view.cc b/ash/login/ui/login_auth_user_view.cc
index d84ea4e..dbfa967 100644
--- a/ash/login/ui/login_auth_user_view.cc
+++ b/ash/login/ui/login_auth_user_view.cc
@@ -272,21 +272,21 @@
}
private:
- void SetAccessibleName(const base::string16& name) {
+ void SetAccessibleName(const std::u16string& name) {
accessible_name_ = name;
NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged,
true /*send_native_event*/);
}
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
DISALLOW_COPY_AND_ASSIGN(FingerprintLabel);
};
// The content needed to render the disabled auth message view.
struct LockScreenMessage {
- base::string16 title;
- base::string16 content;
+ std::u16string title;
+ std::u16string content;
const gfx::VectorIcon* icon;
};
@@ -299,7 +299,7 @@
base::Time local_midnight = base::Time::Now().LocalMidnight();
- base::string16 time_to_display;
+ std::u16string time_to_display;
if (use_24hour_clock) {
time_to_display = base::TimeFormatTimeOfDayWithHourClockType(
unlock_time, base::k24HourClock, base::kDropAmPm);
@@ -344,7 +344,7 @@
// TODO(933973): Stop displaying the hours part of the string when duration
// is less than 1 hour. Example: change "0 hours, 7 minutes" to "7 minutes".
- base::string16 used_time_string;
+ std::u16string used_time_string;
if (!base::TimeDurationFormat(
used_time, base::DurationFormatWidth::DURATION_WIDTH_WIDE,
&used_time_string)) {
@@ -652,7 +652,7 @@
}
}
- base::string16 GetTextForLabel() const {
+ std::u16string GetTextForLabel() const {
switch (state_) {
case State::kInitial:
case State::kAuthenticating:
@@ -689,7 +689,7 @@
explicit TestApi(DisabledAuthMessageView* view) : view_(view) {}
~TestApi() = default;
- const base::string16& GetDisabledAuthMessageContent() const {
+ const std::u16string& GetDisabledAuthMessageContent() const {
return view_->message_contents_->GetText();
}
@@ -729,7 +729,7 @@
label->SetFocusBehavior(FocusBehavior::ALWAYS);
};
message_title_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL,
+ std::u16string(), views::style::CONTEXT_LABEL,
views::style::STYLE_PRIMARY));
message_title_->SetFontList(
gfx::FontList().Derive(kDisabledAuthMessageTitleFontSizeDeltaDp,
@@ -737,7 +737,7 @@
decorate_label(message_title_);
message_contents_ = AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL,
+ std::u16string(), views::style::CONTEXT_LABEL,
views::style::STYLE_PRIMARY));
message_contents_->SetFontList(
gfx::FontList().Derive(kDisabledAuthMessageContentsFontSizeDeltaDp,
@@ -857,7 +857,7 @@
message_description_ = CreateLabel();
// Set content.
- base::string16 message_description = l10n_util::GetStringUTF16(
+ std::u16string message_description = l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_POD_TPM_LOCKED_ISSUE_DESCRIPTION);
message_description_->SetText(message_description);
}
@@ -868,11 +868,11 @@
// Set the parameters needed to render the message.
void SetRemainingTime(base::TimeDelta time_left) {
- base::string16 time_left_message;
+ std::u16string time_left_message;
if (base::TimeDurationFormatWithSeconds(
time_left, base::DurationFormatWidth::DURATION_WIDTH_WIDE,
&time_left_message)) {
- base::string16 message_warning = l10n_util::GetStringFUTF16(
+ std::u16string message_warning = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_POD_TPM_LOCKED_ISSUE_WARNING, time_left_message);
message_warning_->SetText(message_warning);
@@ -916,7 +916,7 @@
private:
views::Label* CreateLabel() {
- auto label = std::make_unique<views::Label>(base::string16(),
+ auto label = std::make_unique<views::Label>(std::u16string(),
views::style::CONTEXT_LABEL,
views::style::STYLE_PRIMARY);
label->SetFontList(gfx::FontList().Derive(kLockedTpmMessageDeltaDp,
@@ -1017,7 +1017,7 @@
return view_->HasAuthMethod(auth_method);
}
-const base::string16&
+const std::u16string&
LoginAuthUserView::TestApi::GetDisabledAuthMessageContent() const {
return LoginAuthUserView::DisabledAuthMessageView::TestApi(
view_->disabled_auth_message_)
@@ -1105,7 +1105,7 @@
gfx::Size(kNonEmptyWidthDp, kDistanceBetweenUserViewAndPasswordDp));
padding_below_user_view_ = padding_below_user_view.get();
- base::string16 button_message =
+ std::u16string button_message =
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_SIGN_IN_REQUIRED_MESSAGE);
if (user.is_signed_in) {
button_message =
@@ -1307,7 +1307,7 @@
void LoginAuthUserView::SetEasyUnlockIcon(
EasyUnlockIconId id,
- const base::string16& accessibility_label) {
+ const std::u16string& accessibility_label) {
password_view_->SetEasyUnlockIcon(id, accessibility_label);
const std::string& user_display_email =
@@ -1565,7 +1565,7 @@
pin_view_->UpdatePalette(palette);
}
-void LoginAuthUserView::OnAuthSubmit(const base::string16& password) {
+void LoginAuthUserView::OnAuthSubmit(const std::u16string& password) {
// Pressing enter when the password field is empty and tap-to-unlock is
// enabled should attempt unlock.
if (HasAuthMethod(AUTH_TAP) && password.empty()) {
@@ -1830,14 +1830,14 @@
return SizeFromHeight(0);
}
-base::string16 LoginAuthUserView::GetPinPasswordToggleText() {
+std::u16string LoginAuthUserView::GetPinPasswordToggleText() {
if (input_field_mode_ == InputFieldMode::PWD_WITH_TOGGLE)
return l10n_util::GetStringUTF16(IDS_ASH_LOGIN_SWITCH_TO_PIN);
else
return l10n_util::GetStringUTF16(IDS_ASH_LOGIN_SWITCH_TO_PASSWORD);
}
-base::string16 LoginAuthUserView::GetPasswordViewPlaceholder() const {
+std::u16string LoginAuthUserView::GetPasswordViewPlaceholder() const {
// Note: |AUTH_TAP| must have higher priority than |AUTH_PIN| when
// determining the placeholder.
if (HasAuthMethod(AUTH_TAP))
diff --git a/ash/login/ui/login_auth_user_view.h b/ash/login/ui/login_auth_user_view.h
index 4c349a2..925d0d1 100644
--- a/ash/login/ui/login_auth_user_view.h
+++ b/ash/login/ui/login_auth_user_view.h
@@ -99,7 +99,7 @@
views::Button* challenge_response_button();
views::Label* challenge_response_label();
bool HasAuthMethod(AuthMethods auth_method) const;
- const base::string16& GetDisabledAuthMessageContent() const;
+ const std::u16string& GetDisabledAuthMessageContent() const;
private:
LoginAuthUserView* const view_;
@@ -146,7 +146,7 @@
// Add an easy unlock icon.
void SetEasyUnlockIcon(EasyUnlockIconId id,
- const base::string16& accessibility_label);
+ const std::u16string& accessibility_label);
// Captures any metadata about the current view state that will be used for
// animation.
@@ -190,7 +190,7 @@
class LockedTpmMessageView;
// Called when the user submits an auth method. Runs mojo call.
- void OnAuthSubmit(const base::string16& password);
+ void OnAuthSubmit(const std::u16string& password);
// Called with the result of the request started in |OnAuthSubmit| or
// |AttemptAuthenticateWithExternalBinary|.
void OnAuthComplete(base::Optional<bool> auth_success);
@@ -250,8 +250,8 @@
gfx::Size GetPaddingBelowPasswordView() const;
// Convenience methods to determine UI text based on the InputFieldMode.
- base::string16 GetPinPasswordToggleText();
- base::string16 GetPasswordViewPlaceholder() const;
+ std::u16string GetPinPasswordToggleText();
+ std::u16string GetPasswordViewPlaceholder() const;
// Authentication methods available and extra parameters that control the UI.
AuthMethods auth_methods_ = AUTH_NONE;
diff --git a/ash/login/ui/login_data_dispatcher.cc b/ash/login/ui/login_data_dispatcher.cc
index 07e3555..4bc694f 100644
--- a/ash/login/ui/login_data_dispatcher.cc
+++ b/ash/login/ui/login_data_dispatcher.cc
@@ -58,7 +58,7 @@
const EasyUnlockIconOptions& icon) {}
void LoginDataDispatcher::Observer::OnWarningMessageUpdated(
- const base::string16& message) {}
+ const std::u16string& message) {}
void LoginDataDispatcher::Observer::OnSystemInfoChanged(
bool show,
@@ -189,7 +189,7 @@
observer.OnShowEasyUnlockIcon(user, icon);
}
-void LoginDataDispatcher::UpdateWarningMessage(const base::string16& message) {
+void LoginDataDispatcher::UpdateWarningMessage(const std::u16string& message) {
for (auto& observer : observers_)
observer.OnWarningMessageUpdated(message);
}
diff --git a/ash/login/ui/login_data_dispatcher.h b/ash/login/ui/login_data_dispatcher.h
index e54ec78..063548a9 100644
--- a/ash/login/ui/login_data_dispatcher.h
+++ b/ash/login/ui/login_data_dispatcher.h
@@ -99,7 +99,7 @@
// Called when a warning message should be displayed, or hidden if |message|
// is empty.
- virtual void OnWarningMessageUpdated(const base::string16& message);
+ virtual void OnWarningMessageUpdated(const std::u16string& message);
// Called when the system info has changed.
virtual void OnSystemInfoChanged(bool show,
@@ -182,7 +182,7 @@
void SetLockScreenNoteState(mojom::TrayActionState state);
void ShowEasyUnlockIcon(const AccountId& user,
const EasyUnlockIconOptions& icon) override;
- void UpdateWarningMessage(const base::string16& message) override;
+ void UpdateWarningMessage(const std::u16string& message) override;
void SetSystemInfo(bool show,
bool enforced,
const std::string& os_version_label_text,
diff --git a/ash/login/ui/login_error_bubble.cc b/ash/login/ui/login_error_bubble.cc
index 716ef4d..d7c21a0f 100644
--- a/ash/login/ui/login_error_bubble.cc
+++ b/ash/login/ui/login_error_bubble.cc
@@ -42,7 +42,7 @@
content_ = AddChildView(content);
}
-void LoginErrorBubble::SetTextContent(const base::string16& message) {
+void LoginErrorBubble::SetTextContent(const std::u16string& message) {
message_ = message;
SetContent(login_views_utils::CreateBubbleLabel(message, this));
}
diff --git a/ash/login/ui/login_error_bubble.h b/ash/login/ui/login_error_bubble.h
index de3c097..d7d3cb1 100644
--- a/ash/login/ui/login_error_bubble.h
+++ b/ash/login/ui/login_error_bubble.h
@@ -24,12 +24,12 @@
void SetContent(views::View* content);
// Covers most cases where content is a simple label containing a message.
// The eventual theme changes will be handled internally.
- void SetTextContent(const base::string16& message);
+ void SetTextContent(const std::u16string& message);
// We set an accessible name when content is not accessible. This happens if
// content is a container (e.g. a text and a "learn more" button). In such a
// case, it will have multiple subviews but only one which needs to be read
// on bubble show – when the alert event occurs.
- void set_accessible_name(const base::string16& name) {
+ void set_accessible_name(const std::u16string& name) {
accessible_name_ = name;
}
@@ -45,9 +45,9 @@
views::ImageView* alert_icon_ = nullptr;
// Accessibility data.
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
- base::string16 message_;
+ std::u16string message_;
DISALLOW_COPY_AND_ASSIGN(LoginErrorBubble);
};
diff --git a/ash/login/ui/login_expanded_public_account_view.cc b/ash/login/ui/login_expanded_public_account_view.cc
index 4e14681..f07444e 100644
--- a/ash/login/ui/login_expanded_public_account_view.cc
+++ b/ash/login/ui/login_expanded_public_account_view.cc
@@ -75,7 +75,7 @@
constexpr int kSpacingBetweenMonitoringWarningIconAndLabelDp = 8;
constexpr int kMonitoringWarningIconSizeDp = 20;
-views::Label* CreateLabel(const base::string16& text, SkColor color) {
+views::Label* CreateLabel(const std::u16string& text, SkColor color) {
auto* label = new views::Label(text);
label->SetSubpixelRenderingEnabled(false);
label->SetAutoColorReadabilityEnabled(false);
@@ -121,7 +121,7 @@
// Button with text on the left side and an icon on the right side.
class SelectionButtonView : public LoginButton {
public:
- SelectionButtonView(PressedCallback callback, const base::string16& text)
+ SelectionButtonView(PressedCallback callback, const std::u16string& text)
: LoginButton(std::move(callback)) {
SetPaintToLayer();
layer()->SetFillsBoundsOpaquely(false);
@@ -191,7 +191,7 @@
}
void SetTextColor(SkColor color) { label_->SetEnabledColor(color); }
- void SetText(const base::string16& text) {
+ void SetText(const std::u16string& text) {
SetAccessibleName(text);
label_->SetText(text);
Layout();
@@ -232,7 +232,7 @@
image_->SetVisible(false);
AddChildView(image_);
- const base::string16 label_text = l10n_util::GetStringUTF16(
+ const std::u16string label_text = l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_PUBLIC_ACCOUNT_MONITORING_WARNING);
label_ = CreateLabel(
label_text, AshColorProvider::Get()->GetContentLayerColor(
@@ -263,7 +263,7 @@
// device_manager_ is set.
if (warning_type_ == WarningType::kNone || !device_manager_.has_value())
return;
- base::string16 label_text;
+ std::u16string label_text;
if (warning_type_ == WarningType::kFullWarning) {
label_text = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_SESSION_MONITORING_FULL_WARNING,
@@ -310,9 +310,9 @@
labels_view_->AddChildView(monitoring_warning_view_);
}
- const base::string16 link = l10n_util::GetStringUTF16(IDS_ASH_LEARN_MORE);
+ const std::u16string link = l10n_util::GetStringUTF16(IDS_ASH_LEARN_MORE);
size_t offset;
- const base::string16 text = l10n_util::GetStringFUTF16(
+ const std::u16string text = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_PUBLIC_ACCOUNT_SIGNOUT_REMINDER, link, &offset);
learn_more_label_ =
labels_view_->AddChildView(std::make_unique<views::StyledLabel>());
@@ -359,7 +359,7 @@
// Creates button to open the menu.
auto create_menu_button =
[&](views::Button::PressedCallback callback,
- const base::string16& text) -> SelectionButtonView* {
+ const std::u16string& text) -> SelectionButtonView* {
auto* button = new SelectionButtonView(std::move(callback), text);
button->SetPreferredSize(
gfx::Size(kSelectionBoxWidthDp, kSelectionBoxHeightDp));
@@ -385,7 +385,7 @@
language_selection_ = create_menu_button(
base::BindRepeating(&RightPaneView::LanguageSelectionButtonPressed,
base::Unretained(this)),
- base::string16());
+ std::u16string());
views::Label* keyboard_title = CreateLabel(
l10n_util::GetStringUTF16(IDS_ASH_LOGIN_KEYBOARD_SELECTION_SELECT),
@@ -393,7 +393,7 @@
keyboard_selection_ = create_menu_button(
base::BindRepeating(&RightPaneView::KeyboardSelectionButtonPressed,
base::Unretained(this)),
- base::string16());
+ std::u16string());
advanced_view_->AddChildView(language_title);
advanced_view_->AddChildView(
diff --git a/ash/login/ui/login_expanded_public_account_view_unittest.cc b/ash/login/ui/login_expanded_public_account_view_unittest.cc
index 8c609ec..2440970e 100644
--- a/ash/login/ui/login_expanded_public_account_view_unittest.cc
+++ b/ash/login/ui/login_expanded_public_account_view_unittest.cc
@@ -303,7 +303,7 @@
LoginExpandedPublicAccountView::TestApi test_api(public_account_);
views::Label* label = test_api.monitoring_warning_label();
test_api.ResetUserForTest();
- const base::string16 default_warning = l10n_util::GetStringUTF16(
+ const std::u16string default_warning = l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_PUBLIC_ACCOUNT_MONITORING_WARNING);
EXPECT_EQ(label->GetText(), default_warning);
@@ -312,13 +312,13 @@
const std::string domain =
user_.public_account_info->device_enterprise_manager.value();
public_account_->UpdateForUser(user_);
- const base::string16 soft_warning = l10n_util::GetStringFUTF16(
+ const std::u16string soft_warning = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_SESSION_MONITORING_SOFT_WARNING,
base::UTF8ToUTF16(domain));
EXPECT_EQ(label->GetText(), soft_warning);
public_account_->SetShowFullManagementDisclosure(true);
- const base::string16 full_warning = l10n_util::GetStringFUTF16(
+ const std::u16string full_warning = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_SESSION_MONITORING_FULL_WARNING,
base::UTF8ToUTF16(domain));
EXPECT_EQ(label->GetText(), full_warning);
diff --git a/ash/login/ui/login_password_view.cc b/ash/login/ui/login_password_view.cc
index 52357b7..7b419a5 100644
--- a/ash/login/ui/login_password_view.cc
+++ b/ash/login/ui/login_password_view.cc
@@ -328,7 +328,7 @@
}
void SetEasyUnlockIcon(EasyUnlockIconId icon_id,
- const base::string16& accessibility_label) {
+ const std::u16string& accessibility_label) {
icon_id_ = icon_id;
UpdateImage(icon_id);
SetAccessibleName(accessibility_label);
@@ -695,7 +695,7 @@
void LoginPasswordView::SetEasyUnlockIcon(
EasyUnlockIconId id,
- const base::string16& accessibility_label) {
+ const std::u16string& accessibility_label) {
// Update icon.
easy_unlock_icon_->SetEasyUnlockIcon(id, accessibility_label);
@@ -709,7 +709,7 @@
HandleLeftIconsVisibilities(false /*handling_capslock*/);
}
-void LoginPasswordView::SetAccessibleName(const base::string16& name) {
+void LoginPasswordView::SetAccessibleName(const std::u16string& name) {
textfield_->SetAccessibleName(name);
}
@@ -738,7 +738,7 @@
}
void LoginPasswordView::Clear() {
- textfield_->SetText(base::string16());
+ textfield_->SetText(std::u16string());
// For security reasons, we also want to clear the edit history if the Clear
// function is invoked by the clear password timer.
textfield_->ClearEditHistory();
@@ -771,7 +771,7 @@
}
void LoginPasswordView::SetPlaceholderText(
- const base::string16& placeholder_text) {
+ const std::u16string& placeholder_text) {
textfield_->SetPlaceholderText(placeholder_text);
}
@@ -825,7 +825,7 @@
}
void LoginPasswordView::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
DCHECK_EQ(sender, textfield_);
UpdateUiState();
textfield_->UpdateFontListAndCursor();
diff --git a/ash/login/ui/login_password_view.h b/ash/login/ui/login_password_view.h
index f74be29c..429c316 100644
--- a/ash/login/ui/login_password_view.h
+++ b/ash/login/ui/login_password_view.h
@@ -105,7 +105,7 @@
};
using >
- base::RepeatingCallback<void(const base::string16& password)>;
+ base::RepeatingCallback<void(const std::u16string& password)>;
using is_empty)>;
using >
@@ -127,10 +127,10 @@
// Change the active icon for easy unlock.
void SetEasyUnlockIcon(EasyUnlockIconId id,
- const base::string16& accessibility_label);
+ const std::u16string& accessibility_label);
// Set the textfield name used for accessibility.
- void SetAccessibleName(const base::string16& name);
+ void SetAccessibleName(const std::u16string& name);
// Enable or disable focus on the child elements (i.e.: password field and
// submit button, or display password button if it is shown).
@@ -154,7 +154,7 @@
// Set password field placeholder. The password view cannot set the text by
// itself because it doesn't know which auth methods are enabled.
- void SetPlaceholderText(const base::string16& placeholder_text);
+ void SetPlaceholderText(const std::u16string& placeholder_text);
// Makes the textfield read-only and enables/disables submitting.
void SetReadOnly(bool read_only);
@@ -174,7 +174,7 @@
// views::TextfieldController:
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) override;
diff --git a/ash/login/ui/login_password_view_test.cc b/ash/login/ui/login_password_view_test.cc
index 53566ea..2e820dae 100644
--- a/ash/login/ui/login_password_view_test.cc
+++ b/ash/login/ui/login_password_view_test.cc
@@ -54,7 +54,7 @@
SetWidget(CreateWidgetWithContent(view_));
}
- void OnPasswordSubmit(const base::string16& password) {
+ void OnPasswordSubmit(const std::u16string& password) {
password_ = password;
}
void OnPasswordTextChanged(bool is_empty) {
@@ -76,7 +76,7 @@
}
LoginPasswordView* view_ = nullptr;
- base::Optional<base::string16> password_;
+ base::Optional<std::u16string> password_;
bool is_password_field_empty_ = true;
bool easy_unlock_icon_hovered_called_ = false;
bool easy_unlock_icon_tapped_called_ = false;
@@ -257,7 +257,7 @@
// Enable icon.
view_->SetEasyUnlockIcon(EasyUnlockIconId::SPINNER,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
ASSERT_TRUE(test_api.easy_unlock_icon()->GetVisible());
// Click to the right of the icon, call is not generated.
@@ -289,7 +289,7 @@
// Enable icon, enable immediate hovering.
view_->SetEasyUnlockIcon(EasyUnlockIconId::SPINNER,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
test_api.set_immediately_hover_easy_unlock_icon();
ASSERT_TRUE(test_api.easy_unlock_icon()->GetVisible());
@@ -329,7 +329,7 @@
// Show the easy unlock icon.
view_->SetEasyUnlockIcon(EasyUnlockIconId::SPINNER,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
// The easy unlock icon should be visible.
EXPECT_TRUE(test_api.easy_unlock_icon()->GetVisible());
EXPECT_FALSE(test_api.capslock_icon()->GetVisible());
@@ -360,7 +360,7 @@
// Hide the easy unlock icon.
view_->SetEasyUnlockIcon(EasyUnlockIconId::NONE,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
// Nothing should be displayed.
EXPECT_FALSE(test_api.easy_unlock_icon()->GetVisible());
EXPECT_FALSE(test_api.capslock_icon()->GetVisible());
@@ -372,13 +372,13 @@
// Then trigger the easy unlock icon, it should be displayed immediately.
view_->SetEasyUnlockIcon(EasyUnlockIconId::SPINNER,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
EXPECT_TRUE(test_api.easy_unlock_icon()->GetVisible());
EXPECT_FALSE(test_api.capslock_icon()->GetVisible());
// Hide the easy unlock icon, the capslock icon should be shown.
view_->SetEasyUnlockIcon(EasyUnlockIconId::NONE,
- base::string16() /*accessibility_label*/);
+ std::u16string() /*accessibility_label*/);
EXPECT_FALSE(test_api.easy_unlock_icon()->GetVisible());
EXPECT_TRUE(test_api.capslock_icon()->GetVisible());
}
diff --git a/ash/login/ui/login_pin_input_view.cc b/ash/login/ui/login_pin_input_view.cc
index 7536369..42fd4aa2 100644
--- a/ash/login/ui/login_pin_input_view.cc
+++ b/ash/login/ui/login_pin_input_view.cc
@@ -183,7 +183,7 @@
on_changed_ = on_changed;
}
-void LoginPinInputView::SubmitPin(const base::string16& pin) {
+void LoginPinInputView::SubmitPin(const std::u16string& pin) {
DCHECK(on_submit_);
on_submit_.Run(pin);
}
diff --git a/ash/login/ui/login_pin_input_view.h b/ash/login/ui/login_pin_input_view.h
index ce6805c..7b723f64 100644
--- a/ash/login/ui/login_pin_input_view.h
+++ b/ash/login/ui/login_pin_input_view.h
@@ -32,7 +32,7 @@
//
class ASH_EXPORT LoginPinInputView : public views::View {
public:
- using base::string16& pin)>;
+ using std::u16string& pin)>;
using is_empty)>;
static const int kDefaultLength;
@@ -90,7 +90,7 @@
private:
// The code input will call this when all digits are in.
- void SubmitPin(const base::string16& pin);
+ void SubmitPin(const std::u16string& pin);
// Called by the inner view whenever the fields change.
void OnChanged(bool is_empty);
diff --git a/ash/login/ui/login_pin_input_view_unittest.cc b/ash/login/ui/login_pin_input_view_unittest.cc
index 94bcc82..06c44b4 100644
--- a/ash/login/ui/login_pin_input_view_unittest.cc
+++ b/ash/login/ui/login_pin_input_view_unittest.cc
@@ -44,7 +44,7 @@
SetWidget(CreateWidgetWithContent(view_));
}
- void OnPinSubmit(const base::string16& pin) {
+ void OnPinSubmit(const std::u16string& pin) {
submitted_pin_ = base::make_optional(pin);
}
@@ -78,7 +78,7 @@
int length_ = 0;
// Generated during the callback response.
- base::Optional<base::string16> submitted_pin_;
+ base::Optional<std::u16string> submitted_pin_;
base::Optional<bool> is_empty_;
};
diff --git a/ash/login/ui/login_pin_view.cc b/ash/login/ui/login_pin_view.cc
index 99345bc..b47d3bb 100644
--- a/ash/login/ui/login_pin_view.cc
+++ b/ash/login/ui/login_pin_view.cc
@@ -66,12 +66,12 @@
constexpr int kButtonWidthDp = 72;
constexpr gfx::Size kButtonSize = gfx::Size(kButtonWidthDp, kButtonHeightDp);
-base::string16 GetButtonLabelForNumber(int value) {
+std::u16string GetButtonLabelForNumber(int value) {
DCHECK(value >= 0 && value < int{base::size(kPinLabels)});
return base::ASCIIToUTF16(std::to_string(value));
}
-base::string16 GetButtonSubLabelForNumber(int value) {
+std::u16string GetButtonSubLabelForNumber(int value) {
DCHECK(value >= 0 && value < int{base::size(kPinLabels)});
return base::ASCIIToUTF16(kPinLabels[value]);
}
@@ -88,7 +88,7 @@
public:
BasePinButton(const LoginPalette& palette,
const gfx::Size& size,
- const base::string16& accessible_name,
+ const std::u16string& accessible_name,
const base::RepeatingClosure& on_press)
: on_press_(on_press),
palette_(palette),
@@ -189,7 +189,7 @@
LoginPalette palette_;
private:
- const base::string16 accessible_name_;
+ const std::u16string accessible_name_;
DISALLOW_COPY_AND_ASSIGN(BasePinButton);
};
diff --git a/ash/login/ui/login_tooltip_view.cc b/ash/login/ui/login_tooltip_view.cc
index 224cda4..bd86f4aa 100644
--- a/ash/login/ui/login_tooltip_view.cc
+++ b/ash/login/ui/login_tooltip_view.cc
@@ -24,7 +24,7 @@
} // namespace
-LoginTooltipView::LoginTooltipView(const base::string16& message,
+LoginTooltipView::LoginTooltipView(const std::u16string& message,
views::View* anchor_view)
: LoginBaseBubbleView(anchor_view) {
info_icon_ = AddChildView(std::make_unique<views::ImageView>());
diff --git a/ash/login/ui/login_tooltip_view.h b/ash/login/ui/login_tooltip_view.h
index 4f245cd..c5c3674 100644
--- a/ash/login/ui/login_tooltip_view.h
+++ b/ash/login/ui/login_tooltip_view.h
@@ -17,10 +17,10 @@
class LoginTooltipView : public LoginBaseBubbleView {
public:
- LoginTooltipView(const base::string16& message, views::View* anchor_view);
+ LoginTooltipView(const std::u16string& message, views::View* anchor_view);
~LoginTooltipView() override;
- void set_text(const base::string16& message) { label_->SetText(message); }
+ void set_text(const std::u16string& message) { label_->SetText(message); }
void UpdateIcon();
diff --git a/ash/login/ui/login_user_menu_view.cc b/ash/login/ui/login_user_menu_view.cc
index 10dab58..30aac3b 100644
--- a/ash/login/ui/login_user_menu_view.cc
+++ b/ash/login/ui/login_user_menu_view.cc
@@ -140,16 +140,15 @@
bubble_opener_(bubble_opener),
on_remove_user_warning_shown_(on_remove_user_warning_shown),
on_remove_user_requested_(on_remove_user_requested) {
-
- const base::string16& email =
+ const std::u16string& email =
base::UTF8ToUTF16(user.basic_user_info.display_email);
bool is_owner = user.is_device_owner;
// User information.
{
- const base::string16& username =
+ const std::u16string& username =
base::UTF8ToUTF16(user.basic_user_info.display_name);
- base::string16 display_username =
+ std::u16string display_username =
is_owner
? l10n_util::GetStringFUTF16(IDS_ASH_LOGIN_POD_OWNER_USER, username)
: username;
@@ -177,7 +176,7 @@
managed_user_data_ = new views::View();
managed_user_data_->SetLayoutManager(std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical));
- base::string16 managed_text = l10n_util::GetStringFUTF16(
+ std::u16string managed_text = l10n_util::GetStringFUTF16(
IDS_ASH_LOGIN_MANAGED_SESSION_MONITORING_USER_WARNING,
base::UTF8ToUTF16(user.user_account_manager.value()));
management_disclosure_label_ =
@@ -195,9 +194,9 @@
if (user.can_remove) {
DCHECK(!is_owner);
user_manager::UserType type = user.basic_user_info.type;
- base::string16 part1 = l10n_util::GetStringUTF16(
+ std::u16string part1 = l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_POD_NON_OWNER_USER_REMOVE_WARNING_PART_1);
- base::string16 part2 = l10n_util::GetStringFUTF16(
+ std::u16string part2 = l10n_util::GetStringFUTF16(
type == user_manager::UserType::USER_TYPE_CHILD
? IDS_ASH_LOGIN_POD_NON_OWNER_USER_REMOVE_WARNING_PART_2_SUPERVISED_USER
: IDS_ASH_LOGIN_POD_NON_OWNER_USER_REMOVE_WARNING_PART_2,
@@ -244,7 +243,7 @@
SystemLabelButton::DisplayType::DEFAULT);
// Reset button's description to none.
remove_user_button_->GetViewAccessibility().OverrideDescription(
- base::string16());
+ std::u16string());
}
}
diff --git a/ash/login/ui/login_user_menu_view.h b/ash/login/ui/login_user_menu_view.h
index d4d4874..985165c 100644
--- a/ash/login/ui/login_user_menu_view.h
+++ b/ash/login/ui/login_user_menu_view.h
@@ -79,7 +79,7 @@
views::Label* email_label_ = nullptr;
views::Label* management_disclosure_label_ = nullptr;
- base::string16 warning_message_;
+ std::u16string warning_message_;
std::unique_ptr<views::FocusSearch> focus_search_;
diff --git a/ash/login/ui/login_user_view.cc b/ash/login/ui/login_user_view.cc
index c9b8576..9483e20 100644
--- a/ash/login/ui/login_user_view.cc
+++ b/ash/login/ui/login_user_view.cc
@@ -311,7 +311,7 @@
AshColorProvider::ContentLayerType::kTextColorPrimary));
}
- const base::string16& displayed_name() const { return user_name_->GetText(); }
+ const std::u16string& displayed_name() const { return user_name_->GetText(); }
private:
views::Label* user_name_ = nullptr;
@@ -362,7 +362,7 @@
return view_->display_style_;
}
-const base::string16& LoginUserView::TestApi::displayed_name() const {
+const std::u16string& LoginUserView::TestApi::displayed_name() const {
return view_->user_label_->displayed_name();
}
@@ -623,7 +623,7 @@
}
void LoginUserView::UpdateCurrentUserState() {
- base::string16 accessible_name;
+ std::u16string accessible_name;
auto email = base::UTF8ToUTF16(current_user_.basic_user_info.display_email);
if (current_user_.user_account_manager) {
accessible_name = l10n_util::GetStringFUTF16(
diff --git a/ash/login/ui/login_user_view.h b/ash/login/ui/login_user_view.h
index 91a99eb..a30205c 100644
--- a/ash/login/ui/login_user_view.h
+++ b/ash/login/ui/login_user_view.h
@@ -33,7 +33,7 @@
LoginDisplayStyle display_style() const;
- const base::string16& displayed_name() const;
+ const std::u16string& displayed_name() const;
views::View* user_label() const;
views::View* tap_button() const;
diff --git a/ash/login/ui/media_controls_header_view.cc b/ash/login/ui/media_controls_header_view.cc
index f4eed47..9f3597c0 100644
--- a/ash/login/ui/media_controls_header_view.cc
+++ b/ash/login/ui/media_controls_header_view.cc
@@ -88,7 +88,7 @@
auto close_button = CreateVectorImageButton(std::move(close_button_cb));
close_button->SetPreferredSize(kCloseButtonSize);
close_button->SetFocusBehavior(View::FocusBehavior::ALWAYS);
- base::string16 close_button_label(
+ std::u16string close_button_label(
l10n_util::GetStringUTF16(IDS_ASH_LOCK_SCREEN_MEDIA_CONTROLS_CLOSE));
close_button->SetAccessibleName(close_button_label);
close_button->SetInkDropBaseColor(
@@ -102,7 +102,7 @@
app_icon_view_->SetImage(img);
}
-void MediaControlsHeaderView::SetAppName(const base::string16& name) {
+void MediaControlsHeaderView::SetAppName(const std::u16string& name) {
app_name_view_->SetText(name);
}
@@ -119,7 +119,7 @@
node_data->SetName(app_name_view_->GetText());
}
-const base::string16& MediaControlsHeaderView::app_name_for_testing() const {
+const std::u16string& MediaControlsHeaderView::app_name_for_testing() const {
return app_name_view_->GetText();
}
diff --git a/ash/login/ui/media_controls_header_view.h b/ash/login/ui/media_controls_header_view.h
index 0b95357..0d483c3 100644
--- a/ash/login/ui/media_controls_header_view.h
+++ b/ash/login/ui/media_controls_header_view.h
@@ -24,14 +24,14 @@
~MediaControlsHeaderView() override;
void SetAppIcon(const gfx::ImageSkia& img);
- void SetAppName(const base::string16& name);
+ void SetAppName(const std::u16string& name);
void SetCloseButtonVisibility(bool visible);
// views::View:
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
- const base::string16& app_name_for_testing() const;
+ const std::u16string& app_name_for_testing() const;
const views::ImageView* app_icon_for_testing() const;
views::ImageButton* close_button_for_testing() const;
diff --git a/ash/login/ui/pin_request_view.cc b/ash/login/ui/pin_request_view.cc
index 463e5fd..24e8f59 100644
--- a/ash/login/ui/pin_request_view.cc
+++ b/ash/login/ui/pin_request_view.cc
@@ -88,7 +88,7 @@
// Label button that displays focus ring.
class PinRequestView::FocusableLabelButton : public views::LabelButton {
public:
- FocusableLabelButton(PressedCallback callback, const base::string16& text)
+ FocusableLabelButton(PressedCallback callback, const std::u16string& text)
: views::LabelButton(std::move(callback), text) {
SetInstallFocusRingOnFocus(true);
focus_ring()->SetColor(ShelfConfig::Get()->shelf_focus_border_color());
@@ -414,7 +414,7 @@
return access_code_view_;
}
-base::string16 PinRequestView::GetAccessibleWindowTitle() const {
+std::u16string PinRequestView::GetAccessibleWindowTitle() const {
return default_accessible_title_;
}
@@ -473,8 +473,8 @@
}
void PinRequestView::UpdateState(PinRequestViewState state,
- const base::string16& title,
- const base::string16& description) {
+ const std::u16string& title,
+ const std::u16string& description) {
state_ = state;
title_label_->SetText(title);
description_label_->SetText(description);
diff --git a/ash/login/ui/pin_request_view.h b/ash/login/ui/pin_request_view.h
index 3e8a90e..c83ccb0c 100644
--- a/ash/login/ui/pin_request_view.h
+++ b/ash/login/ui/pin_request_view.h
@@ -64,9 +64,9 @@
bool obscure_pin = true;
// Strings for UI.
- base::string16 title;
- base::string16 description;
- base::string16 accessible_title;
+ std::u16string title;
+ std::u16string description;
+ std::u16string accessible_title;
};
// The view that allows for input of pins to authorize certain actions.
@@ -130,7 +130,7 @@
// views::DialogDelegateView:
views::View* GetInitiallyFocusedView() override;
- base::string16 GetAccessibleWindowTitle() const override;
+ std::u16string GetAccessibleWindowTitle() const override;
// TabletModeObserver:
void OnTabletModeStarted() override;
@@ -146,8 +146,8 @@
// Updates state of the view.
void UpdateState(PinRequestViewState state,
- const base::string16& title,
- const base::string16& description);
+ const std::u16string& title,
+ const std::u16string& description);
private:
class FocusableLabelButton;
@@ -190,9 +190,9 @@
bool pin_keyboard_always_enabled_ = true;
// Strings as on view construction to enable restoring the original state.
- base::string16 default_title_;
- base::string16 default_description_;
- base::string16 default_accessible_title_;
+ std::u16string default_title_;
+ std::u16string default_description_;
+ std::u16string default_accessible_title_;
views::Label* title_label_ = nullptr;
views::Label* description_label_ = nullptr;
diff --git a/ash/login/ui/pin_request_view_unittest.cc b/ash/login/ui/pin_request_view_unittest.cc
index 65b8db8..e7ffe45 100644
--- a/ash/login/ui/pin_request_view_unittest.cc
+++ b/ash/login/ui/pin_request_view_unittest.cc
@@ -73,8 +73,8 @@
++pin_submitted_;
last_code_submitted_ = code;
if (!will_authenticate_) {
- view_->UpdateState(PinRequestViewState::kError, base::string16(),
- base::string16());
+ view_->UpdateState(PinRequestViewState::kError, std::u16string(),
+ std::u16string());
return PinRequestView::SubmissionResult::kPinError;
}
return PinRequestView::SubmissionResult::kPinAccepted;
diff --git a/ash/login/ui/pin_request_widget.cc b/ash/login/ui/pin_request_widget.cc
index d6d5566..52fa9e93 100644
--- a/ash/login/ui/pin_request_widget.cc
+++ b/ash/login/ui/pin_request_widget.cc
@@ -58,8 +58,8 @@
}
void PinRequestWidget::UpdateState(PinRequestViewState state,
- const base::string16& title,
- const base::string16& description) {
+ const std::u16string& title,
+ const std::u16string& description) {
DCHECK_EQ(instance_, this);
GetView()->UpdateState(state, title, description);
}
diff --git a/ash/login/ui/pin_request_widget.h b/ash/login/ui/pin_request_widget.h
index ba7ceac..3995cdd 100644
--- a/ash/login/ui/pin_request_widget.h
+++ b/ash/login/ui/pin_request_widget.h
@@ -60,8 +60,8 @@
// Toggles showing an error state and updates displayed strings.
void UpdateState(PinRequestViewState state,
- const base::string16& title,
- const base::string16& description);
+ const std::u16string& title,
+ const std::u16string& description);
// Enables or disables PIN input.
void SetPinInputEnabled(bool enabled);
diff --git a/ash/login/ui/public_account_warning_dialog.cc b/ash/login/ui/public_account_warning_dialog.cc
index a65b6c5..ca3a35e 100644
--- a/ash/login/ui/public_account_warning_dialog.cc
+++ b/ash/login/ui/public_account_warning_dialog.cc
@@ -69,7 +69,7 @@
SetLayoutManager(std::move(layout));
SetBorder(views::CreateEmptyBorder(gfx::Insets(kDialogContentMarginDp)));
- auto add_bulleted_label = [&](const base::string16& text) {
+ auto add_bulleted_label = [&](const std::u16string& text) {
auto* container = new views::View();
auto layout = std::make_unique<views::FlexLayout>();
// Align the bullet to the top line of multi-line labels.
diff --git a/ash/login/ui/system_label_button.cc b/ash/login/ui/system_label_button.cc
index 7c8449cd..b5a85075 100644
--- a/ash/login/ui/system_label_button.cc
+++ b/ash/login/ui/system_label_button.cc
@@ -44,7 +44,7 @@
} // namespace
SystemLabelButton::SystemLabelButton(PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
DisplayType display_type,
bool multiline)
: LabelButton(std::move(callback), text), display_type_(display_type) {
diff --git a/ash/login/ui/system_label_button.h b/ash/login/ui/system_label_button.h
index d3b447c..7d80168 100644
--- a/ash/login/ui/system_label_button.h
+++ b/ash/login/ui/system_label_button.h
@@ -18,7 +18,7 @@
enum class DisplayType { DEFAULT, ALERT_NO_ICON, ALERT_WITH_ICON };
SystemLabelButton(PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
DisplayType display_type,
bool multiline = false);
SystemLabelButton(const SystemLabelButton&) = delete;
diff --git a/ash/login/ui/views_utils.cc b/ash/login/ui/views_utils.cc
index ba0208c..043f1ee 100644
--- a/ash/login/ui/views_utils.cc
+++ b/ash/login/ui/views_utils.cc
@@ -98,7 +98,7 @@
return search == view;
}
-views::Label* CreateBubbleLabel(const base::string16& message,
+views::Label* CreateBubbleLabel(const std::u16string& message,
views::View* view_defining_max_width,
SkColor color,
const gfx::FontList& font_list,
diff --git a/ash/login/ui/views_utils.h b/ash/login/ui/views_utils.h
index 1393a19..2016a29 100644
--- a/ash/login/ui/views_utils.h
+++ b/ash/login/ui/views_utils.h
@@ -50,7 +50,7 @@
// lines and we set its maximum width to the preferred width of
// |view_defining_max_width|.
views::Label* CreateBubbleLabel(
- const base::string16& message,
+ const std::u16string& message,
views::View* view_defining_max_width = nullptr,
SkColor color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary),
diff --git a/ash/media/media_notification_controller_impl.cc b/ash/media/media_notification_controller_impl.cc
index 64ff5d7..010ed0c 100644
--- a/ash/media/media_notification_controller_impl.cc
+++ b/ash/media/media_notification_controller_impl.cc
@@ -175,7 +175,7 @@
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NotificationType::NOTIFICATION_TYPE_CUSTOM, id,
- base::string16(), base::string16(), base::string16(), GURL(),
+ std::u16string(), std::u16string(), std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kMediaSessionNotifierId),
diff --git a/ash/media/media_notification_controller_impl_unittest.cc b/ash/media/media_notification_controller_impl_unittest.cc
index e3629f2..dfdbc09c 100644
--- a/ash/media/media_notification_controller_impl_unittest.cc
+++ b/ash/media/media_notification_controller_impl_unittest.cc
@@ -455,7 +455,7 @@
// Show a non-media notification that should still be displayed.
message_center->AddNotification(
- CreateSystemNotification("test", base::string16(), base::string16(),
+ CreateSystemNotification("test", std::u16string(), std::u16string(),
"test", base::BindRepeating([]() {})));
EXPECT_EQ(2u, message_center->GetVisibleNotifications().size());
diff --git a/ash/multi_device_setup/multi_device_notification_presenter.cc b/ash/multi_device_setup/multi_device_notification_presenter.cc
index b3a2f93..72c6d53 100644
--- a/ash/multi_device_setup/multi_device_notification_presenter.cc
+++ b/ash/multi_device_setup/multi_device_notification_presenter.cc
@@ -94,9 +94,9 @@
}
void MultiDeviceNotificationPresenter::OnPotentialHostExistsForNewUser() {
- base::string16 title = l10n_util::GetStringUTF16(
+ std::u16string title = l10n_util::GetStringUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_NEW_USER_POTENTIAL_HOST_EXISTS_TITLE);
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_NEW_USER_POTENTIAL_HOST_EXISTS_MESSAGE,
ui::GetChromeOSDeviceName());
ShowSetupNotification(Status::kNewUserNotificationVisible, title, message);
@@ -110,10 +110,10 @@
void MultiDeviceNotificationPresenter::OnConnectedHostSwitchedForExistingUser(
const std::string& new_host_device_name) {
- base::string16 title = l10n_util::GetStringFUTF16(
+ std::u16string title = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_EXISTING_USER_HOST_SWITCHED_TITLE,
base::ASCIIToUTF16(new_host_device_name));
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_EXISTING_USER_HOST_SWITCHED_MESSAGE,
ui::GetChromeOSDeviceName());
ShowSetupNotification(Status::kExistingUserHostSwitchedNotificationVisible,
@@ -122,10 +122,10 @@
void MultiDeviceNotificationPresenter::OnNewChromebookAddedForExistingUser(
const std::string& new_host_device_name) {
- base::string16 title = l10n_util::GetStringFUTF16(
+ std::u16string title = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_EXISTING_USER_NEW_CHROME_DEVICE_ADDED_TITLE,
base::ASCIIToUTF16(new_host_device_name));
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_SETUP_EXISTING_USER_NEW_CHROME_DEVICE_ADDED_MESSAGE,
ui::GetChromeOSDeviceName());
ShowSetupNotification(Status::kExistingUserNewChromebookNotificationVisible,
@@ -133,9 +133,9 @@
}
void MultiDeviceNotificationPresenter::OnBecameEligibleForWifiSync() {
- base::string16 title =
+ std::u16string title =
l10n_util::GetStringUTF16(IDS_ASH_MULTI_DEVICE_WIFI_SYNC_AVAILABLE_TITLE);
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_WIFI_SYNC_AVAILABLE_MESSAGE,
ui::GetChromeOSDeviceName());
message_center::RichNotificationData optional_fields;
@@ -189,7 +189,7 @@
void MultiDeviceNotificationPresenter::OnNotificationClicked(
const std::string& notification_id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
if (notification_id == kWifiSyncNotificationId) {
message_center_->RemoveNotification(kWifiSyncNotificationId,
/* by_user */ false);
@@ -278,8 +278,8 @@
void MultiDeviceNotificationPresenter::ShowSetupNotification(
const Status notification_status,
- const base::string16& title,
- const base::string16& message) {
+ const std::u16string& title,
+ const std::u16string& message) {
PA_LOG(VERBOSE) << "Showing "
<< GetNotificationDescriptionForLogging(notification_status)
<< ".";
@@ -294,13 +294,13 @@
void MultiDeviceNotificationPresenter::ShowNotification(
const std::string& id,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
message_center::RichNotificationData optional_fields) {
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE, id, title,
- message, base::string16() /* display_source */,
+ message, std::u16string() /* display_source */,
GURL() /* origin_url */,
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
diff --git a/ash/multi_device_setup/multi_device_notification_presenter.h b/ash/multi_device_setup/multi_device_notification_presenter.h
index 8dafba3..9d2250b 100644
--- a/ash/multi_device_setup/multi_device_notification_presenter.h
+++ b/ash/multi_device_setup/multi_device_notification_presenter.h
@@ -75,7 +75,7 @@
void OnNotificationClicked(
const std::string& notification_id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
private:
friend class MultiDeviceNotificationPresenterTest;
@@ -114,11 +114,11 @@
void ObserveMultiDeviceSetupIfPossible();
void ShowSetupNotification(const Status notification_status,
- const base::string16& title,
- const base::string16& message);
+ const std::u16string& title,
+ const std::u16string& message);
void ShowNotification(const std::string& id,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
message_center::RichNotificationData optional_fields);
void FlushForTesting();
diff --git a/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc b/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
index be6cb983b..f01ff6f 100644
--- a/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
+++ b/ash/multi_device_setup/multi_device_notification_presenter_unittest.cc
@@ -217,9 +217,9 @@
const message_center::Notification* kVisibleNotification =
test_message_center_.FindVisibleNotificationById(
MultiDeviceNotificationPresenter::kWifiSyncNotificationId);
- base::string16 title = l10n_util::GetStringUTF16(
+ std::u16string title = l10n_util::GetStringUTF16(
IDS_ASH_MULTI_DEVICE_WIFI_SYNC_AVAILABLE_TITLE);
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_MULTI_DEVICE_WIFI_SYNC_AVAILABLE_MESSAGE,
base::ASCIIToUTF16(kTestDeviceType));
EXPECT_EQ(title, kVisibleNotification->title());
@@ -297,8 +297,8 @@
const message_center::Notification* kVisibleNotification =
test_message_center_.FindVisibleNotificationById(
MultiDeviceNotificationPresenter::kSetupNotificationId);
- base::string16 title;
- base::string16 message;
+ std::u16string title;
+ std::u16string message;
switch (notification_status) {
case MultiDeviceNotificationPresenter::Status::
kNewUserNotificationVisible:
diff --git a/ash/projector/projector_controller_impl.cc b/ash/projector/projector_controller_impl.cc
index 84bb9b54..1085ae5 100644
--- a/ash/projector/projector_controller_impl.cc
+++ b/ash/projector/projector_controller_impl.cc
@@ -32,7 +32,7 @@
}
void ProjectorControllerImpl::OnTranscription(
- const base::string16& text,
+ const std::u16string& text,
base::TimeDelta audio_start_time,
base::TimeDelta audio_end_time,
const std::vector<base::TimeDelta>& word_offsets,
diff --git a/ash/projector/projector_controller_impl.h b/ash/projector/projector_controller_impl.h
index 76bef7a..39aebb69 100644
--- a/ash/projector/projector_controller_impl.h
+++ b/ash/projector/projector_controller_impl.h
@@ -33,7 +33,7 @@
// ProjectorController:
void SetClient(ash::ProjectorClient* client) override;
void OnSpeechRecognitionAvailable(bool available) override;
- void OnTranscription(const base::string16& text,
+ void OnTranscription(const std::u16string& text,
base::TimeDelta audio_start_time,
base::TimeDelta audio_end_time,
const std::vector<base::TimeDelta>& word_offsets,
diff --git a/ash/public/cpp/accessibility_controller.h b/ash/public/cpp/accessibility_controller.h
index f1aea26..2b49c334 100644
--- a/ash/public/cpp/accessibility_controller.h
+++ b/ash/public/cpp/accessibility_controller.h
@@ -112,7 +112,7 @@
gfx::Rect& bounds_in_screen) = 0;
// Retrieves a string description of the current battery status.
- virtual base::string16 GetBatteryDescription() const = 0;
+ virtual std::u16string GetBatteryDescription() const = 0;
// Shows or hides the virtual keyboard.
virtual void SetVirtualKeyboardVisible(bool is_visible) = 0;
diff --git a/ash/public/cpp/app_list/app_list_client.h b/ash/public/cpp/app_list/app_list_client.h
index b8118ad..101b0f1 100644
--- a/ash/public/cpp/app_list/app_list_client.h
+++ b/ash/public/cpp/app_list/app_list_client.h
@@ -42,7 +42,7 @@
// Interfaces on searching:
// Triggers a search query.
// |trimmed_query|: the trimmed input texts from the search text field.
- virtual void StartSearch(const base::string16& trimmed_query) = 0;
+ virtual void StartSearch(const std::u16string& trimmed_query) = 0;
// Opens a search result and logs to metrics when its view is clicked or
// pressed.
// |result_id|: the id of the search result the user wants to open.
@@ -123,7 +123,7 @@
// actions, and can be folded into the AppListNotifier once it is
// complete.
virtual void NotifySearchResultsForLogging(
- const base::string16& trimmed_query,
+ const std::u16string& trimmed_query,
const SearchResultIdWithPositionIndices& results,
int position_index) = 0;
diff --git a/ash/public/cpp/app_list/app_list_controller.h b/ash/public/cpp/app_list/app_list_controller.h
index dfae499..ba443e3 100644
--- a/ash/public/cpp/app_list/app_list_controller.h
+++ b/ash/public/cpp/app_list/app_list_controller.h
@@ -69,7 +69,7 @@
virtual void SetSearchEngineIsGoogle(bool is_google) = 0;
// Sets the text for the search box's Textfield and the voice search flag.
- virtual void UpdateSearchBox(const base::string16& text,
+ virtual void UpdateSearchBox(const std::u16string& text,
bool initiated_by_user) = 0;
// Publishes search results to Ash to render them.
diff --git a/ash/public/cpp/app_list/app_list_notifier.h b/ash/public/cpp/app_list/app_list_notifier.h
index ad2abd6..30617d3 100644
--- a/ash/public/cpp/app_list/app_list_notifier.h
+++ b/ash/public/cpp/app_list/app_list_notifier.h
@@ -44,28 +44,28 @@
// impression timer.
virtual void OnImpression(Location location,
const std::vector<Result>& results,
- const base::string16& query) {}
+ const std::u16string& query) {}
// Called when an impression occurred for |results|, and the user then moved
// to a different UI view. For example, by closing the launcher or
// changing the search query.
virtual void OnAbandon(Location location,
const std::vector<Result>& results,
- const base::string16& query) {}
+ const std::u16string& query) {}
// Called when the |location| UI view displayed |results|, but the user
// launched a result in a different UI view. This can only happen when
// |location| is kList or kTile.
virtual void OnIgnore(Location location,
const std::vector<Result>& results,
- const base::string16& query) {}
+ const std::u16string& query) {}
// Called when the |launched| result is launched, and provides all |shown|
// results at |location| (including |launched|).
virtual void OnLaunch(Location location,
const Result& launched,
const std::vector<Result>& shown,
- const base::string16& query) {}
+ const std::u16string& query) {}
};
virtual ~AppListNotifier() = default;
@@ -83,7 +83,7 @@
const std::vector<Result>& results) = 0;
// Called to indicate the user has updated the search query to |query|.
- virtual void NotifySearchQueryChanged(const base::string16& query) = 0;
+ virtual void NotifySearchQueryChanged(const std::u16string& query) = 0;
// Called to indicate the UI state is now |view|.
virtual void NotifyUIStateChanged(AppListViewState view) = 0;
diff --git a/ash/public/cpp/app_list/app_list_types.cc b/ash/public/cpp/app_list/app_list_types.cc
index a694e725f..60b1df9 100644
--- a/ash/public/cpp/app_list/app_list_types.cc
+++ b/ash/public/cpp/app_list/app_list_types.cc
@@ -40,7 +40,7 @@
SearchResultAction::SearchResultAction() {}
SearchResultAction::SearchResultAction(const gfx::ImageSkia& image,
- const base::string16& tooltip_text,
+ const std::u16string& tooltip_text,
bool visible_on_hover)
: image(image),
tooltip_text(tooltip_text),
diff --git a/ash/public/cpp/app_list/app_list_types.h b/ash/public/cpp/app_list/app_list_types.h
index d266939e..9b583d4a 100644
--- a/ash/public/cpp/app_list/app_list_types.h
+++ b/ash/public/cpp/app_list/app_list_types.h
@@ -235,13 +235,13 @@
struct ASH_PUBLIC_EXPORT SearchResultAction {
SearchResultAction();
SearchResultAction(const gfx::ImageSkia& image,
- const base::string16& tooltip_text,
+ const std::u16string& tooltip_text,
bool visible_on_hover);
SearchResultAction(const SearchResultAction& other);
~SearchResultAction();
gfx::ImageSkia image;
- base::string16 tooltip_text;
+ std::u16string tooltip_text;
// Visible when button or its parent row in hover state.
bool visible_on_hover;
};
@@ -258,13 +258,13 @@
std::string id;
// The title of the result, e.g. an app's name, an autocomplete query, etc.
- base::string16 title;
+ std::u16string title;
// A detail string of this result.
- base::string16 details;
+ std::u16string details;
// An text to be announced by a screen reader app.
- base::string16 accessible_name;
+ std::u16string accessible_name;
// How the title matches the query. See the SearchResultTag section for more
// details.
@@ -283,7 +283,7 @@
float rating = -1.0;
// A formatted price string, e.g. "$7.09", "HK$3.94", etc.
- base::string16 formatted_price;
+ std::u16string formatted_price;
// The type of this result.
AppListSearchResultType result_type = AppListSearchResultType::kUnknown;
diff --git a/ash/public/cpp/desks_helper.h b/ash/public/cpp/desks_helper.h
index 2dd7ac2..e3698f9 100644
--- a/ash/public/cpp/desks_helper.h
+++ b/ash/public/cpp/desks_helper.h
@@ -31,7 +31,7 @@
// Returns the names of the desk at |index|. If |index| is out-of-bounds,
// return empty string.
- virtual base::string16 GetDeskName(int index) const = 0;
+ virtual std::u16string GetDeskName(int index) const = 0;
// Returns the number of desks.
virtual int GetNumberOfDesks() const = 0;
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_content_view.h b/ash/public/cpp/external_arc/message_center/arc_notification_content_view.h
index cfe045d..18b8f97 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_content_view.h
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_content_view.h
@@ -192,7 +192,7 @@
// Widget which this view tree is currently attached to.
views::Widget* attached_widget_ = nullptr;
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
// If it's true, the surface gets active when attached to this view.
bool activate_on_attach_ = false;
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.cc b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.cc
index 56d4755..c9036c6c 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.cc
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.cc
@@ -35,7 +35,7 @@
void ArcNotificationDelegate::Click(
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
DCHECK(item_);
item_->Click();
}
diff --git a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
index 63e132f..93fc264 100644
--- a/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
+++ b/ash/public/cpp/external_arc/message_center/arc_notification_delegate.h
@@ -33,7 +33,7 @@
// message_center::NotificationDelegate overrides:
void Close(bool by_user) override;
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
void SettingsClick() override;
private:
diff --git a/ash/public/cpp/holding_space/holding_space_item.cc b/ash/public/cpp/holding_space/holding_space_item.cc
index ef96da05..46e161a 100644
--- a/ash/public/cpp/holding_space/holding_space_item.cc
+++ b/ash/public/cpp/holding_space/holding_space_item.cc
@@ -159,7 +159,7 @@
const std::string& id,
const base::FilePath& file_path,
const GURL& file_system_url,
- const base::string16& text,
+ const std::u16string& text,
std::unique_ptr<HoldingSpaceImage> image)
: type_(type),
id_(id),
diff --git a/ash/public/cpp/holding_space/holding_space_item.h b/ash/public/cpp/holding_space/holding_space_item.h
index 60c9d981..8033a75b 100644
--- a/ash/public/cpp/holding_space/holding_space_item.h
+++ b/ash/public/cpp/holding_space/holding_space_item.h
@@ -102,7 +102,7 @@
Type type() const { return type_; }
- const base::string16& text() const { return text_; }
+ const std::u16string& text() const { return text_; }
const HoldingSpaceImage& image() const { return *image_; }
@@ -118,7 +118,7 @@
const std::string& id,
const base::FilePath& file_path,
const GURL& file_system_url,
- const base::string16& text,
+ const std::u16string& text,
std::unique_ptr<HoldingSpaceImage> image);
const Type type_;
@@ -133,7 +133,7 @@
GURL file_system_url_;
// If set, the text that should be shown for the item.
- base::string16 text_;
+ std::u16string text_;
// The image representation of the item.
std::unique_ptr<HoldingSpaceImage> image_;
diff --git a/ash/public/cpp/ime_controller.h b/ash/public/cpp/ime_controller.h
index c16e2de..ace55057 100644
--- a/ash/public/cpp/ime_controller.h
+++ b/ash/public/cpp/ime_controller.h
@@ -72,7 +72,7 @@
// The view fades out after a delay and close itself.
// The anchor bounds is in the universal screen coordinates in DIP.
virtual void ShowModeIndicator(const gfx::Rect& anchor_bounds,
- const base::string16& ime_short_name) = 0;
+ const std::u16string& ime_short_name) = 0;
protected:
ImeController();
diff --git a/ash/public/cpp/ime_info.h b/ash/public/cpp/ime_info.h
index 2f43914..cd5a3dc7 100644
--- a/ash/public/cpp/ime_info.h
+++ b/ash/public/cpp/ime_info.h
@@ -25,12 +25,12 @@
std::string id;
// Long name of the IME, which is used as the user-visible name.
- base::string16 name;
+ std::u16string name;
// UI indicator for the IME (e.g., "US"). If the IME has no indicator, uses
// the first two characters in its preferred keyboard layout or language code
// (e.g., "ko", "ja", "en-US").
- base::string16 short_name;
+ std::u16string short_name;
};
// A menu item that sets an IME configuration property.
@@ -47,7 +47,7 @@
std::string key;
// The item label, e.g. "Switch to full punctuation mode" or "Hiragana".
- base::string16 label;
+ std::u16string label;
};
} // namespace ash
diff --git a/ash/public/cpp/kiosk_app_menu.h b/ash/public/cpp/kiosk_app_menu.h
index 39c9bb9..753d25c 100644
--- a/ash/public/cpp/kiosk_app_menu.h
+++ b/ash/public/cpp/kiosk_app_menu.h
@@ -33,7 +33,7 @@
// For ARC kiosk apps only, the account id for the app.
AccountId account_id;
- base::string16 name;
+ std::u16string name;
gfx::ImageSkia icon;
};
diff --git a/ash/public/cpp/locale_update_controller.cc b/ash/public/cpp/locale_update_controller.cc
index 0cc5679..d5269ef 100644
--- a/ash/public/cpp/locale_update_controller.cc
+++ b/ash/public/cpp/locale_update_controller.cc
@@ -16,7 +16,7 @@
LocaleInfo::LocaleInfo() = default;
LocaleInfo::LocaleInfo(const std::string& iso_code,
- const base::string16& display_name)
+ const std::u16string& display_name)
: iso_code(iso_code), display_name(display_name) {}
LocaleInfo::LocaleInfo(const LocaleInfo& rhs) = default;
LocaleInfo::LocaleInfo(LocaleInfo&& rhs) = default;
diff --git a/ash/public/cpp/locale_update_controller.h b/ash/public/cpp/locale_update_controller.h
index 7cee9006..cb7ce06 100644
--- a/ash/public/cpp/locale_update_controller.h
+++ b/ash/public/cpp/locale_update_controller.h
@@ -16,7 +16,7 @@
// The locale info to show in the system tray locale detailed view.
struct ASH_PUBLIC_EXPORT LocaleInfo {
LocaleInfo();
- LocaleInfo(const std::string& iso_code, const base::string16& display_name);
+ LocaleInfo(const std::string& iso_code, const std::u16string& display_name);
LocaleInfo(const LocaleInfo& rhs);
LocaleInfo(LocaleInfo&& rhs);
~LocaleInfo();
@@ -25,7 +25,7 @@
std::string iso_code;
// The display name of the locale.
- base::string16 display_name;
+ std::u16string display_name;
};
// Sent as the response to LocaleUpdateController.OnLocaleChanged().
diff --git a/ash/public/cpp/login_screen.h b/ash/public/cpp/login_screen.h
index a3ed9fd..98aaea7 100644
--- a/ash/public/cpp/login_screen.h
+++ b/ash/public/cpp/login_screen.h
@@ -93,7 +93,7 @@
// is already set, this method will replace it (and the previous handler's
// exit_callback will be run).
virtual bool SetLoginShelfGestureHandler(
- const base::string16& message,
+ const std::u16string& message,
const base::RepeatingClosure& fling_callback,
base::OnceClosure exit_callback) = 0;
diff --git a/ash/public/cpp/login_screen_model.h b/ash/public/cpp/login_screen_model.h
index 0d0524431..b8b79ed67 100644
--- a/ash/public/cpp/login_screen_model.h
+++ b/ash/public/cpp/login_screen_model.h
@@ -52,7 +52,7 @@
// used to notify users of important messages before they log in to their
// session. (e.g. Tell the user that an update of the user data will start
// on login.) If |message| is empty, the banner will be hidden.
- virtual void UpdateWarningMessage(const base::string16& message) = 0;
+ virtual void UpdateWarningMessage(const std::u16string& message) = 0;
// Update the status of fingerprint for |account_id|.
virtual void SetFingerprintState(const AccountId& account_id,
diff --git a/ash/public/cpp/login_screen_test_api.h b/ash/public/cpp/login_screen_test_api.h
index e6247c7..f2b5bf57 100644
--- a/ash/public/cpp/login_screen_test_api.h
+++ b/ash/public/cpp/login_screen_test_api.h
@@ -47,7 +47,7 @@
static void SubmitPassword(const AccountId& account_id,
const std::string& password,
bool check_if_submittable);
- static base::string16 GetChallengeResponseLabel(const AccountId& account_id);
+ static std::u16string GetChallengeResponseLabel(const AccountId& account_id);
static bool IsChallengeResponseButtonClickable(const AccountId& account_id);
static void ClickChallengeResponseButton(const AccountId& account_id);
static int64_t GetUiUpdateCount();
@@ -64,8 +64,8 @@
static bool RemoveUser(const AccountId& account_id);
static std::string GetDisplayedName(const AccountId& account_id);
- static base::string16 GetDisabledAuthMessage(const AccountId& account_id);
- static base::string16 GetManagementDisclosureText(
+ static std::u16string GetDisabledAuthMessage(const AccountId& account_id);
+ static std::u16string GetManagementDisclosureText(
const AccountId& account_id);
static bool ExpandPublicSessionPod(const AccountId& account_id);
@@ -84,13 +84,13 @@
static std::string GetExpandedPublicSessionSelectedKeyboard();
static bool IsOobeDialogVisible();
- static base::string16 GetShutDownButtonLabel();
+ static std::u16string GetShutDownButtonLabel();
static gfx::Rect GetShutDownButtonTargetBounds();
static gfx::Rect GetShutDownButtonMirroredBounds();
static void SetPinRequestWidgetShownCallback(
base::RepeatingClosure on_pin_request_widget_shown);
- static base::string16 GetPinRequestWidgetTitle();
+ static std::u16string GetPinRequestWidgetTitle();
static void SubmitPinRequestWidget(const std::string& pin);
static void CancelPinRequestWidget();
diff --git a/ash/public/cpp/login_types.h b/ash/public/cpp/login_types.h
index 65d5174..9954455 100644
--- a/ash/public/cpp/login_types.h
+++ b/ash/public/cpp/login_types.h
@@ -137,7 +137,7 @@
// |autoshow_tooltip| is true. The user can always see the tooltip if they
// hover over the icon. The tooltip should be used for the accessibility label
// if it is present.
- base::string16 tooltip;
+ std::u16string tooltip;
// If true, the tooltip should be displayed (even if the user is not currently
// hovering over the icon, ie, this makes |tooltip| act like a little like a
// notification).
@@ -145,7 +145,7 @@
// Accessibility label. Only used if |tooltip| is empty.
// TODO(jdufault): Always populate and use |aria_label|, even if |tooltip| is
// non-empty.
- base::string16 aria_label;
+ std::u16string aria_label;
// If true, clicking the easy unlock icon should fire a hardlock event which
// will disable easy unlock. The hardlock event will request a new icon
// display via a separate EasyUnlockIconsOption update. See
diff --git a/ash/public/cpp/notification_utils.cc b/ash/public/cpp/notification_utils.cc
index b47d193..4db53d7 100644
--- a/ash/public/cpp/notification_utils.cc
+++ b/ash/public/cpp/notification_utils.cc
@@ -11,15 +11,15 @@
std::unique_ptr<message_center::Notification> CreateSystemNotification(
const std::string& notification_id,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
const std::string& system_component_id,
const base::RepeatingClosure& click_callback) {
DCHECK(!click_callback.is_null());
std::unique_ptr<message_center::Notification> notification =
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
- message, base::string16() /* display_source */, GURL(),
+ message, std::u16string() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
system_component_id),
@@ -34,9 +34,9 @@
std::unique_ptr<message_center::Notification> CreateSystemNotification(
message_center::NotificationType type,
const std::string& id,
- const base::string16& title,
- const base::string16& message,
- const base::string16& display_source,
+ const std::u16string& title,
+ const std::u16string& message,
+ const std::u16string& display_source,
const GURL& origin_url,
const message_center::NotifierId& notifier_id,
const message_center::RichNotificationData& optional_fields,
diff --git a/ash/public/cpp/notification_utils.h b/ash/public/cpp/notification_utils.h
index 1ec63c9..c4502df 100644
--- a/ash/public/cpp/notification_utils.h
+++ b/ash/public/cpp/notification_utils.h
@@ -46,8 +46,8 @@
// display source of critical system notification is illustrated by icon.
ASH_PUBLIC_EXPORT std::unique_ptr<message_center::Notification>
CreateSystemNotification(const std::string& notification_id,
- const base::string16& title,
- const base::string16& message,
+ const std::u16string& title,
+ const std::u16string& message,
const std::string& system_component_id,
const base::RepeatingClosure& click_callback);
@@ -60,9 +60,9 @@
CreateSystemNotification(
message_center::NotificationType type,
const std::string& id,
- const base::string16& title,
- const base::string16& message,
- const base::string16& display_source,
+ const std::u16string& title,
+ const std::u16string& message,
+ const std::u16string& display_source,
const GURL& origin_url,
const message_center::NotifierId& notifier_id,
const message_center::RichNotificationData& optional_fields,
diff --git a/ash/public/cpp/notifier_metadata.cc b/ash/public/cpp/notifier_metadata.cc
index 4290293..6cc8b19 100644
--- a/ash/public/cpp/notifier_metadata.cc
+++ b/ash/public/cpp/notifier_metadata.cc
@@ -12,7 +12,7 @@
NotifierMetadata::NotifierMetadata(
const message_center::NotifierId& notifier_id,
- const base::string16& name,
+ const std::u16string& name,
bool enabled,
bool enforced,
const gfx::ImageSkia& icon)
diff --git a/ash/public/cpp/notifier_metadata.h b/ash/public/cpp/notifier_metadata.h
index 25ba264..9bdd33a 100644
--- a/ash/public/cpp/notifier_metadata.h
+++ b/ash/public/cpp/notifier_metadata.h
@@ -20,7 +20,7 @@
NotifierMetadata(const NotifierMetadata& other);
NotifierMetadata(NotifierMetadata&& other);
NotifierMetadata(const message_center::NotifierId& notifier_id,
- const base::string16& name,
+ const std::u16string& name,
bool enabled,
bool enforced,
const gfx::ImageSkia& icon);
@@ -34,7 +34,7 @@
message_center::NotifierId notifier_id;
// The user-visible name of the notifier (e.g. an extension's name).
- base::string16 name;
+ std::u16string name;
// True if notifications from the notifier are presently enabled.
bool enabled = false;
diff --git a/ash/public/cpp/projector/projector_controller.h b/ash/public/cpp/projector/projector_controller.h
index 0e88c8d..66bbc12d 100644
--- a/ash/public/cpp/projector/projector_controller.h
+++ b/ash/public/cpp/projector/projector_controller.h
@@ -32,7 +32,7 @@
virtual void OnSpeechRecognitionAvailable(bool available) = 0;
// Called when transcription result from mic input is ready.
- virtual void OnTranscription(const base::string16& text,
+ virtual void OnTranscription(const std::u16string& text,
base::TimeDelta start_time,
base::TimeDelta end_time,
const std::vector<base::TimeDelta>& word_offsets,
diff --git a/ash/public/cpp/shelf_item.h b/ash/public/cpp/shelf_item.h
index 84dbe84..62fb240 100644
--- a/ash/public/cpp/shelf_item.h
+++ b/ash/public/cpp/shelf_item.h
@@ -32,7 +32,7 @@
ShelfID id;
// The title to display for tooltips, etc.
- base::string16 title;
+ std::u16string title;
SkColor notification_badge_color = SK_ColorWHITE;
diff --git a/ash/public/cpp/shelf_item_delegate.h b/ash/public/cpp/shelf_item_delegate.h
index f484a1f..02b4f1b 100644
--- a/ash/public/cpp/shelf_item_delegate.h
+++ b/ash/public/cpp/shelf_item_delegate.h
@@ -66,7 +66,7 @@
// called when this item is selected from the menu.
int command_id;
// The title and icon shown for this item in the app menu.
- base::string16 title;
+ std::u16string title;
gfx::ImageSkia icon;
};
using AppMenuItems = std::vector<AppMenuItem>;
diff --git a/ash/public/cpp/system_tray.h b/ash/public/cpp/system_tray.h
index 49f782c..efdad7bb 100644
--- a/ash/public/cpp/system_tray.h
+++ b/ash/public/cpp/system_tray.h
@@ -95,8 +95,8 @@
// |notification_body| the new notification body which overwrites the default.
virtual void SetUpdateNotificationState(
NotificationStyle style,
- const base::string16& notification_title,
- const base::string16& notification_body) = 0;
+ const std::u16string& notification_title,
+ const std::u16string& notification_body) = 0;
// If |visible| is true, shows an icon in the system tray which indicates that
// a software update is available but user's agreement is required as current
diff --git a/ash/public/cpp/system_tray_client.h b/ash/public/cpp/system_tray_client.h
index 0f4d9683..427fec01 100644
--- a/ash/public/cpp/system_tray_client.h
+++ b/ash/public/cpp/system_tray_client.h
@@ -29,7 +29,7 @@
// necessarily the device name.
virtual void ShowBluetoothPairingDialog(
const std::string& address,
- const base::string16& name_for_display,
+ const std::u16string& name_for_display,
bool paired,
bool connected) = 0;
diff --git a/ash/public/cpp/system_tray_test_api.h b/ash/public/cpp/system_tray_test_api.h
index 50db4834..96c74d4 100644
--- a/ash/public/cpp/system_tray_test_api.h
+++ b/ash/public/cpp/system_tray_test_api.h
@@ -57,11 +57,11 @@
// Returns the tooltip for a bubble view, or the empty string if the view
// does not exist.
- base::string16 GetBubbleViewTooltip(int view_id);
+ std::u16string GetBubbleViewTooltip(int view_id);
// Returns the text for a bubble view, or the empty string if the view
// does not exist. This method only works if the bubble view is a label.
- base::string16 GetBubbleViewText(int view_id);
+ std::u16string GetBubbleViewText(int view_id);
// Get the notification pop up view based on the notification id.
message_center::MessagePopupView* GetPopupViewForNotificationID(
diff --git a/ash/public/cpp/test/test_system_tray_client.cc b/ash/public/cpp/test/test_system_tray_client.cc
index b5de6bf..a274b2f1 100644
--- a/ash/public/cpp/test/test_system_tray_client.cc
+++ b/ash/public/cpp/test/test_system_tray_client.cc
@@ -18,7 +18,7 @@
void TestSystemTrayClient::ShowBluetoothPairingDialog(
const std::string& address,
- const base::string16& name_for_display,
+ const std::u16string& name_for_display,
bool paired,
bool connected) {}
diff --git a/ash/public/cpp/test/test_system_tray_client.h b/ash/public/cpp/test/test_system_tray_client.h
index 35f6dd5..64d65c4 100644
--- a/ash/public/cpp/test/test_system_tray_client.h
+++ b/ash/public/cpp/test/test_system_tray_client.h
@@ -21,7 +21,7 @@
void ShowSettings(int64_t display_id) override;
void ShowBluetoothSettings() override;
void ShowBluetoothPairingDialog(const std::string& address,
- const base::string16& name_for_display,
+ const std::u16string& name_for_display,
bool paired,
bool connected) override;
void ShowDateSettings() override;
diff --git a/ash/public/cpp/toast_data.cc b/ash/public/cpp/toast_data.cc
index 7659901..dc897cd 100644
--- a/ash/public/cpp/toast_data.cc
+++ b/ash/public/cpp/toast_data.cc
@@ -9,9 +9,9 @@
namespace ash {
ToastData::ToastData(std::string id,
- const base::string16& text,
+ const std::u16string& text,
int32_t duration_ms,
- const base::Optional<base::string16>& dismiss_text,
+ const base::Optional<std::u16string>& dismiss_text,
bool visible_on_lock_screen)
: id(std::move(id)),
text(text),
diff --git a/ash/public/cpp/toast_data.h b/ash/public/cpp/toast_data.h
index ca0e148..3e19e352 100644
--- a/ash/public/cpp/toast_data.h
+++ b/ash/public/cpp/toast_data.h
@@ -19,17 +19,17 @@
static const int32_t kInfiniteDuration = -1;
ToastData(std::string id,
- const base::string16& text,
+ const std::u16string& text,
int32_t duration_ms,
- const base::Optional<base::string16>& dismiss_text,
+ const base::Optional<std::u16string>& dismiss_text,
bool visible_on_lock_screen = false);
ToastData(const ToastData& other);
~ToastData();
std::string id;
- base::string16 text;
+ std::u16string text;
int32_t duration_ms;
- base::Optional<base::string16> dismiss_text;
+ base::Optional<std::u16string> dismiss_text;
bool visible_on_lock_screen;
bool is_managed = false;
};
diff --git a/ash/quick_answers/quick_answers_controller_impl.cc b/ash/quick_answers/quick_answers_controller_impl.cc
index 9acd379..a50b622b6 100644
--- a/ash/quick_answers/quick_answers_controller_impl.cc
+++ b/ash/quick_answers/quick_answers_controller_impl.cc
@@ -27,7 +27,7 @@
constexpr char kDogfoodUrl[] =
"https://goto.google.com/quick-answers-dogfood-bugs";
-base::string16 IntentTypeToString(IntentType intent_type) {
+std::u16string IntentTypeToString(IntentType intent_type) {
switch (intent_type) {
case IntentType::kUnit:
return l10n_util::GetStringUTF16(
@@ -38,7 +38,7 @@
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_ANSWERS_TRANSLATION_INTENT);
case IntentType::kUnknown:
- return base::string16();
+ return std::u16string();
}
}
@@ -254,8 +254,8 @@
}
void QuickAnswersControllerImpl::ShowUserNotice(
- const base::string16& intent_type,
- const base::string16& intent_text) {
+ const std::u16string& intent_type,
+ const std::u16string& intent_text) {
// Show notice informing user about the feature if required.
if (!quick_answers_ui_controller_->is_showing_user_notice_view()) {
quick_answers_ui_controller_->CreateUserNoticeView(
diff --git a/ash/quick_answers/quick_answers_controller_impl.h b/ash/quick_answers/quick_answers_controller_impl.h
index f1cc076..c430c4a 100644
--- a/ash/quick_answers/quick_answers_controller_impl.h
+++ b/ash/quick_answers/quick_answers_controller_impl.h
@@ -105,8 +105,8 @@
bool ShouldShowUserNotice() const;
// Show the user notice view. Does nothing if the view is already
// visible.
- void ShowUserNotice(const base::string16& intent_type,
- const base::string16& intent_text);
+ void ShowUserNotice(const std::u16string& intent_type,
+ const std::u16string& intent_text);
chromeos::quick_answers::QuickAnswersRequest BuildRequest();
diff --git a/ash/quick_answers/quick_answers_ui_controller.cc b/ash/quick_answers/quick_answers_ui_controller.cc
index 84938d0..0b02f05 100644
--- a/ash/quick_answers/quick_answers_ui_controller.cc
+++ b/ash/quick_answers/quick_answers_ui_controller.cc
@@ -105,8 +105,8 @@
void QuickAnswersUiController::CreateUserNoticeView(
const gfx::Rect& anchor_bounds,
- const base::string16& intent_type,
- const base::string16& intent_text) {
+ const std::u16string& intent_type,
+ const std::u16string& intent_text) {
DCHECK(!quick_answers_view_);
DCHECK(!user_notice_view_);
user_notice_view_ = new quick_answers::UserNoticeView(
diff --git a/ash/quick_answers/quick_answers_ui_controller.h b/ash/quick_answers/quick_answers_ui_controller.h
index 723c961..c30e940 100644
--- a/ash/quick_answers/quick_answers_ui_controller.h
+++ b/ash/quick_answers/quick_answers_ui_controller.h
@@ -62,8 +62,8 @@
// Creates a view for notifying the user about the Quick Answers feature
// vertically aligned to the anchor.
void CreateUserNoticeView(const gfx::Rect& anchor_bounds,
- const base::string16& intent_type,
- const base::string16& intent_text);
+ const std::u16string& intent_type,
+ const std::u16string& intent_text);
void CloseUserNoticeView();
diff --git a/ash/quick_answers/quick_answers_ui_controller_unittest.cc b/ash/quick_answers/quick_answers_ui_controller_unittest.cc
index 55d15c9..35fe8f3 100644
--- a/ash/quick_answers/quick_answers_ui_controller_unittest.cc
+++ b/ash/quick_answers/quick_answers_ui_controller_unittest.cc
@@ -57,7 +57,7 @@
TEST_F(QuickAnswersUiControllerTest, TearDownWhileNoticeViewShowing) {
EXPECT_FALSE(ui_controller()->is_showing_user_notice_view());
ui_controller()->CreateUserNoticeView(kDefaultAnchorBoundsInScreen,
- base::string16(), base::string16());
+ std::u16string(), std::u16string());
EXPECT_TRUE(ui_controller()->is_showing_user_notice_view());
}
diff --git a/ash/quick_answers/ui/user_notice_view.cc b/ash/quick_answers/ui/user_notice_view.cc
index 71146e1..cad10be 100644
--- a/ash/quick_answers/ui/user_notice_view.cc
+++ b/ash/quick_answers/ui/user_notice_view.cc
@@ -88,7 +88,7 @@
}
// Create and return a simple label with provided specs.
-std::unique_ptr<views::Label> CreateLabel(const base::string16& text,
+std::unique_ptr<views::Label> CreateLabel(const std::u16string& text,
const SkColor color,
int font_size_delta) {
auto label = std::make_unique<views::Label>(text);
@@ -106,7 +106,7 @@
class CustomizedLabelButton : public views::MdTextButton {
public:
CustomizedLabelButton(PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
const SkColor color,
bool is_compact)
: MdTextButton(std::move(callback), text) {
@@ -136,8 +136,8 @@
// -------------------------------------------------------------
UserNoticeView::UserNoticeView(const gfx::Rect& anchor_view_bounds,
- const base::string16& intent_type,
- const base::string16& intent_text,
+ const std::u16string& intent_type,
+ const std::u16string& intent_text,
QuickAnswersUiController* ui_controller)
: anchor_view_bounds_(anchor_view_bounds),
event_handler_(std::make_unique<QuickAnswersPreTargetHandler>(this)),
diff --git a/ash/quick_answers/ui/user_notice_view.h b/ash/quick_answers/ui/user_notice_view.h
index 4b399e6..6965de5 100644
--- a/ash/quick_answers/ui/user_notice_view.h
+++ b/ash/quick_answers/ui/user_notice_view.h
@@ -30,8 +30,8 @@
class UserNoticeView : public views::View {
public:
UserNoticeView(const gfx::Rect& anchor_view_bounds,
- const base::string16& intent_type,
- const base::string16& intent_text,
+ const std::u16string& intent_type,
+ const std::u16string& intent_text,
QuickAnswersUiController* ui_controller);
// Disallow copy and assign.
@@ -64,7 +64,7 @@
// Cached bounds of the anchor this view is tied to.
gfx::Rect anchor_view_bounds_;
// Cached title text.
- base::string16 title_;
+ std::u16string title_;
std::unique_ptr<QuickAnswersPreTargetHandler> event_handler_;
QuickAnswersUiController* const ui_controller_;
diff --git a/ash/search_box/search_box_view_base.cc b/ash/search_box/search_box_view_base.cc
index 40a64c33..4e62c863 100644
--- a/ash/search_box/search_box_view_base.cc
+++ b/ash/search_box/search_box_view_base.cc
@@ -419,7 +419,7 @@
}
bool SearchBoxViewBase::IsSearchBoxTrimmedQueryEmpty() const {
- base::string16 trimmed_query;
+ std::u16string trimmed_query;
base::TrimWhitespace(search_box_->GetText(), base::TrimPositions::TRIM_ALL,
&trimmed_query);
return trimmed_query.empty();
@@ -427,10 +427,10 @@
void SearchBoxViewBase::ClearSearch() {
// Avoid setting |search_box_| text to empty if it is already empty.
- if (search_box_->GetText() == base::string16())
+ if (search_box_->GetText() == std::u16string())
return;
- search_box_->SetText(base::string16());
+ search_box_->SetText(std::u16string());
UpdateButtonsVisisbility();
// Updates model and fires query changed manually because SetText() above
// does not generate ContentsChanged() notification.
@@ -476,7 +476,7 @@
}
void SearchBoxViewBase::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
// Set search box focused when query changes.
search_box_->RequestFocus();
UpdateModel(true);
diff --git a/ash/search_box/search_box_view_base.h b/ash/search_box/search_box_view_base.h
index 85cabe0..cff0ffa 100644
--- a/ash/search_box/search_box_view_base.h
+++ b/ash/search_box/search_box_view_base.h
@@ -130,7 +130,7 @@
// Overridden from views::TextfieldController:
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
bool HandleMouseEvent(views::Textfield* sender,
const ui::MouseEvent& mouse_event) override;
bool HandleGestureEvent(views::Textfield* sender,
diff --git a/ash/session/session_controller_impl_unittest.cc b/ash/session/session_controller_impl_unittest.cc
index b3a5fa5..f656a2c 100644
--- a/ash/session/session_controller_impl_unittest.cc
+++ b/ash/session/session_controller_impl_unittest.cc
@@ -588,7 +588,7 @@
Shell::Get()->system_tray_notifier()->NotifyScreenCaptureStart(
base::BindRepeating(&CanSwitchUserTest::StopCaptureCallback,
base::Unretained(this)),
- base::RepeatingClosure(), base::string16());
+ base::RepeatingClosure(), std::u16string());
}
// The callback which gets called when the screen capture gets stopped.
@@ -605,7 +605,7 @@
Shell::Get()->system_tray_notifier()->NotifyScreenShareStart(
base::BindRepeating(&CanSwitchUserTest::StopShareCallback,
base::Unretained(this)),
- base::string16());
+ std::u16string());
}
// Simulates a screen share session stop.
diff --git a/ash/shelf/back_button.cc b/ash/shelf/back_button.cc
index 6a6c0cc..e20212d 100644
--- a/ash/shelf/back_button.cc
+++ b/ash/shelf/back_button.cc
@@ -53,7 +53,7 @@
return kViewClassName;
}
-base::string16 BackButton::GetTooltipText(const gfx::Point& p) const {
+std::u16string BackButton::GetTooltipText(const gfx::Point& p) const {
return GetAccessibleName();
}
diff --git a/ash/shelf/back_button.h b/ash/shelf/back_button.h
index e3d755ed6..c5b9efb 100644
--- a/ash/shelf/back_button.h
+++ b/ash/shelf/back_button.h
@@ -34,7 +34,7 @@
// views::Button:
void PaintButtonContents(gfx::Canvas* canvas) override;
const char* GetClassName() const override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
// views::View:
void OnThemeChanged() override;
diff --git a/ash/shelf/contextual_nudge.cc b/ash/shelf/contextual_nudge.cc
index dc55724..15025c33 100644
--- a/ash/shelf/contextual_nudge.cc
+++ b/ash/shelf/contextual_nudge.cc
@@ -35,7 +35,7 @@
aura::Window* parent_window,
Position position,
const gfx::Insets& margins,
- const base::string16& text,
+ const std::u16string& text,
SkColor text_color,
const base::RepeatingClosure& tap_callback)
: views::BubbleDialogDelegateView(anchor,
diff --git a/ash/shelf/contextual_nudge.h b/ash/shelf/contextual_nudge.h
index 64be6ed3..69155bb 100644
--- a/ash/shelf/contextual_nudge.h
+++ b/ash/shelf/contextual_nudge.h
@@ -37,7 +37,7 @@
aura::Window* parent_window,
Position position,
const gfx::Insets& margins,
- const base::string16& text,
+ const std::u16string& text,
SkColor text_color,
const base::RepeatingClosure& tap_callback);
~ContextualNudge() override;
diff --git a/ash/shelf/drag_handle.cc b/ash/shelf/drag_handle.cc
index 3c2d7d5..10eb2da 100644
--- a/ash/shelf/drag_handle.cc
+++ b/ash/shelf/drag_handle.cc
@@ -272,7 +272,7 @@
void DragHandle::GetAccessibleNodeData(ui::AXNodeData* node_data) {
Button::GetAccessibleNodeData(node_data);
- base::string16 accessible_name = base::string16();
+ std::u16string accessible_name = std::u16string();
switch (shelf_->shelf_layout_manager()->hotseat_state()) {
case HotseatState::kNone:
case HotseatState::kShownClamshell:
diff --git a/ash/shelf/home_button.cc b/ash/shelf/home_button.cc
index 4820e79fd..4a91ffa 100644
--- a/ash/shelf/home_button.cc
+++ b/ash/shelf/home_button.cc
@@ -58,9 +58,9 @@
Button::OnGestureEvent(event);
}
-base::string16 HomeButton::GetTooltipText(const gfx::Point& p) const {
+std::u16string HomeButton::GetTooltipText(const gfx::Point& p) const {
// Don't show a tooltip if we're already showing the app list.
- return IsShowingAppList() ? base::string16() : GetAccessibleName();
+ return IsShowingAppList() ? std::u16string() : GetAccessibleName();
}
const char* HomeButton::GetClassName() const {
diff --git a/ash/shelf/home_button.h b/ash/shelf/home_button.h
index 9d3323d..934f628 100644
--- a/ash/shelf/home_button.h
+++ b/ash/shelf/home_button.h
@@ -38,7 +38,7 @@
// views::Button:
void OnGestureEvent(ui::GestureEvent* event) override;
const char* GetClassName() const override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
// ShelfButtonDelegate:
void OnShelfButtonAboutToRequestFocusFromTabTraversal(ShelfButton* button,
diff --git a/ash/shelf/login_shelf_gesture_controller.cc b/ash/shelf/login_shelf_gesture_controller.cc
index 95d9907..0153c2b 100644
--- a/ash/shelf/login_shelf_gesture_controller.cc
+++ b/ash/shelf/login_shelf_gesture_controller.cc
@@ -84,7 +84,7 @@
LoginShelfGestureController::LoginShelfGestureController(
Shelf* shelf,
DragHandle* drag_handle,
- const base::string16& gesture_nudge,
+ const std::u16string& gesture_nudge,
const base::RepeatingClosure fling_handler,
base::OnceClosure exit_handler)
: shelf_(shelf),
diff --git a/ash/shelf/login_shelf_gesture_controller.h b/ash/shelf/login_shelf_gesture_controller.h
index cb8981a..f761519b 100644
--- a/ash/shelf/login_shelf_gesture_controller.h
+++ b/ash/shelf/login_shelf_gesture_controller.h
@@ -33,7 +33,7 @@
public:
LoginShelfGestureController(Shelf* shelf,
DragHandle* drag_handle,
- const base::string16& gesture_nudge,
+ const std::u16string& gesture_nudge,
const base::RepeatingClosure fling_handler,
base::OnceClosure exit_handler);
LoginShelfGestureController(const LoginShelfGestureController& other) =
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc
index 9eb3f77..5466d598 100644
--- a/ash/shelf/login_shelf_view.cc
+++ b/ash/shelf/login_shelf_view.cc
@@ -250,10 +250,10 @@
return ink_drop;
}
- base::string16 GetTooltipText(const gfx::Point& p) const override {
+ std::u16string GetTooltipText(const gfx::Point& p) const override {
if (label()->IsDisplayTextTruncated())
return label()->GetText();
- return base::string16();
+ return std::u16string();
}
void PaintDarkColors() {
diff --git a/ash/shelf/scrollable_shelf_view.cc b/ash/shelf/scrollable_shelf_view.cc
index b906896..fc32b9e 100644
--- a/ash/shelf/scrollable_shelf_view.cc
+++ b/ash/shelf/scrollable_shelf_view.cc
@@ -1151,10 +1151,10 @@
return shelf_view_->GetOpenWindowsForView(view);
}
-base::string16 ScrollableShelfView::GetTitleForView(
+std::u16string ScrollableShelfView::GetTitleForView(
const views::View* view) const {
if (!view || !view->parent())
- return base::string16();
+ return std::u16string();
if (view->parent() == shelf_view_)
return shelf_view_->GetTitleForView(view);
@@ -1165,7 +1165,7 @@
if (view == right_arrow_)
return l10n_util::GetStringUTF16(IDS_SHELF_NEXT);
- return base::string16();
+ return std::u16string();
}
views::View* ScrollableShelfView::GetViewForEvent(const ui::Event& event) {
diff --git a/ash/shelf/scrollable_shelf_view.h b/ash/shelf/scrollable_shelf_view.h
index d7807156..4b2063ca5 100644
--- a/ash/shelf/scrollable_shelf_view.h
+++ b/ash/shelf/scrollable_shelf_view.h
@@ -263,7 +263,7 @@
bool ShouldHideTooltip(const gfx::Point& cursor_location) const override;
const std::vector<aura::Window*> GetOpenWindowsForView(
views::View* view) override;
- base::string16 GetTitleForView(const views::View* view) const override;
+ std::u16string GetTitleForView(const views::View* view) const override;
views::View* GetViewForEvent(const ui::Event& event) override;
// ApplicationDragAndDropHost:
diff --git a/ash/shelf/shelf_app_button.cc b/ash/shelf/shelf_app_button.cc
index 11b4232..6a73665 100644
--- a/ash/shelf/shelf_app_button.cc
+++ b/ash/shelf/shelf_app_button.cc
@@ -456,7 +456,7 @@
void ShelfAppButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
ShelfButton::GetAccessibleNodeData(node_data);
- const base::string16 title = shelf_view_->GetTitleForView(this);
+ const std::u16string title = shelf_view_->GetTitleForView(this);
node_data->SetName(title.empty() ? GetAccessibleName() : title);
switch (app_status_) {
diff --git a/ash/shelf/shelf_application_menu_model.cc b/ash/shelf/shelf_application_menu_model.cc
index 41fc405..946b3566 100644
--- a/ash/shelf/shelf_application_menu_model.cc
+++ b/ash/shelf/shelf_application_menu_model.cc
@@ -16,7 +16,7 @@
namespace ash {
ShelfApplicationMenuModel::ShelfApplicationMenuModel(
- const base::string16& title,
+ const std::u16string& title,
Items items,
ShelfItemDelegate* delegate)
: ui::SimpleMenuModel(this), delegate_(delegate) {
diff --git a/ash/shelf/shelf_application_menu_model.h b/ash/shelf/shelf_application_menu_model.h
index 4e8ea48f..e435d7f 100644
--- a/ash/shelf/shelf_application_menu_model.h
+++ b/ash/shelf/shelf_application_menu_model.h
@@ -37,7 +37,7 @@
// Makes a menu with a |title|, |items|, and a separator for |delegate|.
// |delegate| may be null in unit tests that do not execute commands.
- ShelfApplicationMenuModel(const base::string16& title,
+ ShelfApplicationMenuModel(const std::u16string& title,
Items items,
ShelfItemDelegate* delegate);
~ShelfApplicationMenuModel() override;
diff --git a/ash/shelf/shelf_application_menu_model_unittest.cc b/ash/shelf/shelf_application_menu_model_unittest.cc
index 002b13f..ee9dce2 100644
--- a/ash/shelf/shelf_application_menu_model_unittest.cc
+++ b/ash/shelf/shelf_application_menu_model_unittest.cc
@@ -47,7 +47,7 @@
// Verifies the menu contents given an empty item list.
TEST(ShelfApplicationMenuModelTest, VerifyContentsWithNoMenuItems) {
- base::string16 title = base::ASCIIToUTF16("title");
+ std::u16string title = base::ASCIIToUTF16("title");
ShelfApplicationMenuModel menu(title, {}, nullptr);
// Expect the title and a separator.
ASSERT_EQ(2, menu.GetItemCount());
@@ -60,14 +60,14 @@
// Verifies the menu contents given a non-empty item list.
TEST(ShelfApplicationMenuModelTest, VerifyContentsWithMenuItems) {
ShelfApplicationMenuModel::Items items;
- base::string16 title1 = base::ASCIIToUTF16("title1");
- base::string16 title2 = base::ASCIIToUTF16("title2");
- base::string16 title3 = base::ASCIIToUTF16("title3");
+ std::u16string title1 = base::ASCIIToUTF16("title1");
+ std::u16string title2 = base::ASCIIToUTF16("title2");
+ std::u16string title3 = base::ASCIIToUTF16("title3");
items.push_back({items.size(), title1, gfx::ImageSkia()});
items.push_back({items.size(), title2, gfx::ImageSkia()});
items.push_back({items.size(), title3, gfx::ImageSkia()});
- base::string16 title = base::ASCIIToUTF16("title");
+ std::u16string title = base::ASCIIToUTF16("title");
ShelfApplicationMenuModel menu(title, std::move(items), nullptr);
ShelfApplicationMenuModelTestAPI menu_test_api(&menu);
@@ -114,7 +114,7 @@
base::HistogramTester histogram_tester;
ShelfApplicationMenuModel::Items items(1);
- base::string16 title = base::ASCIIToUTF16("title");
+ std::u16string title = base::ASCIIToUTF16("title");
ShelfApplicationMenuModel menu(title, std::move(items), nullptr);
menu.ExecuteCommand(0, 0);
diff --git a/ash/shelf/shelf_context_menu_model_unittest.cc b/ash/shelf/shelf_context_menu_model_unittest.cc
index 10538db..d27188b 100644
--- a/ash/shelf/shelf_context_menu_model_unittest.cc
+++ b/ash/shelf/shelf_context_menu_model_unittest.cc
@@ -270,7 +270,7 @@
// Tests that NOTIFICATION_CONTAINER is enabled. This ensures that the
// container is able to handle gesture events.
ShelfContextMenuModel menu(nullptr, GetPrimaryDisplay().id());
- menu.AddItem(NOTIFICATION_CONTAINER, base::string16());
+ menu.AddItem(NOTIFICATION_CONTAINER, std::u16string());
EXPECT_TRUE(menu.IsCommandIdEnabled(NOTIFICATION_CONTAINER));
}
diff --git a/ash/shelf/shelf_tooltip_bubble.cc b/ash/shelf/shelf_tooltip_bubble.cc
index d9a9cef6..b0f46bb 100644
--- a/ash/shelf/shelf_tooltip_bubble.cc
+++ b/ash/shelf/shelf_tooltip_bubble.cc
@@ -39,7 +39,7 @@
ShelfTooltipBubble::ShelfTooltipBubble(views::View* anchor,
ShelfAlignment alignment,
SkColor background_color,
- const base::string16& text)
+ const std::u16string& text)
: ShelfBubble(anchor, alignment, background_color) {
set_margins(gfx::Insets(kTooltipTopBottomMargin, kTooltipLeftRightMargin));
set_close_on_deactivate(false);
diff --git a/ash/shelf/shelf_tooltip_bubble.h b/ash/shelf/shelf_tooltip_bubble.h
index 49f5396..f03d7ba 100644
--- a/ash/shelf/shelf_tooltip_bubble.h
+++ b/ash/shelf/shelf_tooltip_bubble.h
@@ -21,7 +21,7 @@
ShelfTooltipBubble(views::View* anchor,
ShelfAlignment alignment,
SkColor background_color,
- const base::string16& text);
+ const std::u16string& text);
protected:
// ShelfBubble:
diff --git a/ash/shelf/shelf_tooltip_delegate.h b/ash/shelf/shelf_tooltip_delegate.h
index ef9f48e..b7659cae 100644
--- a/ash/shelf/shelf_tooltip_delegate.h
+++ b/ash/shelf/shelf_tooltip_delegate.h
@@ -47,7 +47,7 @@
views::View* view) = 0;
// Returns the title of |view|.
- virtual base::string16 GetTitleForView(const views::View* view) const = 0;
+ virtual std::u16string GetTitleForView(const views::View* view) const = 0;
// Returns the view that should handle |event|.
virtual views::View* GetViewForEvent(const ui::Event& event) = 0;
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 4b7deb8..2d1c5fa 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -539,11 +539,11 @@
return open_windows;
}
-base::string16 ShelfView::GetTitleForView(const views::View* view) const {
+std::u16string ShelfView::GetTitleForView(const views::View* view) const {
if (view->parent() == this)
return GetTitleForChildView(view);
- return base::string16();
+ return std::u16string();
}
views::View* ShelfView::GetViewForEvent(const ui::Event& event) {
@@ -1846,7 +1846,7 @@
}
void ShelfView::AnnounceShelfAlignment() {
- base::string16 announcement;
+ std::u16string announcement;
switch (shelf_->alignment()) {
case ShelfAlignment::kBottom:
case ShelfAlignment::kBottomLocked:
@@ -1865,7 +1865,7 @@
}
void ShelfView::AnnounceShelfAutohideBehavior() {
- base::string16 announcement;
+ std::u16string announcement;
switch (shelf_->auto_hide_behavior()) {
case ShelfAutoHideBehavior::kAlways:
announcement = l10n_util::GetStringUTF16(IDS_SHELF_STATE_AUTO_HIDE);
@@ -1883,11 +1883,11 @@
}
void ShelfView::AnnouncePinUnpinEvent(const ShelfItem& item, bool pinned) {
- base::string16 item_title =
+ std::u16string item_title =
item.title.empty()
? l10n_util::GetStringUTF16(IDS_SHELF_ITEM_GENERIC_NAME)
: item.title;
- base::string16 announcement = l10n_util::GetStringFUTF16(
+ std::u16string announcement = l10n_util::GetStringFUTF16(
pinned ? IDS_SHELF_ITEM_WAS_PINNED : IDS_SHELF_ITEM_WAS_UNPINNED,
item_title);
announcement_view_->GetViewAccessibility().OverrideName(announcement);
@@ -1897,15 +1897,15 @@
void ShelfView::AnnounceSwapEvent(const ShelfItem& first_item,
const ShelfItem& second_item) {
- base::string16 first_item_title =
+ std::u16string first_item_title =
first_item.title.empty()
? l10n_util::GetStringUTF16(IDS_SHELF_ITEM_GENERIC_NAME)
: first_item.title;
- base::string16 second_item_title =
+ std::u16string second_item_title =
second_item.title.empty()
? l10n_util::GetStringUTF16(IDS_SHELF_ITEM_GENERIC_NAME)
: second_item.title;
- base::string16 announcement = l10n_util::GetStringFUTF16(
+ std::u16string announcement = l10n_util::GetStringFUTF16(
IDS_SHELF_ITEMS_WERE_SWAPPED, first_item_title, second_item_title);
announcement_view_->GetViewAccessibility().OverrideName(announcement);
announcement_view_->NotifyAccessibilityEvent(ax::mojom::Event::kAlert,
@@ -2440,9 +2440,9 @@
return true;
}
-base::string16 ShelfView::GetTitleForChildView(const views::View* view) const {
+std::u16string ShelfView::GetTitleForChildView(const views::View* view) const {
const ShelfItem* item = ShelfItemForView(view);
- return item ? item->title : base::string16();
+ return item ? item->title : std::u16string();
}
void ShelfView::UpdateShelfItemViewsVisibility() {
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h
index 2b55e3e..eadc94e 100644
--- a/ash/shelf/shelf_view.h
+++ b/ash/shelf/shelf_view.h
@@ -126,7 +126,7 @@
bool ShouldHideTooltip(const gfx::Point& cursor_location) const override;
const std::vector<aura::Window*> GetOpenWindowsForView(
views::View* view) override;
- base::string16 GetTitleForView(const views::View* view) const override;
+ std::u16string GetTitleForView(const views::View* view) const override;
views::View* GetViewForEvent(const ui::Event& event) override;
// Returns rectangle bounding all visible launcher items. Used screen
@@ -530,7 +530,7 @@
void DestroyScopedDisplay();
// Different from GetTitleForView, |view| here must be a child view.
- base::string16 GetTitleForChildView(const views::View* view) const;
+ std::u16string GetTitleForChildView(const views::View* view) const;
int CalculateAppIconsLayoutOffset() const;
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index f00a33e..cf45dbb 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -503,7 +503,7 @@
}
bool ShelfWidget::SetLoginShelfSwipeHandler(
- const base::string16& nudge_text,
+ const std::u16string& nudge_text,
const base::RepeatingClosure& fling_callback,
base::OnceClosure exit_callback) {
if (!login_shelf_view_->GetVisible())
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h
index b733781..86bd50c 100644
--- a/ash/shelf/shelf_widget.h
+++ b/ash/shelf/shelf_widget.h
@@ -150,7 +150,7 @@
// Creates a login shelf gesture controller (which enabled login shelf gesture
// detection). See ash/public/cpp/login_screen.h for more info.
- bool SetLoginShelfSwipeHandler(const base::string16& nudge_text,
+ bool SetLoginShelfSwipeHandler(const std::u16string& nudge_text,
const base::RepeatingClosure& fling_callback,
base::OnceClosure exit_callback);
diff --git a/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.cc b/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.cc
index d2df115b..57c95106 100644
--- a/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.cc
+++ b/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.cc
@@ -53,7 +53,7 @@
// description or they require a special one we explicitly specify. For example,
// ui::VKEY_COMMAND could return a string "Meta", but we want to display it as
// "Search" or "Launcher".
-base::Optional<base::string16> GetSpecialStringForKeyboardCode(
+base::Optional<std::u16string> GetSpecialStringForKeyboardCode(
ui::KeyboardCode key_code) {
int msg_id = 0;
switch (key_code) {
@@ -103,7 +103,7 @@
} // namespace
-base::string16 GetStringForCategory(ShortcutCategory category) {
+std::u16string GetStringForCategory(ShortcutCategory category) {
int msg_id = 0;
switch (category) {
case ShortcutCategory::kPopular:
@@ -126,13 +126,13 @@
break;
default:
NOTREACHED();
- return base::string16();
+ return std::u16string();
}
return l10n_util::GetStringUTF16(msg_id);
}
-base::string16 GetStringForKeyboardCode(ui::KeyboardCode key_code) {
- const base::Optional<base::string16> key_label =
+std::u16string GetStringForKeyboardCode(ui::KeyboardCode key_code) {
+ const base::Optional<std::u16string> key_label =
GetSpecialStringForKeyboardCode(key_code);
if (key_label)
return key_label.value();
@@ -150,10 +150,10 @@
}
return base::UTF8ToUTF16(ui::KeycodeConverter::DomKeyToKeyString(dom_key));
}
- return base::string16();
+ return std::u16string();
}
-base::string16 GetAccessibleNameForKeyboardCode(ui::KeyboardCode key_code) {
+std::u16string GetAccessibleNameForKeyboardCode(ui::KeyboardCode key_code) {
int msg_id = 0;
switch (key_code) {
case ui::VKEY_OEM_PERIOD:
@@ -174,7 +174,7 @@
default:
break;
}
- return msg_id ? l10n_util::GetStringUTF16(msg_id) : base::string16();
+ return msg_id ? l10n_util::GetStringUTF16(msg_id) : std::u16string();
}
const gfx::VectorIcon* GetVectorIconForKeyboardCode(ui::KeyboardCode key_code) {
diff --git a/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h b/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h
index 1a60e3f3..23a4db1 100644
--- a/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h
+++ b/ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h
@@ -27,21 +27,21 @@
KSV_EXPORT const std::vector<KeyboardShortcutItem>&
GetKeyboardShortcutItemList();
-base::string16 GetStringForCategory(ShortcutCategory category);
+std::u16string GetStringForCategory(ShortcutCategory category);
// Returns the string of a DomKey for a given VKEY. VKEY needs to be mapped to
// a physical key |dom_code| and then the |dom_code| needs to be mapped to a
// meaning or character of |dom_key| based on the corresponding keyboard layout.
// Returns empty string if the |dom_key| IsDeadKey or has no mapped meaning or
// character.
-base::string16 GetStringForKeyboardCode(ui::KeyboardCode key_code);
+std::u16string GetStringForKeyboardCode(ui::KeyboardCode key_code);
// Certain punctuation is not verbalized by ChromeVox, i.e. ".". So, whenever
// one of these is used in a keyboard shortcut, need to set the accessible name
// to explicitly specified text, such as "period".
// Returns empty string if there is no special accessible name for the
// |key_code|.
-base::string16 GetAccessibleNameForKeyboardCode(ui::KeyboardCode key_code);
+std::u16string GetAccessibleNameForKeyboardCode(ui::KeyboardCode key_code);
// Returns the VectorIcon if |key_code| need to be represented as an icon.
// Returns nullptr if |key_code| should not be represented as an icon.
diff --git a/ash/shortcut_viewer/views/bubble_view.cc b/ash/shortcut_viewer/views/bubble_view.cc
index 392687f9b..67a0907 100644
--- a/ash/shortcut_viewer/views/bubble_view.cc
+++ b/ash/shortcut_viewer/views/bubble_view.cc
@@ -67,7 +67,7 @@
icon_->SetImageSize(gfx::Size(kIconSize, kIconSize));
}
-void BubbleView::SetText(const base::string16& text) {
+void BubbleView::SetText(const std::u16string& text) {
if (!text_) {
text_ = AddChildView(std::make_unique<views::Label>());
text_->SetEnabledColor(gfx::kGoogleGrey700);
diff --git a/ash/shortcut_viewer/views/bubble_view.h b/ash/shortcut_viewer/views/bubble_view.h
index 1003458..4a689c5c 100644
--- a/ash/shortcut_viewer/views/bubble_view.h
+++ b/ash/shortcut_viewer/views/bubble_view.h
@@ -33,7 +33,7 @@
void SetIcon(const gfx::VectorIcon& icon);
- void SetText(const base::string16& text);
+ void SetText(const std::u16string& text);
private:
// views::View:
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.cc b/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.cc
index 7150983..94470b5 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.cc
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.cc
@@ -63,7 +63,7 @@
}
void KeyboardShortcutItemListView::AddCategoryLabel(
- const base::string16& text) {
+ const std::u16string& text) {
constexpr int kLabelTopPadding = 44;
constexpr int kLabelBottomPadding = 20;
constexpr SkColor kLabelColor = SkColorSetARGB(0xFF, 0x42, 0x85, 0xF4);
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.h b/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.h
index 1f9fd60..2729a5b8 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.h
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_item_list_view.h
@@ -20,7 +20,7 @@
// In search result page, a text label is added at the beginning of the group
// of KeyboardShortcutItemView to indicate the ShortcutCategory.
- void AddCategoryLabel(const base::string16& text);
+ void AddCategoryLabel(const std::u16string& text);
// Add a horizontal line to separate the KeyboardShortcutItemView. The last
// item in the list is not followed by the horizontal line.
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_item_view.cc b/ash/shortcut_viewer/views/keyboard_shortcut_item_view.cc
index 9786fc6..42a4194 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_item_view.cc
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_item_view.cc
@@ -42,7 +42,7 @@
}
// Creates the bubble view for modifiers and key.
-std::unique_ptr<views::View> CreateBubbleView(const base::string16& bubble_text,
+std::unique_ptr<views::View> CreateBubbleView(const std::u16string& bubble_text,
ui::KeyboardCode key_code) {
auto bubble_view = std::make_unique<BubbleView>();
const gfx::VectorIcon* vector_icon = GetVectorIconForKeyboardCode(key_code);
@@ -70,8 +70,8 @@
base::i18n::IsRTL() ? gfx::ALIGN_RIGHT : gfx::ALIGN_LEFT);
std::vector<size_t> offsets;
- std::vector<base::string16> replacement_strings;
- std::vector<base::string16> accessible_names;
+ std::vector<std::u16string> replacement_strings;
+ std::vector<std::u16string> accessible_names;
const size_t shortcut_key_codes_size = item.shortcut_key_codes.size();
offsets.reserve(shortcut_key_codes_size);
replacement_strings.reserve(shortcut_key_codes_size);
@@ -84,7 +84,7 @@
->emplace(key_code, GetStringForKeyboardCode(key_code))
.first;
}
- const base::string16& dom_key_string = iter->second;
+ const std::u16string& dom_key_string = iter->second;
// If the |key_code| has no mapped |dom_key_string|, we use alternative
// string to indicate that the shortcut is not supported by current keyboard
// layout.
@@ -96,7 +96,7 @@
}
replacement_strings.push_back(dom_key_string);
- base::string16 accessible_name = GetAccessibleNameForKeyboardCode(key_code);
+ std::u16string accessible_name = GetAccessibleNameForKeyboardCode(key_code);
accessible_names.push_back(accessible_name.empty() ? dom_key_string
: accessible_name);
}
@@ -132,8 +132,8 @@
}
}
- base::string16 shortcut_string;
- base::string16 accessible_string;
+ std::u16string shortcut_string;
+ std::u16string accessible_string;
if (replacement_strings.empty()) {
shortcut_string = l10n_util::GetStringUTF16(
has_invalid_dom_key ? IDS_KSV_KEY_NO_MAPPING : shortcut_message_id);
@@ -154,11 +154,11 @@
DCHECK_EQ(replacement_strings.size(), offsets.size());
// TODO(wutao): make this reliable.
// If the replacement string is "+ ", it indicates to insert a seperator view.
- const base::string16 separator_string = base::ASCIIToUTF16("+ ");
+ const std::u16string separator_string = base::ASCIIToUTF16("+ ");
for (size_t i = 0; i < offsets.size(); ++i) {
views::StyledLabel::RangeStyleInfo style_info;
style_info.disable_line_wrapping = true;
- const base::string16& replacement_string = replacement_strings[i];
+ const std::u16string& replacement_string = replacement_strings[i];
std::unique_ptr<views::View> custom_view =
replacement_string == separator_string
? CreateSeparatorView()
@@ -204,9 +204,9 @@
}
// static
-std::map<ui::KeyboardCode, base::string16>*
+std::map<ui::KeyboardCode, std::u16string>*
KeyboardShortcutItemView::GetKeycodeToString16Cache() {
- static base::NoDestructor<std::map<ui::KeyboardCode, base::string16>>
+ static base::NoDestructor<std::map<ui::KeyboardCode, std::u16string>>
key_code_to_string16_cache;
return key_code_to_string16_cache.get();
}
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_item_view.h b/ash/shortcut_viewer/views/keyboard_shortcut_item_view.h
index 1e0d0f9..d1a838d 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_item_view.h
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_item_view.h
@@ -43,13 +43,13 @@
static void ClearKeycodeToString16Cache();
private:
- // A cache to avoid repeatly looking up base::string16 from ui::KeyboardCode.
+ // A cache to avoid repeatly looking up std::u16string from ui::KeyboardCode.
// Currently the Keyboard Shortcut Viewer (KSV) will not refresh its contents
// when keyboard layout changes. The users must restart KSV again to get new
// keys for the new layout. Also since GetStringForKeyboardCode is only called
// for KSV to create the strings in the initialization process, clearing the
// cache is not necessary when keyboard layout changes.
- static std::map<ui::KeyboardCode, base::string16>*
+ static std::map<ui::KeyboardCode, std::u16string>*
GetKeycodeToString16Cache();
// Calculates how to layout child views for the given |width|.
@@ -73,7 +73,7 @@
mutable gfx::Size calculated_size_;
// Accessibility data.
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
DISALLOW_COPY_AND_ASSIGN(KeyboardShortcutItemView);
};
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_view.cc b/ash/shortcut_viewer/views/keyboard_shortcut_view.cc
index 98baf26..0972fe5f 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_view.cc
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_view.cc
@@ -239,7 +239,7 @@
return ax::mojom::Role::kWindow;
}
-base::string16 KeyboardShortcutView::GetAccessibleWindowTitle() const {
+std::u16string KeyboardShortcutView::GetAccessibleWindowTitle() const {
return l10n_util::GetStringUTF16(IDS_KSV_TITLE);
}
@@ -513,7 +513,7 @@
}
void KeyboardShortcutView::ShowSearchResults(
- const base::string16& search_query) {
+ const std::u16string& search_query) {
search_results_container_->RemoveAllChildViews(true);
auto* search_container_content_view = search_no_result_view_.get();
auto found_items_list_view = std::make_unique<KeyboardShortcutItemListView>();
@@ -524,9 +524,9 @@
found_shortcut_items_.clear();
for (const auto& item_view : shortcut_views_) {
- base::string16 description_text =
+ std::u16string description_text =
item_view->description_label_view()->GetText();
- base::string16 shortcut_text = item_view->shortcut_label_view()->GetText();
+ std::u16string shortcut_text = item_view->shortcut_label_view()->GetText();
size_t match_index = -1;
size_t match_length = 0;
// Only highlight |description_label_view_| in KeyboardShortcutItemView.
@@ -565,7 +565,7 @@
}
}
- std::vector<base::string16> replacement_strings;
+ std::vector<std::u16string> replacement_strings;
const int number_search_results = found_shortcut_items_.size();
if (!found_items_list_view->children().empty()) {
UpdateAXNodeDataPosition(found_shortcut_items_);
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_view.h b/ash/shortcut_viewer/views/keyboard_shortcut_view.h
index aa84197..ea02df67 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_view.h
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_view.h
@@ -46,7 +46,7 @@
// views::View:
const char* GetClassName() const override;
ax::mojom::Role GetAccessibleWindowRole() override;
- base::string16 GetAccessibleWindowTitle() const override;
+ std::u16string GetAccessibleWindowTitle() const override;
bool AcceleratorPressed(const ui::Accelerator& accelerator) override;
void Layout() override;
gfx::Size CalculatePreferredSize() const override;
@@ -77,7 +77,7 @@
void UpdateViewsLayout(bool is_search_box_active);
// Show search results in |search_results_container_|.
- void ShowSearchResults(const base::string16& search_query);
+ void ShowSearchResults(const std::u16string& search_query);
// views::WidgetDelegate:
views::ClientView* CreateClientView(views::Widget* widget) override;
diff --git a/ash/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc b/ash/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc
index 72d5369..1b1cd7e1 100644
--- a/ash/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc
+++ b/ash/shortcut_viewer/views/keyboard_shortcut_view_unittest.cc
@@ -73,7 +73,7 @@
if (::isalnum(static_cast<int>(key_code))) {
char16_t character = ::tolower(static_cast<int>(key_code));
GetSearchBoxView()->search_box()->InsertText(
- base::string16(1, character),
+ std::u16string(1, character),
ui::TextInputClient::InsertTextCursorBehavior::kMoveCursorAfterText);
}
}
diff --git a/ash/shortcut_viewer/views/ksv_search_box_view.cc b/ash/shortcut_viewer/views/ksv_search_box_view.cc
index e5f7432..1ac0dd96 100644
--- a/ash/shortcut_viewer/views/ksv_search_box_view.cc
+++ b/ash/shortcut_viewer/views/ksv_search_box_view.cc
@@ -38,7 +38,7 @@
ash::AppListColorProvider::Get()->GetSearchBoxTextColor(
gfx::kGoogleGrey900));
SetPlaceholderTextAttributes();
- const base::string16 search_box_name(
+ const std::u16string search_box_name(
l10n_util::GetStringUTF16(IDS_KSV_SEARCH_BOX_ACCESSIBILITY_NAME));
search_box()->SetPlaceholderText(search_box_name);
search_box()->SetAccessibleName(search_box_name);
@@ -72,7 +72,7 @@
SetSearchBoxActive(false, event->type());
}
-void KSVSearchBoxView::SetAccessibleValue(const base::string16& value) {
+void KSVSearchBoxView::SetAccessibleValue(const std::u16string& value) {
accessible_value_ = value;
NotifyAccessibilityEvent(ax::mojom::Event::kValueChanged, true);
}
@@ -118,7 +118,7 @@
close->SetPreferredSize(gfx::Size(kIconSize, kIconSize));
close->SetImageHorizontalAlignment(views::ImageButton::ALIGN_CENTER);
close->SetImageVerticalAlignment(views::ImageButton::ALIGN_MIDDLE);
- const base::string16 close_button_label(
+ const std::u16string close_button_label(
l10n_util::GetStringUTF16(IDS_KSV_CLEAR_SEARCHBOX_ACCESSIBILITY_NAME));
close->SetAccessibleName(close_button_label);
close->SetTooltipText(close_button_label);
@@ -134,7 +134,7 @@
back->SetPreferredSize(gfx::Size(kIconSize, kIconSize));
back->SetImageHorizontalAlignment(views::ImageButton::ALIGN_CENTER);
back->SetImageVerticalAlignment(views::ImageButton::ALIGN_MIDDLE);
- const base::string16 back_button_label(
+ const std::u16string back_button_label(
l10n_util::GetStringUTF16(IDS_KSV_BACK_ACCESSIBILITY_NAME));
back->SetAccessibleName(back_button_label);
back->SetTooltipText(back_button_label);
diff --git a/ash/shortcut_viewer/views/ksv_search_box_view.h b/ash/shortcut_viewer/views/ksv_search_box_view.h
index dd0eb866..a378e03 100644
--- a/ash/shortcut_viewer/views/ksv_search_box_view.h
+++ b/ash/shortcut_viewer/views/ksv_search_box_view.h
@@ -28,7 +28,7 @@
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
void OnKeyEvent(ui::KeyEvent* event) override;
- void SetAccessibleValue(const base::string16& value);
+ void SetAccessibleValue(const std::u16string& value);
// SearchBoxViewBase:
void OnSearchBoxActiveChanged(bool active) override;
@@ -42,7 +42,7 @@
void SetPlaceholderTextAttributes();
// Accessibility data value. Used to pronounce the number of search results.
- base::string16 accessible_value_;
+ std::u16string accessible_value_;
DISALLOW_COPY_AND_ASSIGN(KSVSearchBoxView);
};
diff --git a/ash/system/accessibility/dictation_button_tray.cc b/ash/system/accessibility/dictation_button_tray.cc
index 34e5bd6..5156b91 100644
--- a/ash/system/accessibility/dictation_button_tray.cc
+++ b/ash/system/accessibility/dictation_button_tray.cc
@@ -80,7 +80,7 @@
CheckDictationStatusAndUpdateIcon();
}
-base::string16 DictationButtonTray::GetAccessibleNameForTray() {
+std::u16string DictationButtonTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_DICTATION_BUTTON_ACCESSIBLE_NAME);
}
diff --git a/ash/system/accessibility/dictation_button_tray.h b/ash/system/accessibility/dictation_button_tray.h
index bb42b50..7fcad2fa 100644
--- a/ash/system/accessibility/dictation_button_tray.h
+++ b/ash/system/accessibility/dictation_button_tray.h
@@ -48,7 +48,7 @@
// TrayBackgroundView:
void Initialize() override;
void ClickedOutsideBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/accessibility/floating_accessibility_controller.cc b/ash/system/accessibility/floating_accessibility_controller.cc
index 5e45826..4ba63e6 100644
--- a/ash/system/accessibility/floating_accessibility_controller.cc
+++ b/ash/system/accessibility/floating_accessibility_controller.cc
@@ -194,7 +194,7 @@
menu_view_ = nullptr;
}
-base::string16 FloatingAccessibilityController::GetAccessibleNameForBubble() {
+std::u16string FloatingAccessibilityController::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(IDS_ASH_FLOATING_ACCESSIBILITY_MAIN_MENU);
}
diff --git a/ash/system/accessibility/floating_accessibility_controller.h b/ash/system/accessibility/floating_accessibility_controller.h
index 11b6f74..34fe4c5 100644
--- a/ash/system/accessibility/floating_accessibility_controller.h
+++ b/ash/system/accessibility/floating_accessibility_controller.h
@@ -54,7 +54,7 @@
views::Widget* GetBubbleWidget() override;
// TrayBubbleView::Delegate:
void BubbleViewDestroyed() override;
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
// LocaleChangeObserver:
void OnLocaleChanged() override;
diff --git a/ash/system/accessibility/floating_accessibility_detailed_controller.cc b/ash/system/accessibility/floating_accessibility_detailed_controller.cc
index 3cbbdcd1..0b779f9 100644
--- a/ash/system/accessibility/floating_accessibility_detailed_controller.cc
+++ b/ash/system/accessibility/floating_accessibility_detailed_controller.cc
@@ -125,7 +125,7 @@
CloseBubble();
}
-base::string16
+std::u16string
FloatingAccessibilityDetailedController::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(
IDS_ASH_FLOATING_ACCESSIBILITY_DETAILED_MENU);
diff --git a/ash/system/accessibility/floating_accessibility_detailed_controller.h b/ash/system/accessibility/floating_accessibility_detailed_controller.h
index 68f5b945..31b1dc58 100644
--- a/ash/system/accessibility/floating_accessibility_detailed_controller.h
+++ b/ash/system/accessibility/floating_accessibility_detailed_controller.h
@@ -39,7 +39,7 @@
// DetailedViewDelegate:
void CloseBubble() override;
void TransitionToMainView(bool restore_focus) override;
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
void OnAccessibilityStatusChanged();
diff --git a/ash/system/accessibility/select_to_speak_menu_bubble_controller.cc b/ash/system/accessibility/select_to_speak_menu_bubble_controller.cc
index c1d0a244..df5f506 100644
--- a/ash/system/accessibility/select_to_speak_menu_bubble_controller.cc
+++ b/ash/system/accessibility/select_to_speak_menu_bubble_controller.cc
@@ -92,7 +92,7 @@
}
}
-base::string16 SelectToSpeakMenuBubbleController::GetAccessibleNameForBubble() {
+std::u16string SelectToSpeakMenuBubbleController::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(IDS_ASH_SELECT_TO_SPEAK_MENU);
}
diff --git a/ash/system/accessibility/select_to_speak_menu_bubble_controller.h b/ash/system/accessibility/select_to_speak_menu_bubble_controller.h
index 8f88b89..1966cb25 100644
--- a/ash/system/accessibility/select_to_speak_menu_bubble_controller.h
+++ b/ash/system/accessibility/select_to_speak_menu_bubble_controller.h
@@ -37,7 +37,7 @@
friend class SelectToSpeakSpeedBubbleControllerTest;
// TrayBubbleView::Delegate:
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
void BubbleViewDestroyed() override;
// ::wm::ActivationChangeObserver:
diff --git a/ash/system/accessibility/select_to_speak_speed_view.cc b/ash/system/accessibility/select_to_speak_speed_view.cc
index ca135838..8815dbff 100644
--- a/ash/system/accessibility/select_to_speak_speed_view.cc
+++ b/ash/system/accessibility/select_to_speak_speed_view.cc
@@ -48,7 +48,7 @@
}
void SelectToSpeakSpeedView::AddMenuItem(int option_id,
- const base::string16& label,
+ const std::u16string& label,
bool is_selected) {
HoverHighlightView* item = new HoverHighlightView(this);
AddChildView(item);
diff --git a/ash/system/accessibility/select_to_speak_speed_view.h b/ash/system/accessibility/select_to_speak_speed_view.h
index 30db8e6..7f534de 100644
--- a/ash/system/accessibility/select_to_speak_speed_view.h
+++ b/ash/system/accessibility/select_to_speak_speed_view.h
@@ -43,7 +43,7 @@
private:
void AddMenuItem(int option_id,
- const base::string16& label,
+ const std::u16string& label,
bool is_selected);
// ViewClickListener:
diff --git a/ash/system/accessibility/select_to_speak_tray.cc b/ash/system/accessibility/select_to_speak_tray.cc
index 3f8cb66..fd57751 100644
--- a/ash/system/accessibility/select_to_speak_tray.cc
+++ b/ash/system/accessibility/select_to_speak_tray.cc
@@ -56,7 +56,7 @@
CheckStatusAndUpdateIcon();
}
-base::string16 SelectToSpeakTray::GetAccessibleNameForTray() {
+std::u16string SelectToSpeakTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(
IDS_ASH_SELECT_TO_SPEAK_TRAY_ACCESSIBLE_NAME);
}
diff --git a/ash/system/accessibility/select_to_speak_tray.h b/ash/system/accessibility/select_to_speak_tray.h
index c23273a4..69ed5c9 100644
--- a/ash/system/accessibility/select_to_speak_tray.h
+++ b/ash/system/accessibility/select_to_speak_tray.h
@@ -28,7 +28,7 @@
// TrayBackgroundView:
void Initialize() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
const char* GetClassName() const override;
bool PerformAction(const ui::Event& event) override;
diff --git a/ash/system/accessibility/switch_access_menu_button.cc b/ash/system/accessibility/switch_access_menu_button.cc
index 421c982..010e216b 100644
--- a/ash/system/accessibility/switch_access_menu_button.cc
+++ b/ash/system/accessibility/switch_access_menu_button.cc
@@ -46,7 +46,7 @@
SkColor label_color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary);
- base::string16 label_text = l10n_util::GetStringUTF16(label_text_id);
+ std::u16string label_text = l10n_util::GetStringUTF16(label_text_id);
views::Builder<SwitchAccessMenuButton>(this)
.SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY)
.AddChildren(
diff --git a/ash/system/accessibility/unified_accessibility_detailed_view_controller.cc b/ash/system/accessibility/unified_accessibility_detailed_view_controller.cc
index bcea0f3..f550d94 100644
--- a/ash/system/accessibility/unified_accessibility_detailed_view_controller.cc
+++ b/ash/system/accessibility/unified_accessibility_detailed_view_controller.cc
@@ -32,7 +32,7 @@
return view_;
}
-base::string16 UnifiedAccessibilityDetailedViewController::GetAccessibleName()
+std::u16string UnifiedAccessibilityDetailedViewController::GetAccessibleName()
const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_A11Y_SETTINGS_ACCESSIBLE_DESCRIPTION);
diff --git a/ash/system/accessibility/unified_accessibility_detailed_view_controller.h b/ash/system/accessibility/unified_accessibility_detailed_view_controller.h
index 1ca629e1..8e2b452 100644
--- a/ash/system/accessibility/unified_accessibility_detailed_view_controller.h
+++ b/ash/system/accessibility/unified_accessibility_detailed_view_controller.h
@@ -31,7 +31,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// AccessibilityObserver:
void OnAccessibilityStatusChanged() override;
diff --git a/ash/system/audio/audio_detailed_view.cc b/ash/system/audio/audio_detailed_view.cc
index 6b27b25..da590d84 100644
--- a/ash/system/audio/audio_detailed_view.cc
+++ b/ash/system/audio/audio_detailed_view.cc
@@ -22,7 +22,7 @@
namespace ash {
namespace {
-base::string16 GetAudioDeviceName(const AudioDevice& device) {
+std::u16string GetAudioDeviceName(const AudioDevice& device) {
switch (device.type) {
case AudioDeviceType::kFrontMic:
return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_AUDIO_FRONT_MIC);
diff --git a/ash/system/audio/mic_gain_slider_view.cc b/ash/system/audio/mic_gain_slider_view.cc
index e1bb284..ec929b5 100644
--- a/ash/system/audio/mic_gain_slider_view.cc
+++ b/ash/system/audio/mic_gain_slider_view.cc
@@ -73,7 +73,7 @@
button()->SetToggled(!is_muted);
button()->SetVectorIcon(is_muted ? kMutedMicrophoneIcon
: kImeMenuMicrophoneIcon);
- base::string16 state_tooltip_text =
+ std::u16string state_tooltip_text =
l10n_util::GetStringUTF16(is_muted ? IDS_ASH_STATUS_TRAY_MIC_STATE_MUTED
: IDS_ASH_STATUS_TRAY_MIC_STATE_ON);
button()->SetTooltipText(l10n_util::GetStringFUTF16(
diff --git a/ash/system/audio/unified_audio_detailed_view_controller.cc b/ash/system/audio/unified_audio_detailed_view_controller.cc
index a90288d..82e9319 100644
--- a/ash/system/audio/unified_audio_detailed_view_controller.cc
+++ b/ash/system/audio/unified_audio_detailed_view_controller.cc
@@ -29,7 +29,7 @@
return view_;
}
-base::string16 UnifiedAudioDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedAudioDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_AUDIO_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/audio/unified_audio_detailed_view_controller.h b/ash/system/audio/unified_audio_detailed_view_controller.h
index d51fdb79..ca5bd85 100644
--- a/ash/system/audio/unified_audio_detailed_view_controller.h
+++ b/ash/system/audio/unified_audio_detailed_view_controller.h
@@ -32,7 +32,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// CrasAudioHandler::AudioObserver.
void OnAudioNodesChanged() override;
diff --git a/ash/system/audio/unified_volume_view.cc b/ash/system/audio/unified_volume_view.cc
index de1bef2..dd808cf 100644
--- a/ash/system/audio/unified_volume_view.cc
+++ b/ash/system/audio/unified_volume_view.cc
@@ -262,7 +262,7 @@
button()->SetToggled(!is_muted);
button()->SetVectorIcon(is_muted ? kUnifiedMenuVolumeMuteIcon
: GetVolumeIconForLevel(level));
- base::string16 state_tooltip_text = l10n_util::GetStringUTF16(
+ std::u16string state_tooltip_text = l10n_util::GetStringUTF16(
is_muted ? IDS_ASH_STATUS_TRAY_VOLUME_STATE_MUTED
: IDS_ASH_STATUS_TRAY_VOLUME_STATE_ON);
button()->SetTooltipText(l10n_util::GetStringFUTF16(
diff --git a/ash/system/bluetooth/bluetooth_detailed_view.cc b/ash/system/bluetooth/bluetooth_detailed_view.cc
index 46da999..a0ffcd3 100644
--- a/ash/system/bluetooth/bluetooth_detailed_view.cc
+++ b/ash/system/bluetooth/bluetooth_detailed_view.cc
@@ -301,7 +301,7 @@
for (const auto& device : list) {
const gfx::VectorIcon& icon =
GetBluetoothDeviceIcon(device->device_type, device->connection_state);
- base::string16 device_name =
+ std::u16string device_name =
device::GetBluetoothDeviceNameForDisplay(device);
HoverHighlightView* container =
GetScrollListItemForDevice(old_device_list, device->address);
diff --git a/ash/system/bluetooth/bluetooth_feature_pod_controller.cc b/ash/system/bluetooth/bluetooth_feature_pod_controller.cc
index 5c47e09..1a0cbec 100644
--- a/ash/system/bluetooth/bluetooth_feature_pod_controller.cc
+++ b/ash/system/bluetooth/bluetooth_feature_pod_controller.cc
@@ -117,7 +117,7 @@
} else if (connected_devices.size() == 1) {
const device::mojom::BluetoothDeviceInfoPtr& device =
connected_devices.back();
- const base::string16 device_name =
+ const std::u16string device_name =
device::GetBluetoothDeviceNameForDisplay(device);
button_->SetVectorIcon(kUnifiedMenuBluetoothConnectedIcon);
button_->SetLabel(device_name);
@@ -143,7 +143,7 @@
}
void BluetoothFeaturePodController::SetTooltipState(
- const base::string16& tooltip_state) {
+ const std::u16string& tooltip_state) {
if (button_->GetEnabled()) {
button_->SetIconTooltip(l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_TOGGLE_TOOLTIP, tooltip_state));
diff --git a/ash/system/bluetooth/bluetooth_feature_pod_controller.h b/ash/system/bluetooth/bluetooth_feature_pod_controller.h
index 0de5223..e6bcc92 100644
--- a/ash/system/bluetooth/bluetooth_feature_pod_controller.h
+++ b/ash/system/bluetooth/bluetooth_feature_pod_controller.h
@@ -31,7 +31,7 @@
private:
void UpdateButton();
- void SetTooltipState(const base::string16& tooltip_state);
+ void SetTooltipState(const std::u16string& tooltip_state);
// BluetoothObserver:
void OnBluetoothSystemStateChanged() override;
diff --git a/ash/system/bluetooth/bluetooth_notification_controller.cc b/ash/system/bluetooth/bluetooth_notification_controller.cc
index b4b160f2..b35b24d 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller.cc
+++ b/ash/system/bluetooth/bluetooth_notification_controller.cc
@@ -58,7 +58,7 @@
// message_center::NotificationDelegate overrides.
void Close(bool by_user) override;
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
private:
// Buttons that appear in notifications.
@@ -99,7 +99,7 @@
void BluetoothPairingNotificationDelegate::Click(
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
if (!button_index)
return;
@@ -145,7 +145,7 @@
// message_center::NotificationDelegate:
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override {
+ const base::Optional<std::u16string>& reply) override {
if (TrayPopupUtils::CanOpenWebUISettings())
Shell::Get()->system_tray_model()->client()->ShowBluetoothSettings();
}
@@ -227,7 +227,7 @@
void BluetoothNotificationController::DisplayPinCode(
BluetoothDevice* device,
const std::string& pincode) {
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PINCODE,
device->GetNameForDisplay(), base::UTF8ToUTF16(pincode));
@@ -236,7 +236,7 @@
void BluetoothNotificationController::DisplayPasskey(BluetoothDevice* device,
uint32_t passkey) {
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_DISPLAY_PASSKEY,
device->GetNameForDisplay(),
base::UTF8ToUTF16(base::StringPrintf("%06i", passkey)));
@@ -251,7 +251,7 @@
void BluetoothNotificationController::ConfirmPasskey(BluetoothDevice* device,
uint32_t passkey) {
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_CONFIRM_PASSKEY,
device->GetNameForDisplay(),
base::UTF8ToUTF16(base::StringPrintf("%06i", passkey)));
@@ -261,7 +261,7 @@
void BluetoothNotificationController::AuthorizePairing(
BluetoothDevice* device) {
- base::string16 message = l10n_util::GetStringFUTF16(
+ std::u16string message = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_BLUETOOTH_AUTHORIZE_PAIRING,
device->GetNameForDisplay());
@@ -312,11 +312,11 @@
message_center::RichNotificationData optional;
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
- kBluetoothDeviceDiscoverableNotificationId, base::string16() /* title */,
+ kBluetoothDeviceDiscoverableNotificationId, std::u16string() /* title */,
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERABLE,
base::UTF8ToUTF16(adapter_->GetName()),
base::UTF8ToUTF16(adapter_->GetAddress())),
- base::string16() /* display source */, GURL(),
+ std::u16string() /* display source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierBluetooth),
optional, nullptr, kNotificationBluetoothIcon,
@@ -326,7 +326,7 @@
void BluetoothNotificationController::NotifyPairing(
BluetoothDevice* device,
- const base::string16& message,
+ const std::u16string& message,
bool with_buttons) {
message_center::RichNotificationData optional;
if (with_buttons) {
@@ -338,8 +338,8 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE,
- kBluetoothDevicePairingNotificationId, base::string16() /* title */,
- message, base::string16() /* display source */, GURL(),
+ kBluetoothDevicePairingNotificationId, std::u16string() /* title */,
+ message, std::u16string() /* display source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierBluetooth),
optional,
@@ -374,10 +374,10 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, GetPairedNotificationId(device),
- base::string16() /* title */,
+ std::u16string() /* title */,
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_PAIRED,
device->GetNameForDisplay()),
- base::string16() /* display source */, GURL(),
+ std::u16string() /* display source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierBluetooth),
message_center::RichNotificationData(),
diff --git a/ash/system/bluetooth/bluetooth_notification_controller.h b/ash/system/bluetooth/bluetooth_notification_controller.h
index 3369d090..0b78494 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller.h
+++ b/ash/system/bluetooth/bluetooth_notification_controller.h
@@ -87,7 +87,7 @@
// the notification will have Accept and Reject buttons, if false only the
// usual cancel/dismiss button will be present on the notification.
void NotifyPairing(device::BluetoothDevice* device,
- const base::string16& message,
+ const std::u16string& message,
bool with_buttons);
// Clears any shown pairing notification now that the device has been paired.
diff --git a/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc b/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
index 446b86a..a91bf23 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
+++ b/ash/system/bluetooth/bluetooth_notification_controller_unittest.cc
@@ -109,7 +109,7 @@
BluetoothNotificationController::
kBluetoothDeviceDiscoverableNotificationId);
EXPECT_TRUE(visible_notification);
- EXPECT_EQ(base::string16(), visible_notification->title());
+ EXPECT_EQ(std::u16string(), visible_notification->title());
EXPECT_EQ(
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_DISCOVERABLE,
base::UTF8ToUTF16(kTestAdapterName),
@@ -129,7 +129,7 @@
test_message_center_.FindVisibleNotificationById(
BluetoothNotificationController::GetPairedNotificationId(device));
EXPECT_TRUE(visible_notification);
- EXPECT_EQ(base::string16(), visible_notification->title());
+ EXPECT_EQ(std::u16string(), visible_notification->title());
EXPECT_EQ(l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_BLUETOOTH_PAIRED,
device->GetNameForDisplay()),
visible_notification->message());
diff --git a/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc b/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc
index 2a4e531..8707325 100644
--- a/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc
+++ b/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.cc
@@ -85,7 +85,7 @@
return view_;
}
-base::string16 UnifiedBluetoothDetailedViewController::GetAccessibleName()
+std::u16string UnifiedBluetoothDetailedViewController::GetAccessibleName()
const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_BLUETOOTH_SETTINGS_ACCESSIBLE_DESCRIPTION);
diff --git a/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h b/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h
index 551242e8..c92abdf 100644
--- a/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h
+++ b/ash/system/bluetooth/unified_bluetooth_detailed_view_controller.h
@@ -33,7 +33,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// BluetoothObserver:
void OnBluetoothSystemStateChanged() override;
diff --git a/ash/system/caps_lock_notification_controller.cc b/ash/system/caps_lock_notification_controller.cc
index 24787cd5..78df6fb 100644
--- a/ash/system/caps_lock_notification_controller.cc
+++ b/ash/system/caps_lock_notification_controller.cc
@@ -43,7 +43,7 @@
message_center::NOTIFICATION_TYPE_SIMPLE, kCapsLockNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_CAPS_LOCK_ENABLED),
l10n_util::GetStringUTF16(string_id),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierCapsLock),
message_center::RichNotificationData(), nullptr,
diff --git a/ash/system/cast/cast_notification_controller.cc b/ash/system/cast/cast_notification_controller.cc
index d35efc42..0c68fc7d 100644
--- a/ash/system/cast/cast_notification_controller.cc
+++ b/ash/system/cast/cast_notification_controller.cc
@@ -27,7 +27,7 @@
cast_config->HasActiveRoute();
}
-base::string16 GetNotificationTitle(const CastSink& sink,
+std::u16string GetNotificationTitle(const CastSink& sink,
const CastRoute& route) {
switch (route.content_source) {
case ContentSource::kUnknown:
@@ -40,10 +40,10 @@
}
}
-base::string16 GetNotificationMessage(const CastRoute& route) {
+std::u16string GetNotificationMessage(const CastRoute& route) {
switch (route.content_source) {
case ContentSource::kUnknown:
- return base::string16();
+ return std::u16string();
case ContentSource::kTab:
return base::UTF8ToUTF16(route.title);
case ContentSource::kDesktop:
@@ -95,7 +95,7 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
GetNotificationTitle(sink, route), GetNotificationMessage(route),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
data,
diff --git a/ash/system/cast/unified_cast_detailed_view_controller.cc b/ash/system/cast/unified_cast_detailed_view_controller.cc
index d48f7ef..92825ee 100644
--- a/ash/system/cast/unified_cast_detailed_view_controller.cc
+++ b/ash/system/cast/unified_cast_detailed_view_controller.cc
@@ -26,7 +26,7 @@
return view_;
}
-base::string16 UnifiedCastDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedCastDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_CAST_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/cast/unified_cast_detailed_view_controller.h b/ash/system/cast/unified_cast_detailed_view_controller.h
index 617c609..9f1dff3 100644
--- a/ash/system/cast/unified_cast_detailed_view_controller.h
+++ b/ash/system/cast/unified_cast_detailed_view_controller.h
@@ -26,7 +26,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
diff --git a/ash/system/dark_mode/dark_mode_detailed_view.cc b/ash/system/dark_mode/dark_mode_detailed_view.cc
index f00826a..31d05dc 100644
--- a/ash/system/dark_mode/dark_mode_detailed_view.cc
+++ b/ash/system/dark_mode/dark_mode_detailed_view.cc
@@ -24,7 +24,7 @@
class TrayRadioButton : public views::RadioButton {
public:
- TrayRadioButton(PressedCallback callback, const base::string16& button_label)
+ TrayRadioButton(PressedCallback callback, const std::u16string& button_label)
: views::RadioButton(button_label) {
SetCallback(std::move(callback));
SetBorder(views::CreateEmptyBorder(kTrayRadioButtonPadding));
diff --git a/ash/system/dark_mode/dark_mode_detailed_view_controller.cc b/ash/system/dark_mode/dark_mode_detailed_view_controller.cc
index 50b7e34..c23e056 100644
--- a/ash/system/dark_mode/dark_mode_detailed_view_controller.cc
+++ b/ash/system/dark_mode/dark_mode_detailed_view_controller.cc
@@ -29,7 +29,7 @@
return view_;
}
-base::string16 DarkModeDetailedViewController::GetAccessibleName() const {
+std::u16string DarkModeDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_DARK_THEME_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/dark_mode/dark_mode_detailed_view_controller.h b/ash/system/dark_mode/dark_mode_detailed_view_controller.h
index 4685f84..1a5730c2 100644
--- a/ash/system/dark_mode/dark_mode_detailed_view_controller.h
+++ b/ash/system/dark_mode/dark_mode_detailed_view_controller.h
@@ -27,7 +27,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// ColorModeObserver:
void OnColorModeChanged(bool dark_mode_enabled) override;
diff --git a/ash/system/dark_mode/dark_mode_feature_pod_controller.cc b/ash/system/dark_mode/dark_mode_feature_pod_controller.cc
index fe20ab9..becf602 100644
--- a/ash/system/dark_mode/dark_mode_feature_pod_controller.cc
+++ b/ash/system/dark_mode/dark_mode_feature_pod_controller.cc
@@ -64,7 +64,7 @@
dark_mode_enabled ? IDS_ASH_STATUS_TRAY_DARK_THEME_ON_STATE
: IDS_ASH_STATUS_TRAY_DARK_THEME_OFF_STATE));
- base::string16 tooltip_state = l10n_util::GetStringUTF16(
+ std::u16string tooltip_state = l10n_util::GetStringUTF16(
dark_mode_enabled
? IDS_ASH_STATUS_TRAY_DARK_THEME_ENABLED_STATE_TOOLTIP
: IDS_ASH_STATUS_TRAY_DARK_THEME_DISABLED_STATE_TOOLTIP);
diff --git a/ash/system/gesture_education/gesture_education_notification_controller.cc b/ash/system/gesture_education/gesture_education_notification_controller.cc
index 8a17577..78ecae0 100644
--- a/ash/system/gesture_education/gesture_education_notification_controller.cc
+++ b/ash/system/gesture_education/gesture_education_notification_controller.cc
@@ -87,7 +87,7 @@
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
GetNotificationTitle(), GetNotificationMessage(),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT, kNotificationId),
message_center::RichNotificationData(),
@@ -113,12 +113,12 @@
}
}
-base::string16 GestureEducationNotificationController::GetNotificationMessage()
+std::u16string GestureEducationNotificationController::GetNotificationMessage()
const {
return l10n_util::GetStringUTF16(IDS_GESTURE_NOTIFICATION_MESSAGE_LEARN_MORE);
}
-base::string16 GestureEducationNotificationController::GetNotificationTitle()
+std::u16string GestureEducationNotificationController::GetNotificationTitle()
const {
return l10n_util::GetStringUTF16(IDS_GESTURE_NOTIFICATION_TITLE);
}
diff --git a/ash/system/gesture_education/gesture_education_notification_controller.h b/ash/system/gesture_education/gesture_education_notification_controller.h
index 0c5a62f..dc6f3873 100644
--- a/ash/system/gesture_education/gesture_education_notification_controller.h
+++ b/ash/system/gesture_education/gesture_education_notification_controller.h
@@ -49,8 +49,8 @@
friend class GestureEducationNotificationControllerTest;
void GenerateGestureEducationNotification();
- base::string16 GetNotificationTitle() const;
- base::string16 GetNotificationMessage() const;
+ std::u16string GetNotificationTitle() const;
+ std::u16string GetNotificationMessage() const;
void HandleNotificationClick();
void ResetPrefForTest();
diff --git a/ash/system/holding_space/holding_space_item_screen_capture_view.cc b/ash/system/holding_space/holding_space_item_screen_capture_view.cc
index 4a170ae..111421a 100644
--- a/ash/system/holding_space/holding_space_item_screen_capture_view.cc
+++ b/ash/system/holding_space/holding_space_item_screen_capture_view.cc
@@ -81,7 +81,7 @@
return HitTestPoint(point) ? this : nullptr;
}
-base::string16 HoldingSpaceItemScreenCaptureView::GetTooltipText(
+std::u16string HoldingSpaceItemScreenCaptureView::GetTooltipText(
const gfx::Point& point) const {
return item()->text();
}
diff --git a/ash/system/holding_space/holding_space_item_screen_capture_view.h b/ash/system/holding_space/holding_space_item_screen_capture_view.h
index bea916e..3f52938 100644
--- a/ash/system/holding_space/holding_space_item_screen_capture_view.h
+++ b/ash/system/holding_space/holding_space_item_screen_capture_view.h
@@ -32,7 +32,7 @@
private:
// HoldingSpaceItemView:
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
- base::string16 GetTooltipText(const gfx::Point& point) const override;
+ std::u16string GetTooltipText(const gfx::Point& point) const override;
void OnHoldingSpaceItemUpdated(const HoldingSpaceItem* item) override;
void OnThemeChanged() override;
diff --git a/ash/system/holding_space/holding_space_tray.cc b/ash/system/holding_space/holding_space_tray.cc
index 558f165..1fbd1eb 100644
--- a/ash/system/holding_space/holding_space_tray.cc
+++ b/ash/system/holding_space/holding_space_tray.cc
@@ -202,7 +202,7 @@
CloseBubble();
}
-base::string16 HoldingSpaceTray::GetAccessibleNameForTray() {
+std::u16string HoldingSpaceTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_A11Y_NAME);
}
@@ -212,7 +212,7 @@
return HitTestPoint(point) ? this : nullptr;
}
-base::string16 HoldingSpaceTray::GetTooltipText(const gfx::Point& point) const {
+std::u16string HoldingSpaceTray::GetTooltipText(const gfx::Point& point) const {
return l10n_util::GetStringUTF16(IDS_ASH_HOLDING_SPACE_TITLE);
}
@@ -379,7 +379,7 @@
ModelContainsFinalizedItems(model));
}
-base::string16 HoldingSpaceTray::GetAccessibleNameForBubble() {
+std::u16string HoldingSpaceTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
diff --git a/ash/system/holding_space/holding_space_tray.h b/ash/system/holding_space/holding_space_tray.h
index d55afeb1..6c96592 100644
--- a/ash/system/holding_space/holding_space_tray.h
+++ b/ash/system/holding_space/holding_space_tray.h
@@ -58,9 +58,9 @@
// TrayBackgroundView:
void Initialize() override;
void ClickedOutsideBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
- base::string16 GetTooltipText(const gfx::Point& point) const override;
+ std::u16string GetTooltipText(const gfx::Point& point) const override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void AnchorUpdated() override;
@@ -91,7 +91,7 @@
void UpdateVisibility();
// TrayBubbleView::Delegate:
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/holding_space/holding_space_util.cc b/ash/system/holding_space/holding_space_util.cc
index cdc83d66..896e4130 100644
--- a/ash/system/holding_space/holding_space_util.cc
+++ b/ash/system/holding_space/holding_space_util.cc
@@ -145,7 +145,7 @@
}
std::unique_ptr<views::Label> CreateLabel(LabelStyle style,
- const base::string16& text) {
+ const std::u16string& text) {
auto label = std::make_unique<views::Label>(text);
ApplyStyle(label.get(), style);
return label;
diff --git a/ash/system/holding_space/holding_space_util.h b/ash/system/holding_space/holding_space_util.h
index 25ebb33..4f50b83 100644
--- a/ash/system/holding_space/holding_space_util.h
+++ b/ash/system/holding_space/holding_space_util.h
@@ -52,7 +52,7 @@
// Creates a label with optional `text` matching the specified `style`.
std::unique_ptr<views::Label> CreateLabel(
LabelStyle style,
- const base::string16& text = base::string16());
+ const std::u16string& text = std::u16string());
// Creates a circular background of the specified `color` and `fixed_size`.
std::unique_ptr<views::Background> CreateCircleBackground(SkColor color,
diff --git a/ash/system/ime/ime_feature_pod_controller.cc b/ash/system/ime/ime_feature_pod_controller.cc
index a0ab65e..2ff170c 100644
--- a/ash/system/ime/ime_feature_pod_controller.cc
+++ b/ash/system/ime/ime_feature_pod_controller.cc
@@ -26,7 +26,7 @@
(ime_count > 1 || ime_controller->managed_by_policy());
}
-base::string16 GetLabelString() {
+std::u16string GetLabelString() {
DCHECK(Shell::Get());
ImeControllerImpl* ime_controller = Shell::Get()->ime_controller();
size_t ime_count = ime_controller->available_imes().size();
@@ -39,7 +39,7 @@
}
}
-base::string16 GetTooltipString() {
+std::u16string GetTooltipString() {
DCHECK(Shell::Get());
ImeControllerImpl* ime_controller = Shell::Get()->ime_controller();
size_t ime_count = ime_controller->available_imes().size();
diff --git a/ash/system/ime/unified_ime_detailed_view_controller.cc b/ash/system/ime/unified_ime_detailed_view_controller.cc
index f6dce0d..5d580ef 100644
--- a/ash/system/ime/unified_ime_detailed_view_controller.cc
+++ b/ash/system/ime/unified_ime_detailed_view_controller.cc
@@ -48,7 +48,7 @@
return view_;
}
-base::string16 UnifiedIMEDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedIMEDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_IME_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/ime/unified_ime_detailed_view_controller.h b/ash/system/ime/unified_ime_detailed_view_controller.h
index d6b275f..843c02e 100644
--- a/ash/system/ime/unified_ime_detailed_view_controller.h
+++ b/ash/system/ime/unified_ime_detailed_view_controller.h
@@ -33,7 +33,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
// VirtualKeyboardObserver:
void OnKeyboardSuppressionChanged(bool suppressed) override;
diff --git a/ash/system/ime_menu/ime_list_view.cc b/ash/system/ime_menu/ime_list_view.cc
index fc5a398..3b6c69b 100644
--- a/ash/system/ime_menu/ime_list_view.cc
+++ b/ash/system/ime_menu/ime_list_view.cc
@@ -50,8 +50,8 @@
METADATA_HEADER(ImeListItemView);
ImeListItemView(ImeListView* list_view,
- const base::string16& id,
- const base::string16& label,
+ const std::u16string& id,
+ const std::u16string& label,
bool selected,
const SkColor button_color)
: ActionableView(TrayPopupInkDropStyle::FILL_BOUNDS),
@@ -285,7 +285,7 @@
// Adds the property items.
for (size_t i = 0; i < property_list.size(); i++) {
ImeListItemView* property_view =
- new ImeListItemView(this, base::string16(), property_list[i].label,
+ new ImeListItemView(this, std::u16string(), property_list[i].label,
property_list[i].checked, icon_color);
scroll_content()->AddChildView(property_view);
property_map_[property_view] = property_list[i].key;
diff --git a/ash/system/ime_menu/ime_menu_tray.cc b/ash/system/ime_menu/ime_menu_tray.cc
index e05445ef..87b9df9 100644
--- a/ash/system/ime_menu/ime_menu_tray.cc
+++ b/ash/system/ime_menu/ime_menu_tray.cc
@@ -422,7 +422,7 @@
UpdateTrayLabel();
}
-base::string16 ImeMenuTray::GetAccessibleNameForTray() {
+std::u16string ImeMenuTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_IME_MENU_ACCESSIBLE_NAME);
}
@@ -498,7 +498,7 @@
CloseBubble();
}
-base::string16 ImeMenuTray::GetAccessibleNameForBubble() {
+std::u16string ImeMenuTray::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(IDS_ASH_IME_MENU_ACCESSIBLE_NAME);
}
diff --git a/ash/system/ime_menu/ime_menu_tray.h b/ash/system/ime_menu/ime_menu_tray.h
index 1e04555c..2690421ac 100644
--- a/ash/system/ime_menu/ime_menu_tray.h
+++ b/ash/system/ime_menu/ime_menu_tray.h
@@ -56,7 +56,7 @@
// TrayBackgroundView:
void OnThemeChanged() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void ClickedOutsideBubble() override;
@@ -71,7 +71,7 @@
void OnIMEMenuActivationChanged(bool is_activated) override;
// TrayBubbleView::Delegate:
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/ime_menu/ime_menu_tray_unittest.cc b/ash/system/ime_menu/ime_menu_tray_unittest.cc
index 9fd21ee2..03f3be0 100644
--- a/ash/system/ime_menu/ime_menu_tray_unittest.cc
+++ b/ash/system/ime_menu/ime_menu_tray_unittest.cc
@@ -55,7 +55,7 @@
bool IsVisible() { return GetTray()->GetVisible(); }
// Returns the label text of the tray.
- const base::string16& GetTrayText() { return GetTray()->label_->GetText(); }
+ const std::u16string& GetTrayText() { return GetTray()->label_->GetText(); }
// Returns true if the background color of the tray is active.
bool IsTrayBackgroundActive() { return GetTray()->is_active(); }
diff --git a/ash/system/locale/locale_detailed_view.cc b/ash/system/locale/locale_detailed_view.cc
index 7599786d..160d59a 100644
--- a/ash/system/locale/locale_detailed_view.cc
+++ b/ash/system/locale/locale_detailed_view.cc
@@ -41,7 +41,7 @@
LocaleItem(tray::LocaleDetailedView* locale_detailed_view,
const std::string& iso_code,
- const base::string16& display_name,
+ const std::u16string& display_name,
bool checked)
: ActionableView(TrayPopupInkDropStyle::FILL_BOUNDS),
locale_detailed_view_(locale_detailed_view),
diff --git a/ash/system/locale/locale_update_controller_impl.cc b/ash/system/locale/locale_update_controller_impl.cc
index bd087e25..aaf49b4 100644
--- a/ash/system/locale/locale_update_controller_impl.cc
+++ b/ash/system/locale/locale_update_controller_impl.cc
@@ -42,7 +42,7 @@
// message_center::NotificationDelegate overrides:
void Close(bool by_user) override;
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
private:
base::OnceCallback<void(LocaleNotificationResult)> callback_;
@@ -70,7 +70,7 @@
void LocaleNotificationDelegate::Click(
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
if (!callback_)
return;
@@ -98,9 +98,9 @@
const std::string& to_locale,
LocaleChangeConfirmationCallback callback) {
DCHECK(Shell::Get()->session_controller()->IsActiveUserSessionStarted());
- base::string16 from_locale_name =
+ std::u16string from_locale_name =
l10n_util::GetDisplayNameForLocale(from_locale, current_locale, true);
- base::string16 to_locale_name =
+ std::u16string to_locale_name =
l10n_util::GetDisplayNameForLocale(to_locale, current_locale, true);
message_center::RichNotificationData optional;
@@ -117,7 +117,7 @@
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_TITLE),
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_LOCALE_CHANGE_MESSAGE,
from_locale_name, to_locale_name),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierLocale),
optional, new LocaleNotificationDelegate(std::move(callback)),
diff --git a/ash/system/locale/unified_locale_detailed_view_controller.cc b/ash/system/locale/unified_locale_detailed_view_controller.cc
index 7664158ed..4fe9004a 100644
--- a/ash/system/locale/unified_locale_detailed_view_controller.cc
+++ b/ash/system/locale/unified_locale_detailed_view_controller.cc
@@ -26,7 +26,7 @@
return view_;
}
-base::string16 UnifiedLocaleDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedLocaleDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_LOCALE_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/locale/unified_locale_detailed_view_controller.h b/ash/system/locale/unified_locale_detailed_view_controller.h
index 8ac42f4..1927d8a 100644
--- a/ash/system/locale/unified_locale_detailed_view_controller.h
+++ b/ash/system/locale/unified_locale_detailed_view_controller.h
@@ -28,7 +28,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
diff --git a/ash/system/media/media_tray.cc b/ash/system/media/media_tray.cc
index fe2ce0c..d10cf51 100644
--- a/ash/system/media/media_tray.cc
+++ b/ash/system/media/media_tray.cc
@@ -232,7 +232,7 @@
bubble_->GetBubbleView()->UpdateBubble();
}
-base::string16 MediaTray::GetAccessibleNameForTray() {
+std::u16string MediaTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(
IDS_ASH_GLOBAL_MEDIA_CONTROLS_BUTTON_TOOLTIP_TEXT);
}
@@ -351,7 +351,7 @@
SetVisiblePreferred(should_show);
}
-base::string16 MediaTray::GetAccessibleNameForBubble() {
+std::u16string MediaTray::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(IDS_ASH_GLOBAL_MEDIA_CONTROLS_TITLE);
}
diff --git a/ash/system/media/media_tray.h b/ash/system/media/media_tray.h
index d94dd0a6..80a14ab 100644
--- a/ash/system/media/media_tray.h
+++ b/ash/system/media/media_tray.h
@@ -56,7 +56,7 @@
void OnNotificationListViewSizeChanged() override;
// TrayBackgroundview implementations.
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void UpdateAfterLoginStatusChange() override;
void HandleLocaleChange() override;
bool PerformAction(const ui::Event& event) override;
@@ -81,7 +81,7 @@
friend class MediaTrayTest;
// TrayBubbleView::Delegate implementation.
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
// Called when theme change, set colors for media notification view.
void SetNotificationColorTheme();
diff --git a/ash/system/media/media_tray_unittest.cc b/ash/system/media/media_tray_unittest.cc
index 57fc9dc..579603b 100644
--- a/ash/system/media/media_tray_unittest.cc
+++ b/ash/system/media/media_tray_unittest.cc
@@ -72,7 +72,7 @@
~MockTrayBackgroundView() override = default;
// TrayBackgroundview implementations
- base::string16 GetAccessibleNameForTray() override {
+ std::u16string GetAccessibleNameForTray() override {
return base::ASCIIToUTF16("");
}
void HandleLocaleChange() override {}
diff --git a/ash/system/media/unified_media_controls_detailed_view_controller.cc b/ash/system/media/unified_media_controls_detailed_view_controller.cc
index 9b34172..9736180b 100644
--- a/ash/system/media/unified_media_controls_detailed_view_controller.cc
+++ b/ash/system/media/unified_media_controls_detailed_view_controller.cc
@@ -61,7 +61,7 @@
kMenuSeparatorWidth));
}
-base::string16 UnifiedMediaControlsDetailedViewController::GetAccessibleName()
+std::u16string UnifiedMediaControlsDetailedViewController::GetAccessibleName()
const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_MEDIA_CONTROLS_SUB_MENU_ACCESSIBLE_DESCRIPTION);
diff --git a/ash/system/media/unified_media_controls_detailed_view_controller.h b/ash/system/media/unified_media_controls_detailed_view_controller.h
index e818453..3d342d3 100644
--- a/ash/system/media/unified_media_controls_detailed_view_controller.h
+++ b/ash/system/media/unified_media_controls_detailed_view_controller.h
@@ -23,7 +23,7 @@
// DetailedViewController implementations.
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
friend class UnifiedMediaControlsDetailedViewControllerTest;
diff --git a/ash/system/media/unified_media_controls_view.cc b/ash/system/media/unified_media_controls_view.cc
index 5c2f856..2fcd4ce 100644
--- a/ash/system/media/unified_media_controls_view.cc
+++ b/ash/system/media/unified_media_controls_view.cc
@@ -101,7 +101,7 @@
UnifiedMediaControlsView::MediaActionButton::MediaActionButton(
UnifiedMediaControlsController* controller,
MediaSessionAction action,
- const base::string16& accessible_name)
+ const std::u16string& accessible_name)
: views::ImageButton(base::BindRepeating(
// Handle dynamically-updated button tags without rebinding.
[](UnifiedMediaControlsController* controller,
@@ -123,7 +123,7 @@
void UnifiedMediaControlsView::MediaActionButton::SetAction(
MediaSessionAction action,
- const base::string16& accessible_name) {
+ const std::u16string& accessible_name) {
action_ = action;
set_tag(static_cast<int>(action));
SetTooltipText(accessible_name);
@@ -275,7 +275,7 @@
artwork_view_->SetClipPath(GetArtworkClipPath());
}
-void UnifiedMediaControlsView::SetTitle(const base::string16& title) {
+void UnifiedMediaControlsView::SetTitle(const std::u16string& title) {
if (title_label_->GetText() == title)
return;
@@ -285,7 +285,7 @@
title));
}
-void UnifiedMediaControlsView::SetArtist(const base::string16& artist) {
+void UnifiedMediaControlsView::SetArtist(const std::u16string& artist) {
artist_label_->SetText(artist);
if (artist_label_->GetVisible() != artist.empty())
diff --git a/ash/system/media/unified_media_controls_view.h b/ash/system/media/unified_media_controls_view.h
index 05cbb232..8510bb1 100644
--- a/ash/system/media/unified_media_controls_view.h
+++ b/ash/system/media/unified_media_controls_view.h
@@ -33,8 +33,8 @@
void SetIsPlaying(bool playing);
void SetArtwork(base::Optional<gfx::ImageSkia> artwork);
- void SetTitle(const base::string16& title);
- void SetArtist(const base::string16& artist);
+ void SetTitle(const std::u16string& title);
+ void SetArtist(const std::u16string& artist);
void UpdateActionButtonAvailability(
const base::flat_set<media_session::mojom::MediaSessionAction>&
enabled_actions);
@@ -58,11 +58,11 @@
public:
MediaActionButton(UnifiedMediaControlsController* controller,
media_session::mojom::MediaSessionAction action,
- const base::string16& accessible_name);
+ const std::u16string& accessible_name);
~MediaActionButton() override = default;
void SetAction(media_session::mojom::MediaSessionAction action,
- const base::string16& accessible_name);
+ const std::u16string& accessible_name);
// views::ImageButton:
std::unique_ptr<views::InkDrop> CreateInkDrop() override;
diff --git a/ash/system/message_center/ash_message_center_lock_screen_controller.cc b/ash/system/message_center/ash_message_center_lock_screen_controller.cc
index 7a5e38b..33c75c74c 100644
--- a/ash/system/message_center/ash_message_center_lock_screen_controller.cc
+++ b/ash/system/message_center/ash_message_center_lock_screen_controller.cc
@@ -126,7 +126,7 @@
unified_system_tray->CloseBubble();
}
- base::string16 message;
+ std::u16string message;
if (message_id != -1) {
message = l10n_util::GetStringUTF16(message_id);
} else {
diff --git a/ash/system/message_center/ash_message_popup_collection_unittest.cc b/ash/system/message_center/ash_message_popup_collection_unittest.cc
index c0d4b00..92f87d4 100644
--- a/ash/system/message_center/ash_message_popup_collection_unittest.cc
+++ b/ash/system/message_center/ash_message_popup_collection_unittest.cc
@@ -129,7 +129,7 @@
return std::make_unique<message_center::Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
base::UTF8ToUTF16("test_title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate());
}
diff --git a/ash/system/message_center/message_center_ui_controller.cc b/ash/system/message_center/message_center_ui_controller.cc
index 18869a9..fc57ca4 100644
--- a/ash/system/message_center/message_center_ui_controller.cc
+++ b/ash/system/message_center/message_center_ui_controller.cc
@@ -120,7 +120,7 @@
void MessageCenterUiController::OnNotificationClicked(
const std::string& notification_id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
if (popups_visible_)
OnMessageCenterChanged();
diff --git a/ash/system/message_center/message_center_ui_controller.h b/ash/system/message_center/message_center_ui_controller.h
index 67a6124..e82ebf67 100644
--- a/ash/system/message_center/message_center_ui_controller.h
+++ b/ash/system/message_center/message_center_ui_controller.h
@@ -70,7 +70,7 @@
void OnNotificationClicked(
const std::string& notification_id,
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
void OnNotificationDisplayed(
const std::string& notification_id,
const message_center::DisplaySource source) override;
diff --git a/ash/system/message_center/message_center_utils_unittest.cc b/ash/system/message_center/message_center_utils_unittest.cc
index 0f868bee..caac335 100644
--- a/ash/system/message_center/message_center_utils_unittest.cc
+++ b/ash/system/message_center/message_center_utils_unittest.cc
@@ -22,7 +22,7 @@
std::make_unique<message_center::Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, notification_id,
base::UTF8ToUTF16("test_title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), /*display_source=*/base::string16(), GURL(),
+ gfx::Image(), /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::APPLICATION,
app_id),
message_center::RichNotificationData(),
diff --git a/ash/system/message_center/notification_swipe_control_view_unittest.cc b/ash/system/message_center/notification_swipe_control_view_unittest.cc
index bca358c..779249e 100644
--- a/ash/system/message_center/notification_swipe_control_view_unittest.cc
+++ b/ash/system/message_center/notification_swipe_control_view_unittest.cc
@@ -75,7 +75,7 @@
message_center::Notification notification(
message_center::NOTIFICATION_TYPE_SIMPLE, "id",
base::UTF8ToUTF16("title"), base::UTF8ToUTF16("id"), gfx::Image(),
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::APPLICATION,
"notifier_id"),
rich_data, nullptr);
diff --git a/ash/system/message_center/notifier_settings_view.cc b/ash/system/message_center/notifier_settings_view.cc
index 726f4d7..95001835 100644
--- a/ash/system/message_center/notifier_settings_view.cc
+++ b/ash/system/message_center/notifier_settings_view.cc
@@ -315,7 +315,7 @@
auto icon_view = std::make_unique<views::ImageView>();
auto name_view = std::make_unique<views::Label>(notifier.name);
auto checkbox = std::make_unique<NotifierViewCheckbox>(
- base::string16(),
+ std::u16string(),
base::BindRepeating(
[](NotifierButton* button, const ui::Event& event) {
// The checkbox state has already changed at this point, but we'll
diff --git a/ash/system/message_center/stacked_notification_bar.cc b/ash/system/message_center/stacked_notification_bar.cc
index 67201139..70b3295 100644
--- a/ash/system/message_center/stacked_notification_bar.cc
+++ b/ash/system/message_center/stacked_notification_bar.cc
@@ -36,7 +36,7 @@
class StackingBarLabelButton : public views::LabelButton {
public:
StackingBarLabelButton(PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
UnifiedMessageCenterView* message_center_view)
: views::LabelButton(std::move(callback), text),
message_center_view_(message_center_view) {
diff --git a/ash/system/message_center/unified_message_center_bubble.cc b/ash/system/message_center/unified_message_center_bubble.cc
index d381f71c..01bcccd 100644
--- a/ash/system/message_center/unified_message_center_bubble.cc
+++ b/ash/system/message_center/unified_message_center_bubble.cc
@@ -220,7 +220,7 @@
return bubble_widget_;
}
-base::string16 UnifiedMessageCenterBubble::GetAccessibleNameForBubble() {
+std::u16string UnifiedMessageCenterBubble::GetAccessibleNameForBubble() {
return l10n_util::GetStringUTF16(IDS_ASH_MESSAGE_CENTER_ACCESSIBLE_NAME);
}
diff --git a/ash/system/message_center/unified_message_center_bubble.h b/ash/system/message_center/unified_message_center_bubble.h
index 2d9e78e..4e9d1ff 100644
--- a/ash/system/message_center/unified_message_center_bubble.h
+++ b/ash/system/message_center/unified_message_center_bubble.h
@@ -76,7 +76,7 @@
views::Widget* GetBubbleWidget() const override;
// TrayBubbleView::Delegate:
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
// views::ViewObserver:
diff --git a/ash/system/message_center/unified_message_center_bubble_unittest.cc b/ash/system/message_center/unified_message_center_bubble_unittest.cc
index 8e7a1d1..70b447c 100644
--- a/ash/system/message_center/unified_message_center_bubble_unittest.cc
+++ b/ash/system/message_center/unified_message_center_bubble_unittest.cc
@@ -40,7 +40,7 @@
MessageCenter::Get()->AddNotification(std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate()));
return id;
diff --git a/ash/system/message_center/unified_message_center_view_unittest.cc b/ash/system/message_center/unified_message_center_view_unittest.cc
index b04a0f7..37e028c 100644
--- a/ash/system/message_center/unified_message_center_view_unittest.cc
+++ b/ash/system/message_center/unified_message_center_view_unittest.cc
@@ -92,7 +92,7 @@
MessageCenter::Get()->AddNotification(std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), data,
new message_center::NotificationDelegate()));
return id;
diff --git a/ash/system/message_center/unified_message_list_view_unittest.cc b/ash/system/message_center/unified_message_list_view_unittest.cc
index 3240a1b..eab55fd 100644
--- a/ash/system/message_center/unified_message_list_view_unittest.cc
+++ b/ash/system/message_center/unified_message_list_view_unittest.cc
@@ -67,7 +67,7 @@
auto notification = std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate());
@@ -127,7 +127,7 @@
auto notification = std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, id,
base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate());
notification->set_pinned(pinned);
diff --git a/ash/system/model/system_tray_model.cc b/ash/system/model/system_tray_model.cc
index 1d9458c..dcfddb6 100644
--- a/ash/system/model/system_tray_model.cc
+++ b/ash/system/model/system_tray_model.cc
@@ -94,8 +94,8 @@
void SystemTrayModel::SetUpdateNotificationState(
NotificationStyle style,
- const base::string16& notification_title,
- const base::string16& notification_body) {
+ const std::u16string& notification_title,
+ const std::u16string& notification_body) {
update_model()->SetUpdateNotificationState(style, notification_title,
notification_body);
}
diff --git a/ash/system/model/system_tray_model.h b/ash/system/model/system_tray_model.h
index af6abf0..fb2eac8 100644
--- a/ash/system/model/system_tray_model.h
+++ b/ash/system/model/system_tray_model.h
@@ -47,8 +47,8 @@
UpdateType update_type) override;
void SetUpdateNotificationState(
NotificationStyle style,
- const base::string16& notification_title,
- const base::string16& notification_body) override;
+ const std::u16string& notification_title,
+ const std::u16string& notification_body) override;
void SetUpdateOverCellularAvailableIconVisible(bool visible) override;
void ShowVolumeSliderBubble() override;
void ShowNetworkDetailedViewBubble() override;
diff --git a/ash/system/model/update_model.cc b/ash/system/model/update_model.cc
index 68f10993..f4c37ca 100644
--- a/ash/system/model/update_model.cc
+++ b/ash/system/model/update_model.cc
@@ -31,8 +31,8 @@
void UpdateModel::SetUpdateNotificationState(
NotificationStyle style,
- const base::string16& notification_title,
- const base::string16& notification_body) {
+ const std::u16string& notification_title,
+ const std::u16string& notification_body) {
DCHECK_EQ(update_type_, UpdateType::kSystem);
notification_style_ = style;
notification_title_ = notification_title;
diff --git a/ash/system/model/update_model.h b/ash/system/model/update_model.h
index 8a66869..788093fe 100644
--- a/ash/system/model/update_model.h
+++ b/ash/system/model/update_model.h
@@ -44,8 +44,8 @@
// The |notification_body| changes the text of the notification, as it
// contains a countdown until the required reboot.
void SetUpdateNotificationState(NotificationStyle style,
- const base::string16& notification_title,
- const base::string16& notification_body);
+ const std::u16string& notification_title,
+ const std::u16string& notification_body);
// If |available| is true, a software update is available but user's agreement
// is required as current connection is cellular. If |available| is false, the
@@ -60,10 +60,10 @@
bool rollback() const { return rollback_; }
UpdateType update_type() const { return update_type_; }
NotificationStyle notification_style() const { return notification_style_; }
- const base::string16& notification_title() const {
+ const std::u16string& notification_title() const {
return notification_title_;
}
- const base::string16& notification_body() const { return notification_body_; }
+ const std::u16string& notification_body() const { return notification_body_; }
bool update_over_cellular_available() const {
return update_over_cellular_available_;
}
@@ -78,9 +78,9 @@
UpdateType update_type_ = UpdateType::kSystem;
NotificationStyle notification_style_ = NotificationStyle::kDefault;
// Custom title for an OS update, usually due to RelaunchNotification policy.
- base::string16 notification_title_;
+ std::u16string notification_title_;
// Custom body for an OS update, usually due to RelaunchNotification policy.
- base::string16 notification_body_;
+ std::u16string notification_body_;
bool update_over_cellular_available_ = false;
base::ObserverList<UpdateObserver>::Unchecked observers_;
diff --git a/ash/system/nearby_share/nearby_share_feature_pod_controller.cc b/ash/system/nearby_share/nearby_share_feature_pod_controller.cc
index 8b2e73e..149df49 100644
--- a/ash/system/nearby_share/nearby_share_feature_pod_controller.cc
+++ b/ash/system/nearby_share/nearby_share_feature_pod_controller.cc
@@ -24,7 +24,7 @@
constexpr base::TimeDelta kOneMinute = base::TimeDelta::FromMinutes(1);
constexpr base::TimeDelta kOneSecond = base::TimeDelta::FromSeconds(1);
-base::string16 RemainingTimeString(base::TimeDelta remaining_time) {
+std::u16string RemainingTimeString(base::TimeDelta remaining_time) {
if (remaining_time > kOneMinute) {
return l10n_util::GetStringFUTF16Int(
IDS_ASH_STATUS_TRAY_NEARBY_SHARE_REMAINING_MINUTES,
diff --git a/ash/system/network/active_network_icon.cc b/ash/system/network/active_network_icon.cc
index 5195ddd..0c4b6e1 100644
--- a/ash/system/network/active_network_icon.cc
+++ b/ash/system/network/active_network_icon.cc
@@ -51,9 +51,9 @@
}
void ActiveNetworkIcon::GetConnectionStatusStrings(Type type,
- base::string16* a11y_name,
- base::string16* a11y_desc,
- base::string16* tooltip) {
+ std::u16string* a11y_name,
+ std::u16string* a11y_desc,
+ std::u16string* tooltip) {
const NetworkStateProperties* network = nullptr;
switch (type) {
case Type::kSingle:
@@ -68,7 +68,7 @@
break;
}
- base::string16 network_name;
+ std::u16string network_name;
if (network) {
network_name = network->type == NetworkType::kEthernet
? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ETHERNET)
@@ -78,19 +78,19 @@
if (network && network->type == NetworkType::kCellular &&
network->type_state->get_cellular()->activation_state ==
ActivationStateType::kActivating) {
- base::string16 activating_string = l10n_util::GetStringFUTF16(
+ std::u16string activating_string = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_ACTIVATING, network_name);
if (a11y_name)
*a11y_name = activating_string;
if (a11y_desc)
- *a11y_desc = base::string16();
+ *a11y_desc = std::u16string();
if (tooltip)
*tooltip = activating_string;
} else if (network && chromeos::network_config::StateIsConnected(
network->connection_state)) {
- base::string16 connected_string = l10n_util::GetStringFUTF16(
+ std::u16string connected_string = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED, network_name);
- base::string16 signal_strength_string;
+ std::u16string signal_strength_string;
if (chromeos::network_config::NetworkTypeMatchesType(
network->type, NetworkType::kWireless)) {
// Retrieve the string describing the signal strength, if it is applicable
@@ -127,12 +127,12 @@
}
} else if (network &&
network->connection_state == ConnectionStateType::kConnecting) {
- base::string16 connecting_string = l10n_util::GetStringFUTF16(
+ std::u16string connecting_string = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING, network_name);
if (a11y_name)
*a11y_name = connecting_string;
if (a11y_desc)
- *a11y_desc = base::string16();
+ *a11y_desc = std::u16string();
if (tooltip)
*tooltip = connecting_string;
} else {
@@ -141,7 +141,7 @@
IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED_A11Y);
}
if (a11y_desc)
- *a11y_desc = base::string16();
+ *a11y_desc = std::u16string();
if (tooltip) {
*tooltip = l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_TOOLTIP);
diff --git a/ash/system/network/active_network_icon.h b/ash/system/network/active_network_icon.h
index eb59e5e..3d4468d0 100644
--- a/ash/system/network/active_network_icon.h
+++ b/ash/system/network/active_network_icon.h
@@ -53,9 +53,9 @@
// Provides the a11y and tooltip strings for |type|. Output parameters can
// be null.
void GetConnectionStatusStrings(Type type,
- base::string16* a11y_name,
- base::string16* a11y_desc,
- base::string16* tooltip);
+ std::u16string* a11y_name,
+ std::u16string* a11y_desc,
+ std::u16string* tooltip);
// Returns a network icon (which may be empty) and sets |animating| if
// provided.
diff --git a/ash/system/network/active_network_icon_unittest.cc b/ash/system/network/active_network_icon_unittest.cc
index 1b91ed9..496cc97 100644
--- a/ash/system/network/active_network_icon_unittest.cc
+++ b/ash/system/network/active_network_icon_unittest.cc
@@ -177,7 +177,7 @@
TEST_F(ActiveNetworkIconTest, GetConnectionStatusStrings) {
// TODO(902409): Test multi icon and improve coverage.
SetupCellular(shill::kStateOnline);
- base::string16 name, desc, tooltip;
+ std::u16string name, desc, tooltip;
active_network_icon()->GetConnectionStatusStrings(
ActiveNetworkIcon::Type::kSingle, &name, &desc, &tooltip);
// Note: The guid is used for the name in ConfigureService.
diff --git a/ash/system/network/auto_connect_notifier.cc b/ash/system/network/auto_connect_notifier.cc
index c39115065..ed913ec 100644
--- a/ash/system/network/auto_connect_notifier.cc
+++ b/ash/system/network/auto_connect_notifier.cc
@@ -155,7 +155,7 @@
l10n_util::GetStringUTF16(IDS_ASH_NETWORK_AUTOCONNECT_NOTIFICATION_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_NETWORK_AUTOCONNECT_NOTIFICATION_MESSAGE),
- base::string16() /* display_source */, GURL() /* origin_url */,
+ std::u16string() /* display_source */, GURL() /* origin_url */,
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierAutoConnect),
{} /* optional_fields */,
diff --git a/ash/system/network/cellular_setup_notifier.cc b/ash/system/network/cellular_setup_notifier.cc
index fa32df0..ded72df 100644
--- a/ash/system/network/cellular_setup_notifier.cc
+++ b/ash/system/network/cellular_setup_notifier.cc
@@ -176,7 +176,7 @@
IDS_ASH_NETWORK_CELLULAR_SETUP_NOTIFICATION_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_NETWORK_CELLULAR_SETUP_NOTIFICATION_MESSAGE),
- /*display_source=*/base::string16(), GURL(),
+ /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierCellularSetup),
diff --git a/ash/system/network/network_feature_pod_button.cc b/ash/system/network/network_feature_pod_button.cc
index 5aaf524..71bdab3 100644
--- a/ash/system/network/network_feature_pod_button.cc
+++ b/ash/system/network/network_feature_pod_button.cc
@@ -31,7 +31,7 @@
namespace {
-base::string16 GetSubLabelForConnectedNetwork(
+std::u16string GetSubLabelForConnectedNetwork(
const NetworkStateProperties* network) {
DCHECK(network &&
chromeos::network_config::StateIsConnected(network->connection_state));
@@ -179,7 +179,7 @@
icon_button()->SetImage(views::Button::STATE_DISABLED, image_disabled);
SetToggled(toggled);
- base::string16 network_name;
+ std::u16string network_name;
if (network) {
network_name = network->type == NetworkType::kEthernet
? l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_ETHERNET)
@@ -207,7 +207,7 @@
SetSubLabel(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECTED_SUBLABEL));
}
- base::string16 tooltip;
+ std::u16string tooltip;
Shell::Get()
->system_tray_model()
->active_network_icon()
@@ -218,7 +218,7 @@
}
void NetworkFeaturePodButton::UpdateTooltip(
- const base::string16& connection_state_message) {
+ const std::u16string& connection_state_message) {
// When the button is enabled, use tooltips to alert the user of the actions
// that will be taken when interacting with the button/toggle. However, if the
// button is disabled, those actions cannot be taken, so simply display the
diff --git a/ash/system/network/network_feature_pod_button.h b/ash/system/network/network_feature_pod_button.h
index 94f09f6..d88ec33 100644
--- a/ash/system/network/network_feature_pod_button.h
+++ b/ash/system/network/network_feature_pod_button.h
@@ -35,7 +35,7 @@
const char* GetClassName() const override;
private:
- void UpdateTooltip(const base::string16& connection_state_message);
+ void UpdateTooltip(const std::u16string& connection_state_message);
DISALLOW_COPY_AND_ASSIGN(NetworkFeaturePodButton);
};
diff --git a/ash/system/network/network_icon.cc b/ash/system/network/network_icon.cc
index 89b27b6..d3595431 100644
--- a/ash/system/network/network_icon.cc
+++ b/ash/system/network/network_icon.cc
@@ -556,7 +556,7 @@
return GetBasicImage(ICON_TYPE_LIST, network_type, false /* connected */);
}
-base::string16 GetLabelForNetworkList(const NetworkStateProperties* network) {
+std::u16string GetLabelForNetworkList(const NetworkStateProperties* network) {
if (network->type == NetworkType::kCellular) {
ActivationStateType activation_state =
network->type_state->get_cellular()->activation_state;
diff --git a/ash/system/network/network_icon.h b/ash/system/network/network_icon.h
index 526306c..90dd07a 100644
--- a/ash/system/network/network_icon.h
+++ b/ash/system/network/network_icon.h
@@ -93,7 +93,7 @@
chromeos::network_config::mojom::NetworkType network_type);
// Returns the label for |network| when displayed in a list.
-ASH_EXPORT base::string16 GetLabelForNetworkList(
+ASH_EXPORT std::u16string GetLabelForNetworkList(
const chromeos::network_config::mojom::NetworkStateProperties* network);
// Called periodically with the current list of network guids. Removes cached
diff --git a/ash/system/network/network_info.h b/ash/system/network/network_info.h
index 391de41e..c25bd16 100644
--- a/ash/system/network/network_info.h
+++ b/ash/system/network/network_info.h
@@ -29,8 +29,8 @@
bool operator!=(const NetworkInfo& other) const { return !(*this == other); }
std::string guid;
- base::string16 label;
- base::string16 tooltip;
+ std::u16string label;
+ std::u16string tooltip;
gfx::ImageSkia image;
bool disable = false;
bool secured = false;
diff --git a/ash/system/network/network_list_view.cc b/ash/system/network/network_list_view.cc
index 592ed35..9f8188fe 100644
--- a/ash/system/network/network_list_view.cc
+++ b/ash/system/network/network_list_view.cc
@@ -413,7 +413,7 @@
void NetworkListView::SetupUnactivatedCellularNetworkListItem(
HoverHighlightView* view,
- const base::string16& sub_text) {
+ const std::u16string& sub_text) {
DCHECK(view->is_populated());
view->SetSubText(sub_text);
@@ -422,7 +422,7 @@
AshColorProvider::ContentLayerType::kTextColorWarning));
}
-base::string16 NetworkListView::GenerateAccessibilityLabel(
+std::u16string NetworkListView::GenerateAccessibilityLabel(
const NetworkInfo& info) {
if (CanNetworkConnect(info.connection_state, info.type, info.connectable)) {
return l10n_util::GetStringFUTF16(
@@ -432,9 +432,9 @@
info.label);
}
-base::string16 NetworkListView::GenerateAccessibilityDescription(
+std::u16string NetworkListView::GenerateAccessibilityDescription(
const NetworkInfo& info) {
- base::string16 connection_status;
+ std::u16string connection_status;
if (StateIsConnected(info.connection_state) ||
info.connection_state == ConnectionStateType::kConnecting) {
connection_status = l10n_util::GetStringUTF16(
@@ -460,7 +460,7 @@
}
return info.label;
case NetworkType::kWiFi: {
- base::string16 security_label = l10n_util::GetStringUTF16(
+ std::u16string security_label = l10n_util::GetStringUTF16(
info.secured ? IDS_ASH_STATUS_TRAY_NETWORK_STATUS_SECURED
: IDS_ASH_STATUS_TRAY_NETWORK_STATUS_UNSECURED);
if (!connection_status.empty()) {
diff --git a/ash/system/network/network_list_view.h b/ash/system/network/network_list_view.h
index e604a8d2..55bc36a 100644
--- a/ash/system/network/network_list_view.h
+++ b/ash/system/network/network_list_view.h
@@ -87,7 +87,7 @@
// and updates accessibility label. Used when cellular network is not
// activiated.
void SetupUnactivatedCellularNetworkListItem(HoverHighlightView* view,
- const base::string16& sub_text);
+ const std::u16string& sub_text);
// Adds or updates child views representing the network connections when
// |is_wifi| is matching the attribute of a network connection starting at
@@ -131,11 +131,11 @@
bool NeedUpdateViewForNetwork(const NetworkInfo& info) const;
// Creates an accessibility label for given network.
- base::string16 GenerateAccessibilityLabel(const NetworkInfo& info);
+ std::u16string GenerateAccessibilityLabel(const NetworkInfo& info);
// Creates an accessibility description for the given network that includes
// all details that are shown in the ui.
- base::string16 GenerateAccessibilityDescription(const NetworkInfo& info);
+ std::u16string GenerateAccessibilityDescription(const NetworkInfo& info);
bool needs_relayout_ = false;
diff --git a/ash/system/network/network_state_list_detailed_view.cc b/ash/system/network/network_state_list_detailed_view.cc
index 7652df3..89669d2 100644
--- a/ash/system/network/network_state_list_detailed_view.cc
+++ b/ash/system/network/network_state_list_detailed_view.cc
@@ -426,7 +426,7 @@
cellular_address = *cellular->mac_address;
}
- base::string16 bubble_text;
+ std::u16string bubble_text;
auto maybe_add_mac_address = [&bubble_text](const std::string& address,
int ids) {
if (address.empty())
diff --git a/ash/system/network/network_tray_view.cc b/ash/system/network/network_tray_view.cc
index b63d227..f75727e 100644
--- a/ash/system/network/network_tray_view.cc
+++ b/ash/system/network/network_tray_view.cc
@@ -58,7 +58,7 @@
node_data->SetDescription(accessible_description_);
}
-base::string16 NetworkTrayView::GetAccessibleNameString() const {
+std::u16string NetworkTrayView::GetAccessibleNameString() const {
return tooltip_;
}
@@ -67,7 +67,7 @@
return GetLocalBounds().Contains(point) ? this : nullptr;
}
-base::string16 NetworkTrayView::GetTooltipText(const gfx::Point& p) const {
+std::u16string NetworkTrayView::GetTooltipText(const gfx::Point& p) const {
return tooltip_;
}
@@ -115,7 +115,7 @@
}
void NetworkTrayView::UpdateConnectionStatus(bool notify_a11y) {
- base::string16 prev_accessible_name = accessible_name_;
+ std::u16string prev_accessible_name = accessible_name_;
Shell::Get()
->system_tray_model()
->active_network_icon()
diff --git a/ash/system/network/network_tray_view.h b/ash/system/network/network_tray_view.h
index badde09..88dd211f 100644
--- a/ash/system/network/network_tray_view.h
+++ b/ash/system/network/network_tray_view.h
@@ -29,14 +29,14 @@
NetworkTrayView(Shelf* shelf, ActiveNetworkIcon::Type type);
- base::string16 GetAccessibleNameString() const;
+ std::u16string GetAccessibleNameString() const;
const char* GetClassName() const override;
// views::View:
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
// TrayItemView:
void HandleLocaleChange() override;
@@ -63,15 +63,15 @@
// The name provided by GetAccessibleNodeData, which includes the network
// name and connection state.
- base::string16 accessible_name_;
+ std::u16string accessible_name_;
// The description provided by GetAccessibleNodeData. For wifi networks this
// is the signal strength of the network. Otherwise it is empty.
- base::string16 accessible_description_;
+ std::u16string accessible_description_;
// The tooltip for the icon. Includes the network name and signal strength
// (for wireless networks).
- base::string16 tooltip_;
+ std::u16string tooltip_;
DISALLOW_COPY_AND_ASSIGN(NetworkTrayView);
};
diff --git a/ash/system/network/sms_observer.cc b/ash/system/network/sms_observer.cc
index a0220134..acb99edf 100644
--- a/ash/system/network/sms_observer.cc
+++ b/ash/system/network/sms_observer.cc
@@ -45,7 +45,7 @@
base::ASCIIToUTF16(message_number),
base::CollapseWhitespace(base::UTF8ToUTF16(message_text),
false /* trim_sequences_with_line_breaks */),
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierSms),
message_center::RichNotificationData(), nullptr, kNotificationSmsSyncIcon,
diff --git a/ash/system/network/unified_network_detailed_view_controller.cc b/ash/system/network/unified_network_detailed_view_controller.cc
index edd7a3c..cfe80e8 100644
--- a/ash/system/network/unified_network_detailed_view_controller.cc
+++ b/ash/system/network/unified_network_detailed_view_controller.cc
@@ -31,7 +31,7 @@
return view_;
}
-base::string16 UnifiedNetworkDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedNetworkDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_NETWORK_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/network/unified_network_detailed_view_controller.h b/ash/system/network/unified_network_detailed_view_controller.h
index 1f059790d..e019bf9 100644
--- a/ash/system/network/unified_network_detailed_view_controller.h
+++ b/ash/system/network/unified_network_detailed_view_controller.h
@@ -28,7 +28,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
diff --git a/ash/system/network/unified_vpn_detailed_view_controller.cc b/ash/system/network/unified_vpn_detailed_view_controller.cc
index aa02548..0aa4df62 100644
--- a/ash/system/network/unified_vpn_detailed_view_controller.cc
+++ b/ash/system/network/unified_vpn_detailed_view_controller.cc
@@ -30,7 +30,7 @@
return view_;
}
-base::string16 UnifiedVPNDetailedViewController::GetAccessibleName() const {
+std::u16string UnifiedVPNDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_VPN_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/network/unified_vpn_detailed_view_controller.h b/ash/system/network/unified_vpn_detailed_view_controller.h
index f4eb848..ccd4ef12 100644
--- a/ash/system/network/unified_vpn_detailed_view_controller.h
+++ b/ash/system/network/unified_vpn_detailed_view_controller.h
@@ -28,7 +28,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
diff --git a/ash/system/network/vpn_list_view.cc b/ash/system/network/vpn_list_view.cc
index 1ad37729..9c11c02 100644
--- a/ash/system/network/vpn_list_view.cc
+++ b/ash/system/network/vpn_list_view.cc
@@ -276,7 +276,7 @@
gfx::ImageSkia image =
network_icon::GetImageForVPN(vpn, network_icon::ICON_TYPE_LIST);
- base::string16 label = network_icon::GetLabelForNetworkList(vpn);
+ std::u16string label = network_icon::GetLabelForNetworkList(vpn);
AddIconAndLabel(image, label);
if (chromeos::network_config::StateIsConnected(vpn->connection_state)) {
owner_->SetupConnectedScrollListItem(this);
diff --git a/ash/system/network/wifi_toggle_notification_controller.cc b/ash/system/network/wifi_toggle_notification_controller.cc
index 92f390e6..0849cfae 100644
--- a/ash/system/network/wifi_toggle_notification_controller.cc
+++ b/ash/system/network/wifi_toggle_notification_controller.cc
@@ -33,9 +33,9 @@
: IDS_ASH_STATUS_TRAY_NETWORK_WIFI_DISABLED;
std::unique_ptr<Notification> notification = std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_SIMPLE, kWifiToggleNotificationId,
- base::string16(), l10n_util::GetStringUTF16(string_id),
+ std::u16string(), l10n_util::GetStringUTF16(string_id),
gfx::Image(network_icon::GetImageForWiFiEnabledState(wifi_enabled)),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierWifiToggle),
message_center::RichNotificationData(), nullptr);
diff --git a/ash/system/night_light/night_light_controller_impl.cc b/ash/system/night_light/night_light_controller_impl.cc
index 7ceae9f5..53f0a69 100644
--- a/ash/system/night_light/night_light_controller_impl.cc
+++ b/ash/system/night_light/night_light_controller_impl.cc
@@ -724,7 +724,7 @@
void NightLightControllerImpl::Click(
const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) {
+ const base::Optional<std::u16string>& reply) {
auto* shell = Shell::Get();
DCHECK(!button_index.has_value());
@@ -824,7 +824,7 @@
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_AUTO_NIGHT_LIGHT_NOTIFY_TITLE),
l10n_util::GetStringUTF16(IDS_ASH_AUTO_NIGHT_LIGHT_NOTIFY_BODY),
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
message_center::RichNotificationData{},
diff --git a/ash/system/night_light/night_light_controller_impl.h b/ash/system/night_light/night_light_controller_impl.h
index 25b905f..4f1ca5a 100644
--- a/ash/system/night_light/night_light_controller_impl.h
+++ b/ash/system/night_light/night_light_controller_impl.h
@@ -187,7 +187,7 @@
// message_center::NotificationObserver:
void Close(bool by_user) override;
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override;
+ const base::Optional<std::u16string>& reply) override;
void SetDelegateForTesting(std::unique_ptr<Delegate> delegate);
diff --git a/ash/system/night_light/night_light_feature_pod_controller.cc b/ash/system/night_light/night_light_feature_pod_controller.cc
index 3f11fde..4c009933 100644
--- a/ash/system/night_light/night_light_feature_pod_controller.cc
+++ b/ash/system/night_light/night_light_feature_pod_controller.cc
@@ -87,7 +87,7 @@
is_enabled ? IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_ON_STATE
: IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_OFF_STATE));
- base::string16 tooltip_state = l10n_util::GetStringUTF16(
+ std::u16string tooltip_state = l10n_util::GetStringUTF16(
is_enabled ? IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_ENABLED_STATE_TOOLTIP
: IDS_ASH_STATUS_TRAY_NIGHT_LIGHT_DISABLED_STATE_TOOLTIP);
button_->SetIconTooltip(l10n_util::GetStringFUTF16(
diff --git a/ash/system/overview/overview_button_tray.cc b/ash/system/overview/overview_button_tray.cc
index 9834a4a..953db939 100644
--- a/ash/system/overview/overview_button_tray.cc
+++ b/ash/system/overview/overview_button_tray.cc
@@ -178,7 +178,7 @@
void OverviewButtonTray::ClickedOutsideBubble() {}
-base::string16 OverviewButtonTray::GetAccessibleNameForTray() {
+std::u16string OverviewButtonTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_OVERVIEW_BUTTON_ACCESSIBLE_NAME);
}
diff --git a/ash/system/overview/overview_button_tray.h b/ash/system/overview/overview_button_tray.h
index b2eb65e..4f0df67 100644
--- a/ash/system/overview/overview_button_tray.h
+++ b/ash/system/overview/overview_button_tray.h
@@ -75,7 +75,7 @@
// TrayBackgroundView:
void UpdateAfterLoginStatusChange() override;
void ClickedOutsideBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/palette/common_palette_tool.cc b/ash/system/palette/common_palette_tool.cc
index 784403d..2a12e545 100644
--- a/ash/system/palette/common_palette_tool.cc
+++ b/ash/system/palette/common_palette_tool.cc
@@ -72,7 +72,7 @@
delegate()->EnableTool(GetToolId());
}
-views::View* CommonPaletteTool::CreateDefaultView(const base::string16& name) {
+views::View* CommonPaletteTool::CreateDefaultView(const std::u16string& name) {
SkColor icon_color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kButtonIconColor);
gfx::ImageSkia icon =
diff --git a/ash/system/palette/common_palette_tool.h b/ash/system/palette/common_palette_tool.h
index 3a2a665..a7c078f 100644
--- a/ash/system/palette/common_palette_tool.h
+++ b/ash/system/palette/common_palette_tool.h
@@ -39,7 +39,7 @@
virtual const gfx::VectorIcon& GetPaletteIcon() const = 0;
// Creates a default view implementation to be returned by CreateView.
- views::View* CreateDefaultView(const base::string16& name);
+ views::View* CreateDefaultView(const std::u16string& name);
HoverHighlightView* highlight_view_ = nullptr;
diff --git a/ash/system/palette/palette_tray.cc b/ash/system/palette/palette_tray.cc
index 1d58c6a..099c8c3 100644
--- a/ash/system/palette/palette_tray.cc
+++ b/ash/system/palette/palette_tray.cc
@@ -368,7 +368,7 @@
UpdateTrayIcon();
}
-base::string16 PaletteTray::GetAccessibleNameForTray() {
+std::u16string PaletteTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE);
}
@@ -429,7 +429,7 @@
PaletteGroup::MODE) != PaletteToolId::NONE);
}
-base::string16 PaletteTray::GetAccessibleNameForBubble() {
+std::u16string PaletteTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
diff --git a/ash/system/palette/palette_tray.h b/ash/system/palette/palette_tray.h
index 3ce86e7..48dc0c3 100644
--- a/ash/system/palette/palette_tray.h
+++ b/ash/system/palette/palette_tray.h
@@ -74,7 +74,7 @@
// TrayBackgroundView:
void ClickedOutsideBubble() override;
void OnThemeChanged() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void AnchorUpdated() override;
@@ -102,7 +102,7 @@
// TrayBubbleView::Delegate:
void BubbleViewDestroyed() override;
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/palette/tools/capture_region_mode.cc b/ash/system/palette/tools/capture_region_mode.cc
index 805b2ef..657b336 100644
--- a/ash/system/palette/tools/capture_region_mode.cc
+++ b/ash/system/palette/tools/capture_region_mode.cc
@@ -43,9 +43,10 @@
void CaptureRegionMode::OnEnable() {
CommonPaletteTool::OnEnable();
- ToastData toast(kToastId, l10n_util::GetStringUTF16(
- IDS_ASH_STYLUS_TOOLS_CAPTURE_REGION_TOAST),
- kToastDurationMs, base::Optional<base::string16>());
+ ToastData toast(
+ kToastId,
+ l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_CAPTURE_REGION_TOAST),
+ kToastDurationMs, base::Optional<std::u16string>());
Shell::Get()->toast_manager()->Show(toast);
auto* screenshot_controller = Shell::Get()->screenshot_controller();
diff --git a/ash/system/palette/tools/metalayer_mode.cc b/ash/system/palette/tools/metalayer_mode.cc
index f05d158..743c803b 100644
--- a/ash/system/palette/tools/metalayer_mode.cc
+++ b/ash/system/palette/tools/metalayer_mode.cc
@@ -92,7 +92,7 @@
}
views::View* MetalayerMode::CreateView() {
- views::View* view = CreateDefaultView(base::string16());
+ views::View* view = CreateDefaultView(std::u16string());
UpdateView();
return view;
}
@@ -139,7 +139,7 @@
ToastData toast(
kToastId,
l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_METALAYER_TOAST_LOADING),
- kToastDurationMs, base::Optional<base::string16>());
+ kToastDurationMs, base::Optional<std::u16string>());
Shell::Get()->toast_manager()->Show(toast);
} else {
delegate()->RecordPaletteOptionsUsage(
@@ -213,7 +213,7 @@
if (!highlight_view_)
return;
- const base::string16 text = l10n_util::GetStringUTF16(
+ const std::u16string text = l10n_util::GetStringUTF16(
loading() ? IDS_ASH_STYLUS_TOOLS_METALAYER_MODE_LOADING
: IDS_ASH_STYLUS_TOOLS_METALAYER_MODE);
highlight_view_->text_label()->SetText(text);
diff --git a/ash/system/palette/tools/metalayer_unittest.cc b/ash/system/palette/tools/metalayer_unittest.cc
index edadd06..224fdc87 100644
--- a/ash/system/palette/tools/metalayer_unittest.cc
+++ b/ash/system/palette/tools/metalayer_unittest.cc
@@ -80,7 +80,7 @@
chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_NONPRIMARY_USER,
chromeos::assistant::AssistantAllowedState::DISALLOWED_BY_INCOGNITO,
};
- const base::string16 kLoading(base::ASCIIToUTF16("loading"));
+ const std::u16string kLoading(base::ASCIIToUTF16("loading"));
// Iterate over every possible combination of states.
for (chromeos::assistant::AssistantStatus state : kStates) {
@@ -107,13 +107,13 @@
EXPECT_TRUE(view);
EXPECT_EQ(selectable, view->GetEnabled());
- const base::string16 label_text =
+ const std::u16string label_text =
static_cast<HoverHighlightView*>(view.get())
->text_label()
->GetText();
const bool label_contains_loading =
- label_text.find(kLoading) != base::string16::npos;
+ label_text.find(kLoading) != std::u16string::npos;
EXPECT_EQ(allowed && enabled && context && !ready,
label_contains_loading);
diff --git a/ash/system/pcie_peripheral/pcie_peripheral_notification_controller.cc b/ash/system/pcie_peripheral/pcie_peripheral_notification_controller.cc
index 80012c9..2502ad7 100644
--- a/ash/system/pcie_peripheral/pcie_peripheral_notification_controller.cc
+++ b/ash/system/pcie_peripheral/pcie_peripheral_notification_controller.cc
@@ -174,7 +174,7 @@
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_PERFORMANCE_LIMITED_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_PERFORMANCE_LIMITED_BODY),
- /*display_source=*/base::string16(), GURL(),
+ /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierPciePeripheral),
@@ -198,13 +198,13 @@
is_thunderbolt_only
? kPciePeripheralGuestModeNotSupportedNotificationId
: kPciePeripheralLimitedPerformanceGuestModeNotificationId,
- /*title=*/base::string16(),
+ /*title=*/std::u16string(),
is_thunderbolt_only
? l10n_util::GetStringUTF16(
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_GUEST_MODE_NOT_SUPPORTED)
: l10n_util::GetStringUTF16(
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_PERFORMANCE_LIMITED_GUEST_MODE),
- /*display_source=*/base::string16(), GURL(),
+ /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierPciePeripheral),
message_center::RichNotificationData(),
@@ -229,7 +229,7 @@
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_DEVICE_BLOCKED_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_PCIE_PERIPHERAL_NOTIFICATION_DEVICE_BLOCKED_BODY),
- /*display_source=*/base::string16(), GURL(),
+ /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierPciePeripheral),
diff --git a/ash/system/phonehub/continue_browsing_chip.cc b/ash/system/phonehub/continue_browsing_chip.cc
index a09eafc4..70105e5 100644
--- a/ash/system/phonehub/continue_browsing_chip.cc
+++ b/ash/system/phonehub/continue_browsing_chip.cc
@@ -110,7 +110,7 @@
title_label->SetFontList(
title_label->font_list().DeriveWithWeight(gfx::Font::Weight::BOLD));
- const base::string16 card_label = l10n_util::GetStringFUTF16(
+ const std::u16string card_label = l10n_util::GetStringFUTF16(
IDS_ASH_PHONE_HUB_CONTINUE_BROWSING_TAB_LABEL,
base::NumberToString16(index_ + 1), base::NumberToString16(total_count_),
metadata.title, base::UTF8ToUTF16(url_.spec()));
diff --git a/ash/system/phonehub/enable_hotspot_quick_action_controller.cc b/ash/system/phonehub/enable_hotspot_quick_action_controller.cc
index f401e68..094633a7 100644
--- a/ash/system/phonehub/enable_hotspot_quick_action_controller.cc
+++ b/ash/system/phonehub/enable_hotspot_quick_action_controller.cc
@@ -120,7 +120,7 @@
if (state == ActionState::kNoReception) {
item_->SetIconTooltip(l10n_util::GetStringUTF16(state_text_id));
} else {
- base::string16 tooltip_state =
+ std::u16string tooltip_state =
l10n_util::GetStringFUTF16(state_text_id, item_->GetItemLabel());
item_->SetIconTooltip(l10n_util::GetStringFUTF16(
IDS_ASH_PHONE_HUB_QUICK_ACTIONS_TOGGLE_TOOLTIP, item_->GetItemLabel(),
diff --git a/ash/system/phonehub/interstitial_view_button.cc b/ash/system/phonehub/interstitial_view_button.cc
index cfb373fc..1aa541d 100644
--- a/ash/system/phonehub/interstitial_view_button.cc
+++ b/ash/system/phonehub/interstitial_view_button.cc
@@ -11,7 +11,7 @@
namespace ash {
InterstitialViewButton::InterstitialViewButton(Button::PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
bool paint_background)
: RoundedLabelButton(std::move(callback), text),
paint_background_(paint_background) {}
diff --git a/ash/system/phonehub/interstitial_view_button.h b/ash/system/phonehub/interstitial_view_button.h
index 9b0c846..909a8d7 100644
--- a/ash/system/phonehub/interstitial_view_button.h
+++ b/ash/system/phonehub/interstitial_view_button.h
@@ -19,7 +19,7 @@
METADATA_HEADER(InterstitialViewButton);
InterstitialViewButton(Button::PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
bool paint_background);
InterstitialViewButton(const InterstitialViewButton&) = delete;
InterstitialViewButton& operator=(const InterstitialViewButton&) = delete;
diff --git a/ash/system/phonehub/locate_phone_quick_action_controller.cc b/ash/system/phonehub/locate_phone_quick_action_controller.cc
index 81b67a5..a72b8ff2 100644
--- a/ash/system/phonehub/locate_phone_quick_action_controller.cc
+++ b/ash/system/phonehub/locate_phone_quick_action_controller.cc
@@ -124,7 +124,7 @@
if (state == ActionState::kNotAvailable) {
item_->SetIconTooltip(l10n_util::GetStringUTF16(state_text_id));
} else {
- base::string16 tooltip_state =
+ std::u16string tooltip_state =
l10n_util::GetStringFUTF16(state_text_id, item_->GetItemLabel());
item_->SetIconTooltip(l10n_util::GetStringFUTF16(
IDS_ASH_PHONE_HUB_QUICK_ACTIONS_TOGGLE_TOOLTIP, item_->GetItemLabel(),
diff --git a/ash/system/phonehub/onboarding_view.cc b/ash/system/phonehub/onboarding_view.cc
index c50d1a7b..d43d6b0 100644
--- a/ash/system/phonehub/onboarding_view.cc
+++ b/ash/system/phonehub/onboarding_view.cc
@@ -135,9 +135,9 @@
// Adds title and description.
SetTitle(l10n_util::GetStringUTF16(
IDS_ASH_PHONE_HUB_ONBOARDING_DISMISS_DIALOG_TITLE));
- base::string16 part1 = l10n_util::GetStringUTF16(
+ std::u16string part1 = l10n_util::GetStringUTF16(
IDS_ASH_PHONE_HUB_ONBOARDING_DISMISS_DIALOG_DESCRIPTION_PART_1);
- base::string16 part2 = l10n_util::GetStringUTF16(
+ std::u16string part2 = l10n_util::GetStringUTF16(
IDS_ASH_PHONE_HUB_ONBOARDING_DISMISS_DIALOG_DESCRIPTION_PART_2);
// Uses "\n" to create a newline separator between two text paragraphs.
SetDescription(base::StrCat({part1, base::ASCIIToUTF16("\n\n"), part2}));
diff --git a/ash/system/phonehub/phone_hub_interstitial_view.cc b/ash/system/phonehub/phone_hub_interstitial_view.cc
index 9d6983c..fc3b84f 100644
--- a/ash/system/phonehub/phone_hub_interstitial_view.cc
+++ b/ash/system/phonehub/phone_hub_interstitial_view.cc
@@ -149,13 +149,13 @@
image_->SetImage(image);
}
-void PhoneHubInterstitialView::SetTitle(const base::string16& title) {
+void PhoneHubInterstitialView::SetTitle(const std::u16string& title) {
// Expect a non-empty string for the title.
DCHECK(!title.empty());
title_->SetText(title);
}
-void PhoneHubInterstitialView::SetDescription(const base::string16& desc) {
+void PhoneHubInterstitialView::SetDescription(const std::u16string& desc) {
// Expect a non-empty string for the description.
DCHECK(!desc.empty());
description_->SetText(desc);
diff --git a/ash/system/phonehub/phone_hub_interstitial_view.h b/ash/system/phonehub/phone_hub_interstitial_view.h
index 0ab6c4cd..2c3fa20 100644
--- a/ash/system/phonehub/phone_hub_interstitial_view.h
+++ b/ash/system/phonehub/phone_hub_interstitial_view.h
@@ -36,8 +36,8 @@
~PhoneHubInterstitialView() override;
void SetImage(const gfx::ImageSkia& image);
- void SetTitle(const base::string16& title);
- void SetDescription(const base::string16& desc);
+ void SetTitle(const std::u16string& title);
+ void SetDescription(const std::u16string& desc);
void AddButton(std::unique_ptr<views::Button> button);
private:
diff --git a/ash/system/phonehub/phone_hub_notification_controller.cc b/ash/system/phonehub/phone_hub_notification_controller.cc
index 8240fc85..06537901 100644
--- a/ash/system/phonehub/phone_hub_notification_controller.cc
+++ b/ash/system/phonehub/phone_hub_notification_controller.cc
@@ -59,7 +59,7 @@
public:
explicit PhoneHubNotificationView(
const message_center::Notification& notification,
- const base::string16& phone_name)
+ const std::u16string& phone_name)
: message_center::NotificationViewMD(notification) {
// Add customized header.
message_center::NotificationHeaderView* header_row =
@@ -96,7 +96,7 @@
// message_center::NotificationViewMD:
void OnNotificationInputSubmit(size_t index,
- const base::string16& text) override {
+ const std::u16string& text) override {
message_center::NotificationViewMD::OnNotificationInputSubmit(index, text);
DCHECK(reply_button_);
@@ -105,7 +105,7 @@
// text input.
inline_reply_->SetVisible(false);
action_buttons_row_->SetVisible(true);
- inline_reply_->textfield()->SetText(base::string16());
+ inline_reply_->textfield()->SetText(std::u16string());
// Briefly disable reply button.
reply_button_->SetEnabled(false);
@@ -171,7 +171,7 @@
}
void Click(const base::Optional<int>& button_index,
- const base::Optional<base::string16>& reply) override {
+ const base::Optional<std::u16string>& reply) override {
if (!controller_)
return;
@@ -267,10 +267,10 @@
}
}
-const base::string16 PhoneHubNotificationController::GetPhoneName() const {
+const std::u16string PhoneHubNotificationController::GetPhoneName() const {
if (!phone_model_)
- return base::string16();
- return phone_model_->phone_name().value_or(base::string16());
+ return std::u16string();
+ return phone_model_->phone_name().value_or(std::u16string());
}
void PhoneHubNotificationController::OnFeatureStatusChanged() {
@@ -351,7 +351,7 @@
IDS_ASH_PHONE_HUB_NOTIFICATION_HOTSPOT_FAILED_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_PHONE_HUB_NOTIFICATION_HOTSPOT_FAILED_MESSAGE),
- base::string16() /*display_source */, GURL() /* origin_url */,
+ std::u16string() /*display_source */, GURL() /* origin_url */,
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kPhoneHubInstantTetherNotificationId),
@@ -393,7 +393,7 @@
void PhoneHubNotificationController::SendInlineReply(
int64_t notification_id,
- const base::string16& inline_reply_text) {
+ const std::u16string& inline_reply_text) {
CHECK(manager_);
manager_->SendInlineReply(notification_id, inline_reply_text);
phone_hub_metrics::LogNotificationInteraction(
@@ -443,12 +443,12 @@
auto notification_type = message_center::NOTIFICATION_TYPE_CUSTOM;
- base::string16 title = notification->title().value_or(base::string16());
- base::string16 message =
- notification->text_content().value_or(base::string16());
+ std::u16string title = notification->title().value_or(std::u16string());
+ std::u16string message =
+ notification->text_content().value_or(std::u16string());
auto app_metadata = notification->app_metadata();
- base::string16 display_source = app_metadata.visible_app_name;
+ std::u16string display_source = app_metadata.visible_app_name;
message_center::RichNotificationData optional_fields;
optional_fields.small_image = app_metadata.icon;
@@ -473,7 +473,7 @@
message_center::ButtonInfo reply_button;
reply_button.title = l10n_util::GetStringUTF16(
IDS_ASH_PHONE_HUB_NOTIFICATION_INLINE_REPLY_BUTTON);
- reply_button.placeholder = base::string16();
+ reply_button.placeholder = std::u16string();
optional_fields.buttons.push_back(reply_button);
if (TrayPopupUtils::CanOpenWebUISettings()) {
@@ -513,7 +513,7 @@
const message_center::Notification& notification) {
DCHECK_EQ(kNotificationCustomViewType, notification.custom_view_type());
- base::string16 phone_name = base::string16();
+ std::u16string phone_name = std::u16string();
if (notification_controller)
phone_name = notification_controller->GetPhoneName();
diff --git a/ash/system/phonehub/phone_hub_notification_controller.h b/ash/system/phonehub/phone_hub_notification_controller.h
index 63bbdd42..709229c 100644
--- a/ash/system/phonehub/phone_hub_notification_controller.h
+++ b/ash/system/phonehub/phone_hub_notification_controller.h
@@ -46,7 +46,7 @@
// notifications.
void SetManager(chromeos::phonehub::PhoneHubManager* phone_hub_manager);
- const base::string16 GetPhoneName() const;
+ const std::u16string GetPhoneName() const;
private:
FRIEND_TEST_ALL_PREFIXES(PhoneHubNotificationControllerTest,
@@ -76,7 +76,7 @@
void DismissNotification(int64_t notification_id);
void HandleNotificationBodyClick(int64_t notification_id);
void SendInlineReply(int64_t notification_id,
- const base::string16& inline_reply_text);
+ const std::u16string& inline_reply_text);
// Logs the number of PhoneHub notifications.
void LogNotificationCount();
diff --git a/ash/system/phonehub/phone_hub_notification_controller_unittest.cc b/ash/system/phonehub/phone_hub_notification_controller_unittest.cc
index f4be821c..7e55239 100644
--- a/ash/system/phonehub/phone_hub_notification_controller_unittest.cc
+++ b/ash/system/phonehub/phone_hub_notification_controller_unittest.cc
@@ -179,8 +179,8 @@
TEST_F(PhoneHubNotificationControllerTest, InlineReply) {
notification_manager_->SetNotificationsInternal(fake_notifications_);
- const base::string16 kInlineReply0 = base::UTF8ToUTF16("inline reply 0");
- const base::string16 kInlineReply1 = base::UTF8ToUTF16("inline reply 1");
+ const std::u16string kInlineReply0 = base::UTF8ToUTF16("inline reply 0");
+ const std::u16string kInlineReply1 = base::UTF8ToUTF16("inline reply 1");
message_center_->ClickOnNotificationButtonWithReply(kCrOSNotificationId0, 0,
kInlineReply0);
message_center_->ClickOnNotificationButtonWithReply(kCrOSNotificationId1, 0,
@@ -267,7 +267,7 @@
notification_manager_->SetNotificationsInternal(fake_notifications_);
auto* notification = FindNotification(kCrOSNotificationId0);
- const base::string16 expected_phone_name = base::UTF8ToUTF16("Phone name");
+ const std::u16string expected_phone_name = base::UTF8ToUTF16("Phone name");
phone_hub_manager_.mutable_phone_model()->SetPhoneName(expected_phone_name);
auto notification_view =
@@ -297,7 +297,7 @@
views::View* reply_button = action_buttons_row->children()[0];
// Initially, reply button should be disabled after replied.
- const base::string16 kInlineReply0 = base::UTF8ToUTF16("inline reply 0");
+ const std::u16string kInlineReply0 = base::UTF8ToUTF16("inline reply 0");
notification_view_md->OnNotificationInputSubmit(0, kInlineReply0);
EXPECT_FALSE(reply_button->GetEnabled());
diff --git a/ash/system/phonehub/phone_hub_tray.cc b/ash/system/phonehub/phone_hub_tray.cc
index f649861..ac9632efa 100644
--- a/ash/system/phonehub/phone_hub_tray.cc
+++ b/ash/system/phonehub/phone_hub_tray.cc
@@ -75,7 +75,7 @@
CloseBubble();
}
-base::string16 PhoneHubTray::GetAccessibleNameForTray() {
+std::u16string PhoneHubTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_TRAY_ACCESSIBLE_NAME);
}
@@ -89,7 +89,7 @@
CloseBubble();
}
-base::string16 PhoneHubTray::GetAccessibleNameForBubble() {
+std::u16string PhoneHubTray::GetAccessibleNameForBubble() {
return GetAccessibleNameForTray();
}
diff --git a/ash/system/phonehub/phone_hub_tray.h b/ash/system/phonehub/phone_hub_tray.h
index c82bb5d1..e2668c68 100644
--- a/ash/system/phonehub/phone_hub_tray.h
+++ b/ash/system/phonehub/phone_hub_tray.h
@@ -46,7 +46,7 @@
// TrayBackgroundView:
void ClickedOutsideBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void AnchorUpdated() override;
@@ -72,7 +72,7 @@
private:
// TrayBubbleView::Delegate:
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
bool ShouldEnableExtraKeyboardAccessibility() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
diff --git a/ash/system/phonehub/phone_status_view.cc b/ash/system/phonehub/phone_status_view.cc
index c9cd872..1776342 100644
--- a/ash/system/phonehub/phone_status_view.cc
+++ b/ash/system/phonehub/phone_status_view.cc
@@ -189,7 +189,7 @@
void PhoneStatusView::Update() {
// Set phone name text and elide it if needed.
phone_name_label_->SetText(
- gfx::ElideText(phone_model_->phone_name().value_or(base::string16()),
+ gfx::ElideText(phone_model_->phone_name().value_or(std::u16string()),
phone_name_label_->font_list(), kPhoneNameLabelWidthMax,
gfx::ELIDE_TAIL));
@@ -214,7 +214,7 @@
AshColorProvider::ContentLayerType::kIconColorPrimary);
gfx::ImageSkia signal_image;
- base::string16 tooltip_text;
+ std::u16string tooltip_text;
switch (phone_status.mobile_status()) {
case PhoneStatusModel::MobileStatus::kNoSim:
signal_image = CreateVectorIcon(kPhoneHubMobileNoSimIcon, primary_color);
@@ -323,12 +323,12 @@
charging_tooltip_id = IDS_ASH_PHONE_HUB_BATTERY_STATUS_CHARGING_USB;
break;
}
- base::string16 charging_tooltip =
+ std::u16string charging_tooltip =
l10n_util::GetStringUTF16(charging_tooltip_id);
bool battery_saver_on = phone_status.battery_saver_state() ==
PhoneStatusModel::BatterySaverState::kOn;
- base::string16 batter_saver_tooltip =
+ std::u16string batter_saver_tooltip =
battery_saver_on
? l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_BATTERY_SAVER_ON)
: l10n_util::GetStringUTF16(IDS_ASH_PHONE_HUB_BATTERY_SAVER_OFF);
@@ -344,7 +344,7 @@
// Clear battery status.
battery_icon_->SetImage(gfx::ImageSkia());
- battery_label_->SetText(base::string16());
+ battery_label_->SetText(std::u16string());
}
void PhoneStatusView::ConfigureTriViewContainer(TriView::Container container) {
diff --git a/ash/system/phonehub/phone_status_view_unittest.cc b/ash/system/phonehub/phone_status_view_unittest.cc
index 5b97b28..328beb4 100644
--- a/ash/system/phonehub/phone_status_view_unittest.cc
+++ b/ash/system/phonehub/phone_status_view_unittest.cc
@@ -61,9 +61,9 @@
};
TEST_F(PhoneStatusViewTest, PhoneStatusLabelsContent) {
- base::string16 expected_name_text = base::UTF8ToUTF16("Test Phone Name");
- base::string16 expected_provider_text = base::UTF8ToUTF16("Test Provider");
- base::string16 expected_battery_text = base::UTF8ToUTF16("10%");
+ std::u16string expected_name_text = base::UTF8ToUTF16("Test Phone Name");
+ std::u16string expected_provider_text = base::UTF8ToUTF16("Test Provider");
+ std::u16string expected_battery_text = base::UTF8ToUTF16("10%");
phone_model_.SetPhoneName(expected_name_text);
diff --git a/ash/system/phonehub/quick_action_item.cc b/ash/system/phonehub/quick_action_item.cc
index bdd79f0..8a3a836d 100644
--- a/ash/system/phonehub/quick_action_item.cc
+++ b/ash/system/phonehub/quick_action_item.cc
@@ -84,7 +84,7 @@
QuickActionItem::~QuickActionItem() = default;
-void QuickActionItem::SetSubLabel(const base::string16& sub_label) {
+void QuickActionItem::SetSubLabel(const std::u16string& sub_label) {
sub_label_->SetText(sub_label);
}
@@ -99,7 +99,7 @@
icon_button_->SetVectorIcon(is_on ? icon_on_ : icon_off_);
}
-void QuickActionItem::SetIconTooltip(const base::string16& text) {
+void QuickActionItem::SetIconTooltip(const std::u16string& text) {
icon_button_->SetTooltipText(text);
}
@@ -112,7 +112,7 @@
return icon_button_->toggled();
}
-const base::string16& QuickActionItem::GetItemLabel() const {
+const std::u16string& QuickActionItem::GetItemLabel() const {
return label_->GetText();
}
diff --git a/ash/system/phonehub/quick_action_item.h b/ash/system/phonehub/quick_action_item.h
index 9c69ed8..a285afbc 100644
--- a/ash/system/phonehub/quick_action_item.h
+++ b/ash/system/phonehub/quick_action_item.h
@@ -40,7 +40,7 @@
QuickActionItem operator=(QuickActionItem&) = delete;
// Set the text of sub-label shown below the label.
- void SetSubLabel(const base::string16& sub_label);
+ void SetSubLabel(const std::u16string& sub_label);
// Set the color of sub-label shown below the label.
void SetSubLabelColor(SkColor color);
@@ -49,7 +49,7 @@
void SetIcon(bool is_on);
// Set the tooltip text of the icon button.
- void SetIconTooltip(const base::string16& text);
+ void SetIconTooltip(const std::u16string& text);
// Change the toggled state. If toggled, the background color of the circle
// will change.
@@ -57,7 +57,7 @@
bool IsToggled() const;
// Get the title/label text of the item.
- const base::string16& GetItemLabel() const;
+ const std::u16string& GetItemLabel() const;
// Set the item to be enabled or disabled. When disabled, the button cannot be
// clicked and the labels are greyed out.
diff --git a/ash/system/phonehub/silence_phone_quick_action_controller.cc b/ash/system/phonehub/silence_phone_quick_action_controller.cc
index 3c85e65b..a4218c3 100644
--- a/ash/system/phonehub/silence_phone_quick_action_controller.cc
+++ b/ash/system/phonehub/silence_phone_quick_action_controller.cc
@@ -121,7 +121,7 @@
if (state == ActionState::kDisabled) {
item_->SetIconTooltip(l10n_util::GetStringUTF16(state_text_id));
} else {
- base::string16 tooltip_state =
+ std::u16string tooltip_state =
l10n_util::GetStringFUTF16(state_text_id, item_->GetItemLabel());
item_->SetIconTooltip(l10n_util::GetStringFUTF16(
IDS_ASH_PHONE_HUB_QUICK_ACTIONS_TOGGLE_TOOLTIP, item_->GetItemLabel(),
diff --git a/ash/system/power/battery_notification.cc b/ash/system/power/battery_notification.cc
index f2c6edc..4e18850b 100644
--- a/ash/system/power/battery_notification.cc
+++ b/ash/system/power/battery_notification.cc
@@ -66,21 +66,21 @@
PowerNotificationController::NotificationState notification_state) {
const PowerStatus& status = *PowerStatus::Get();
- base::string16 message = base::i18n::MessageFormatter::FormatWithNumberedArgs(
+ std::u16string message = base::i18n::MessageFormatter::FormatWithNumberedArgs(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BATTERY_PERCENT),
static_cast<double>(status.GetRoundedBatteryPercent()) / 100.0);
const base::Optional<base::TimeDelta> time =
status.IsBatteryCharging() ? status.GetBatteryTimeToFull()
: status.GetBatteryTimeToEmpty();
- base::string16 time_message;
+ std::u16string time_message;
if (status.IsUsbChargerConnected()) {
time_message = l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_BATTERY_CHARGING_UNRELIABLE);
} else if (time && power_utils::ShouldDisplayBatteryTime(*time) &&
!status.IsBatteryDischargingOnLinePower()) {
if (status.IsBatteryCharging()) {
- base::string16 duration;
+ std::u16string duration;
if (!TimeDurationFormat(*time, base::DURATION_WIDTH_NARROW, &duration))
LOG(ERROR) << "Failed to format duration " << *time;
time_message = l10n_util::GetStringFUTF16(
@@ -97,7 +97,7 @@
std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kBatteryNotificationId,
- base::string16(), message, base::string16(), GURL(),
+ std::u16string(), message, std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierBattery),
message_center::RichNotificationData(), nullptr,
diff --git a/ash/system/power/dual_role_notification.cc b/ash/system/power/dual_role_notification.cc
index 57be7d40d..324d0e13 100644
--- a/ash/system/power/dual_role_notification.cc
+++ b/ash/system/power/dual_role_notification.cc
@@ -111,7 +111,7 @@
}
std::unique_ptr<Notification> DualRoleNotification::CreateNotification() {
- base::string16 title;
+ std::u16string title;
if (dual_role_source_) {
title = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_CHARGING_FROM_DUAL_ROLE_TITLE,
@@ -134,7 +134,7 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kDualRoleNotificationId, title,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DUAL_ROLE_MESSAGE),
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierDualRole),
message_center::RichNotificationData(), std::move(delegate),
diff --git a/ash/system/power/peripheral_battery_listener.cc b/ash/system/power/peripheral_battery_listener.cc
index 15770ca..9b72bea 100644
--- a/ash/system/power/peripheral_battery_listener.cc
+++ b/ash/system/power/peripheral_battery_listener.cc
@@ -112,7 +112,7 @@
PeripheralBatteryListener::BatteryInfo::BatteryInfo(
const std::string& key,
- const base::string16& name,
+ const std::u16string& name,
base::Optional<uint8_t> level,
base::TimeTicks last_update_timestamp,
PeripheralType type,
diff --git a/ash/system/power/peripheral_battery_listener.h b/ash/system/power/peripheral_battery_listener.h
index 3e6462f..4fcd20b 100644
--- a/ash/system/power/peripheral_battery_listener.h
+++ b/ash/system/power/peripheral_battery_listener.h
@@ -67,7 +67,7 @@
BatteryInfo();
BatteryInfo(const std::string& key,
- const base::string16& name,
+ const std::u16string& name,
base::Optional<uint8_t> level,
base::TimeTicks last_update_timestamp,
PeripheralType type,
@@ -81,7 +81,7 @@
std::string key;
// Human readable name for the device. It is changeable.
- base::string16 name;
+ std::u16string name;
// Battery level within range [0, 100], or unset. This is changeable.
// TODO(kenalba): explain when we might have an unset state.
base::Optional<uint8_t> level;
diff --git a/ash/system/power/peripheral_battery_notifier.cc b/ash/system/power/peripheral_battery_notifier.cc
index 66e0200..cac0857 100644
--- a/ash/system/power/peripheral_battery_notifier.cc
+++ b/ash/system/power/peripheral_battery_notifier.cc
@@ -56,15 +56,15 @@
// stylus notifications and the non stylus notifications.
struct NotificationParams {
std::string id;
- base::string16 title;
- base::string16 message;
+ std::u16string title;
+ std::u16string message;
std::string notifier_name;
GURL url;
const gfx::VectorIcon* icon;
};
NotificationParams GetNonStylusNotificationParams(const std::string& map_key,
- const base::string16& name,
+ const std::u16string& name,
uint8_t battery_level,
bool is_bluetooth) {
return NotificationParams{
@@ -230,7 +230,7 @@
auto notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, params.id, params.title,
- params.message, base::string16(), params.url,
+ params.message, std::u16string(), params.url,
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
params.notifier_name),
message_center::RichNotificationData(), std::move(delegate), *params.icon,
diff --git a/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc b/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
index 1e660d2..2c9cdc94 100644
--- a/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
+++ b/ash/system/power/peripheral_battery_notifier_listener_integration_test.cc
@@ -30,13 +30,13 @@
namespace {
-const base::string16& NotificationMessagePrefix() {
- static const base::string16 prefix(base::ASCIIToUTF16("Battery low ("));
+const std::u16string& NotificationMessagePrefix() {
+ static const std::u16string prefix(base::ASCIIToUTF16("Battery low ("));
return prefix;
}
-const base::string16& NotificationMessageSuffix() {
- static const base::string16 suffix(base::ASCIIToUTF16("%)"));
+const std::u16string& NotificationMessageSuffix() {
+ static const std::u16string suffix(base::ASCIIToUTF16("%)"));
return suffix;
}
@@ -115,7 +115,7 @@
// Extracts the battery percentage from the message of a notification.
uint8_t ExtractBatteryPercentage(message_center::Notification* notification) {
- const base::string16& message = notification->message();
+ const std::u16string& message = notification->message();
EXPECT_TRUE(base::StartsWith(message, NotificationMessagePrefix(),
base::CompareCase::SENSITIVE));
EXPECT_TRUE(base::EndsWith(message, NotificationMessageSuffix(),
diff --git a/ash/system/power/peripheral_battery_notifier_unittest.cc b/ash/system/power/peripheral_battery_notifier_unittest.cc
index 8fd96e96..c13865a 100644
--- a/ash/system/power/peripheral_battery_notifier_unittest.cc
+++ b/ash/system/power/peripheral_battery_notifier_unittest.cc
@@ -27,13 +27,13 @@
namespace {
-const base::string16& NotificationMessagePrefix() {
- static const base::string16 prefix(base::ASCIIToUTF16("Battery low ("));
+const std::u16string& NotificationMessagePrefix() {
+ static const std::u16string prefix(base::ASCIIToUTF16("Battery low ("));
return prefix;
}
-const base::string16& NotificationMessageSuffix() {
- static const base::string16 suffix(base::ASCIIToUTF16("%)"));
+const std::u16string& NotificationMessageSuffix() {
+ static const std::u16string suffix(base::ASCIIToUTF16("%)"));
return suffix;
}
@@ -78,7 +78,7 @@
// Extracts the battery percentage from the message of a notification.
uint8_t ExtractBatteryPercentage(message_center::Notification* notification) {
- const base::string16& message = notification->message();
+ const std::u16string& message = notification->message();
EXPECT_TRUE(base::StartsWith(message, NotificationMessagePrefix(),
base::CompareCase::SENSITIVE));
EXPECT_TRUE(base::EndsWith(message, NotificationMessageSuffix(),
diff --git a/ash/system/power/power_button_menu_item_view.cc b/ash/system/power/power_button_menu_item_view.cc
index c73eac1d..e1314205 100644
--- a/ash/system/power/power_button_menu_item_view.cc
+++ b/ash/system/power/power_button_menu_item_view.cc
@@ -40,7 +40,7 @@
PowerButtonMenuItemView::PowerButtonMenuItemView(
PressedCallback callback,
const gfx::VectorIcon& icon,
- const base::string16& title_text)
+ const std::u16string& title_text)
: views::ImageButton(std::move(callback)), icon_(icon) {
SetFocusBehavior(FocusBehavior::ALWAYS);
SetFocusPainter(nullptr);
diff --git a/ash/system/power/power_button_menu_item_view.h b/ash/system/power/power_button_menu_item_view.h
index f4bd13e..e5e933a 100644
--- a/ash/system/power/power_button_menu_item_view.h
+++ b/ash/system/power/power_button_menu_item_view.h
@@ -37,7 +37,7 @@
PowerButtonMenuItemView(PressedCallback callback,
const gfx::VectorIcon& icon,
- const base::string16& title_text);
+ const std::u16string& title_text);
PowerButtonMenuItemView(const PowerButtonMenuItemView&) = delete;
PowerButtonMenuItemView& operator=(const PowerButtonMenuItemView&) = delete;
~PowerButtonMenuItemView() override;
diff --git a/ash/system/power/power_button_menu_view.cc b/ash/system/power/power_button_menu_view.cc
index 8ea9a573..fe52fe871 100644
--- a/ash/system/power/power_button_menu_view.cc
+++ b/ash/system/power/power_button_menu_view.cc
@@ -149,7 +149,7 @@
auto add_remove_item =
[this](bool create, PowerButtonMenuActionType action,
base::RepeatingClosure callback, const gfx::VectorIcon& icon,
- const base::string16& string,
+ const std::u16string& string,
PowerButtonMenuItemView** out_item_ptr) -> void {
// If an item needs to be created and exists, or needs to be destroyed but
// does not exist, there is nothing to be done.
diff --git a/ash/system/power/power_notification_controller.cc b/ash/system/power/power_notification_controller.cc
index 7a9c8e9..10939b5 100644
--- a/ash/system/power/power_notification_controller.cc
+++ b/ash/system/power/power_notification_controller.cc
@@ -148,7 +148,7 @@
ui::GetChromeOSDeviceName(),
base::FormatDouble(
PowerStatus::Get()->GetPreferredMinimumPower(), 0)),
- base::string16(), GURL(),
+ std::u16string(), GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT, kNotifierPower),
message_center::RichNotificationData(),
diff --git a/ash/system/power/power_status.cc b/ash/system/power/power_status.cc
index 30d6580..56ae71b 100644
--- a/ash/system/power/power_status.cc
+++ b/ash/system/power/power_status.cc
@@ -31,7 +31,7 @@
static PowerStatus* g_power_status = nullptr;
-base::string16 GetBatteryTimeAccessibilityString(int hour, int min) {
+std::u16string GetBatteryTimeAccessibilityString(int hour, int min) {
DCHECK(hour || min);
if (hour && !min) {
return ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_DURATION,
@@ -286,14 +286,14 @@
return gfx::ImageSkia(base::WrapUnique(source), source->size());
}
-base::string16 PowerStatus::GetAccessibleNameString(
+std::u16string PowerStatus::GetAccessibleNameString(
bool full_description) const {
if (IsBatteryFull()) {
return l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_BATTERY_FULL_CHARGE_ACCESSIBLE);
}
- base::string16 battery_percentage_accessible = l10n_util::GetStringFUTF16(
+ std::u16string battery_percentage_accessible = l10n_util::GetStringFUTF16(
IsBatteryCharging()
? IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_CHARGING_ACCESSIBLE
: IDS_ASH_STATUS_TRAY_BATTERY_PERCENT_ACCESSIBLE,
@@ -301,7 +301,7 @@
if (!full_description)
return battery_percentage_accessible;
- base::string16 battery_time_accessible = base::string16();
+ std::u16string battery_time_accessible = std::u16string();
const base::Optional<base::TimeDelta> time =
IsBatteryCharging() ? GetBatteryTimeToFull() : GetBatteryTimeToEmpty();
@@ -315,7 +315,7 @@
!IsBatteryDischargingOnLinePower()) {
int hour = 0, min = 0;
power_utils::SplitTimeIntoHoursAndMinutes(*time, &hour, &min);
- base::string16 minute =
+ std::u16string minute =
min < 10 ? base::ASCIIToUTF16("0") + base::NumberToString16(min)
: base::NumberToString16(min);
battery_time_accessible = l10n_util::GetStringFUTF16(
@@ -330,10 +330,10 @@
battery_time_accessible;
}
-std::pair<base::string16, base::string16> PowerStatus::GetStatusStrings()
+std::pair<std::u16string, std::u16string> PowerStatus::GetStatusStrings()
const {
- base::string16 percentage;
- base::string16 status;
+ std::u16string percentage;
+ std::u16string status;
if (IsBatteryFull()) {
status = l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_BATTERY_FULL);
} else {
@@ -350,7 +350,7 @@
: GetBatteryTimeToEmpty();
if (time && power_utils::ShouldDisplayBatteryTime(*time) &&
!IsBatteryDischargingOnLinePower()) {
- base::string16 duration;
+ std::u16string duration;
if (!base::TimeDurationFormat(*time, base::DURATION_WIDTH_NUMERIC,
&duration))
LOG(ERROR) << "Failed to format duration " << *time;
@@ -366,9 +366,9 @@
return std::make_pair(percentage, status);
}
-base::string16 PowerStatus::GetInlinedStatusString() const {
- base::string16 percentage_text;
- base::string16 status_text;
+std::u16string PowerStatus::GetInlinedStatusString() const {
+ std::u16string percentage_text;
+ std::u16string status_text;
std::tie(percentage_text, status_text) = GetStatusStrings();
if (!percentage_text.empty() && !status_text.empty()) {
diff --git a/ash/system/power/power_status.h b/ash/system/power/power_status.h
index af0e7245..7d85ad8 100644
--- a/ash/system/power/power_status.h
+++ b/ash/system/power/power_status.h
@@ -201,17 +201,17 @@
SkColor fg_color);
// Returns a string describing the current state for accessibility.
- base::string16 GetAccessibleNameString(bool full_description) const;
+ std::u16string GetAccessibleNameString(bool full_description) const;
// Returns status strings that are generated by current PowerStatus.
// The first string is percentage e.g. "53%" and the second one is status in
// words e.g. "5:00 left". Depending on the status, one of them may return
// empty string.
- std::pair<base::string16, base::string16> GetStatusStrings() const;
+ std::pair<std::u16string, std::u16string> GetStatusStrings() const;
// Returns status strings that are generated by current PowerStatus.
// For example, "53% - 5:00 left".
- base::string16 GetInlinedStatusString() const;
+ std::u16string GetInlinedStatusString() const;
// Returns the device's preferred minimum power input in watts (W).
double GetPreferredMinimumPower() const;
diff --git a/ash/system/power/tray_power.cc b/ash/system/power/tray_power.cc
index ec8e774..18fc139 100644
--- a/ash/system/power/tray_power.cc
+++ b/ash/system/power/tray_power.cc
@@ -74,7 +74,7 @@
return GetLocalBounds().Contains(point) ? this : nullptr;
}
-base::string16 PowerTrayView::GetTooltipText(const gfx::Point& p) const {
+std::u16string PowerTrayView::GetTooltipText(const gfx::Point& p) const {
return tooltip_;
}
diff --git a/ash/system/power/tray_power.h b/ash/system/power/tray_power.h
index fadc8ebe2..98e5e7f 100644
--- a/ash/system/power/tray_power.h
+++ b/ash/system/power/tray_power.h
@@ -28,7 +28,7 @@
gfx::Size CalculatePreferredSize() const override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
const char* GetClassName() const override;
void OnThemeChanged() override;
@@ -45,8 +45,8 @@
void UpdateStatus();
void UpdateImage();
- base::string16 accessible_name_;
- base::string16 tooltip_;
+ std::u16string accessible_name_;
+ std::u16string tooltip_;
base::Optional<PowerStatus::BatteryImageInfo> info_;
session_manager::SessionState icon_session_state_color_ =
session_manager::SessionState::UNKNOWN;
diff --git a/ash/system/privacy_screen/privacy_screen_feature_pod_controller.cc b/ash/system/privacy_screen/privacy_screen_feature_pod_controller.cc
index edc6512..c9e4158 100644
--- a/ash/system/privacy_screen/privacy_screen_feature_pod_controller.cc
+++ b/ash/system/privacy_screen/privacy_screen_feature_pod_controller.cc
@@ -68,7 +68,7 @@
button_->SetLabel(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_LABEL));
- base::string16 tooltip_state;
+ std::u16string tooltip_state;
if (is_enabled) {
button_->SetSubLabel(l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_ON_SUBLABEL));
diff --git a/ash/system/privacy_screen/privacy_screen_toast_controller.cc b/ash/system/privacy_screen/privacy_screen_toast_controller.cc
index b516595..7df6b065 100644
--- a/ash/system/privacy_screen/privacy_screen_toast_controller.cc
+++ b/ash/system/privacy_screen/privacy_screen_toast_controller.cc
@@ -104,9 +104,9 @@
mouse_hovered_ = false;
}
-base::string16 PrivacyScreenToastController::GetAccessibleNameForBubble() {
+std::u16string PrivacyScreenToastController::GetAccessibleNameForBubble() {
if (!toast_view_)
- return base::string16();
+ return std::u16string();
return toast_view_->GetAccessibleName();
}
diff --git a/ash/system/privacy_screen/privacy_screen_toast_controller.h b/ash/system/privacy_screen/privacy_screen_toast_controller.h
index 8d79766..18fa4c6 100644
--- a/ash/system/privacy_screen/privacy_screen_toast_controller.h
+++ b/ash/system/privacy_screen/privacy_screen_toast_controller.h
@@ -51,7 +51,7 @@
void BubbleViewDestroyed() override;
void OnMouseEnteredView() override;
void OnMouseExitedView() override;
- base::string16 GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForBubble() override;
// PrivacyScreenController::Observer:
void OnPrivacyScreenSettingChanged(bool enabled) override;
diff --git a/ash/system/privacy_screen/privacy_screen_toast_view.cc b/ash/system/privacy_screen/privacy_screen_toast_view.cc
index 1d8a0f0..5534395 100644
--- a/ash/system/privacy_screen/privacy_screen_toast_view.cc
+++ b/ash/system/privacy_screen/privacy_screen_toast_view.cc
@@ -145,7 +145,7 @@
button_->SetToggled(enabled);
label_->SetPrivacyScreenEnabled(enabled, managed);
- base::string16 state = l10n_util::GetStringUTF16(
+ std::u16string state = l10n_util::GetStringUTF16(
is_enabled_ ? IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_ON_STATE
: IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_OFF_STATE);
button_->SetTooltipText(l10n_util::GetStringFUTF16(
@@ -154,14 +154,14 @@
Layout();
}
-base::string16 PrivacyScreenToastView::GetAccessibleName() {
- base::string16 enabled_state = l10n_util::GetStringUTF16(
+std::u16string PrivacyScreenToastView::GetAccessibleName() {
+ std::u16string enabled_state = l10n_util::GetStringUTF16(
is_enabled_ ? IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_ON_STATE
: IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_OFF_STATE);
- base::string16 managed_state =
+ std::u16string managed_state =
is_managed_ ? l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_ENTERPRISE_MANAGED)
- : base::string16();
+ : std::u16string();
return l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_PRIVACY_SCREEN_TOAST_ACCESSIBILITY_TEXT,
enabled_state, managed_state);
diff --git a/ash/system/privacy_screen/privacy_screen_toast_view.h b/ash/system/privacy_screen/privacy_screen_toast_view.h
index 841f687..71b2e17 100644
--- a/ash/system/privacy_screen/privacy_screen_toast_view.h
+++ b/ash/system/privacy_screen/privacy_screen_toast_view.h
@@ -30,7 +30,7 @@
void SetPrivacyScreenEnabled(bool enabled, bool managed);
// Returns the accessible name for the view.
- base::string16 GetAccessibleName();
+ std::u16string GetAccessibleName();
// Returns true if the toggle button is focused.
bool IsButtonFocused() const;
diff --git a/ash/system/rotation/rotation_lock_feature_pod_controller.cc b/ash/system/rotation/rotation_lock_feature_pod_controller.cc
index d69eb30..bbb6683 100644
--- a/ash/system/rotation/rotation_lock_feature_pod_controller.cc
+++ b/ash/system/rotation/rotation_lock_feature_pod_controller.cc
@@ -67,7 +67,7 @@
button_->SetToggled(rotation_locked);
- base::string16 tooltip_state;
+ std::u16string tooltip_state;
if (rotation_locked && is_portrait) {
button_->SetVectorIcon(kUnifiedMenuRotationLockPortraitIcon);
diff --git a/ash/system/screen_layout_observer.cc b/ash/system/screen_layout_observer.cc
index f281530..2ff5f9e 100644
--- a/ash/system/screen_layout_observer.cc
+++ b/ash/system/screen_layout_observer.cc
@@ -47,12 +47,12 @@
return Shell::Get()->display_manager();
}
-base::string16 GetDisplayName(int64_t display_id) {
+std::u16string GetDisplayName(int64_t display_id) {
return base::UTF8ToUTF16(
GetDisplayManager()->GetDisplayNameForId(display_id));
}
-base::string16 GetDisplaySize(int64_t display_id) {
+std::u16string GetDisplaySize(int64_t display_id) {
display::DisplayManager* display_manager = GetDisplayManager();
// We don't show display size for mirrored display. Fallback
@@ -63,7 +63,7 @@
display_manager->IsInMirrorMode() && base::Contains(id_list, display_id);
DCHECK(!mirroring);
if (mirroring)
- return base::string16();
+ return std::u16string();
const display::Display& display =
display_manager->GetDisplayForId(display_id);
@@ -91,7 +91,7 @@
// Returns the name of the currently connected external display whose ID is
// |external_display_id|. This should not be used when the external display is
// used for mirroring.
-base::string16 GetExternalDisplayName(int64_t external_display_id) {
+std::u16string GetExternalDisplayName(int64_t external_display_id) {
DCHECK(!display::Display::IsInternalDisplayId(external_display_id));
display::DisplayManager* display_manager = GetDisplayManager();
@@ -102,7 +102,7 @@
// The external display name may have an annotation of "(width x height)" in
// case that the display is rotated or its resolution is changed.
- base::string16 name = GetDisplayName(external_display_id);
+ std::u16string name = GetDisplayName(external_display_id);
const display::ManagedDisplayInfo& display_info =
display_manager->GetDisplayInfo(external_display_id);
if (display_info.GetActiveRotation() != display::Display::ROTATE_0 ||
@@ -140,10 +140,10 @@
// Returns the notification message that should be shown when mirror display
// mode is entered.
-base::string16 GetEnterMirrorModeMessage() {
+std::u16string GetEnterMirrorModeMessage() {
DCHECK(GetDisplayManager()->IsInMirrorMode());
if (display::Display::HasInternalDisplay()) {
- base::string16 display_names;
+ std::u16string display_names;
for (auto& id :
GetDisplayManager()->GetMirroringDestinationDisplayIdList()) {
if (!display_names.empty())
@@ -160,26 +160,26 @@
// Returns the notification message that should be shown when unified desktop
// mode is entered.
-base::string16 GetEnterUnifiedModeMessage() {
+std::u16string GetEnterUnifiedModeMessage() {
return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_UNIFIED);
}
// Returns the notification message that should be shown when unified desktop
// mode is exited.
-base::string16 GetExitUnifiedModeMessage() {
+std::u16string GetExitUnifiedModeMessage() {
return l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_UNIFIED_EXITING);
}
-base::string16 GetDisplayRemovedMessage(
+std::u16string GetDisplayRemovedMessage(
const display::ManagedDisplayInfo& removed_display_info,
- base::string16* out_additional_message) {
+ std::u16string* out_additional_message) {
return l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DISPLAY_REMOVED,
base::UTF8ToUTF16(removed_display_info.name()));
}
-base::string16 GetDisplayAddedMessage(int64_t added_display_id,
- base::string16* additional_message_out) {
+std::u16string GetDisplayAddedMessage(int64_t added_display_id,
+ std::u16string* additional_message_out) {
if (features::IsReduceDisplayNotificationsEnabled()) {
DCHECK(!display::Display::IsInternalDisplayId(added_display_id));
return l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_ADDED,
@@ -229,8 +229,8 @@
bool ScreenLayoutObserver::GetDisplayMessageForNotification(
const ScreenLayoutObserver::DisplayInfoMap& old_info,
bool should_notify_has_unassociated_display,
- base::string16* out_message,
- base::string16* out_additional_message) {
+ std::u16string* out_message,
+ std::u16string* out_additional_message) {
if (old_display_mode_ != current_display_mode_) {
// Ensure that user still gets notified of connecting with excessive
// displays when display mode changes. For example, for the device which is
@@ -381,8 +381,8 @@
}
void ScreenLayoutObserver::CreateOrUpdateNotification(
- const base::string16& message,
- const base::string16& additional_message) {
+ const std::u16string& message,
+ const std::u16string& additional_message) {
// Always remove the notification to make sure the notification appears
// as a popup in any situation.
message_center::MessageCenter::Get()->RemoveNotification(kNotificationId,
@@ -402,7 +402,7 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, message,
additional_message,
- base::string16(), // display_source
+ std::u16string(), // display_source
GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierDisplay),
@@ -454,8 +454,8 @@
if (!show_notifications_for_testing_)
return;
- base::string16 message;
- base::string16 additional_message;
+ std::u16string message;
+ std::u16string additional_message;
if (!GetDisplayMessageForNotification(old_info,
should_notify_has_unassociated_display,
&message, &additional_message)) {
@@ -472,8 +472,8 @@
}
bool ScreenLayoutObserver::GetExitMirrorModeMessage(
- base::string16* out_message,
- base::string16* out_additional_message) {
+ std::u16string* out_message,
+ std::u16string* out_additional_message) {
*out_message =
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DISPLAY_MIRROR_EXIT);
return true;
diff --git a/ash/system/screen_layout_observer.h b/ash/system/screen_layout_observer.h
index 0d738a0..ab0b7e2 100644
--- a/ash/system/screen_layout_observer.h
+++ b/ash/system/screen_layout_observer.h
@@ -62,17 +62,17 @@
bool GetDisplayMessageForNotification(
const DisplayInfoMap& old_info,
bool should_notify_has_unassociated_display,
- base::string16* out_message,
- base::string16* out_additional_message);
+ std::u16string* out_message,
+ std::u16string* out_additional_message);
// Creates or updates the display notification.
- void CreateOrUpdateNotification(const base::string16& message,
- const base::string16& additional_message);
+ void CreateOrUpdateNotification(const std::u16string& message,
+ const std::u16string& additional_message);
// Returns the notification message that should be shown when mirror display
// mode is exited.
- bool GetExitMirrorModeMessage(base::string16* out_message,
- base::string16* out_additional_message);
+ bool GetExitMirrorModeMessage(std::u16string* out_message,
+ std::u16string* out_additional_message);
DisplayInfoMap display_info_;
diff --git a/ash/system/screen_layout_observer_unittest.cc b/ash/system/screen_layout_observer_unittest.cc
index 5c26ac5..27074a3 100644
--- a/ash/system/screen_layout_observer_unittest.cc
+++ b/ash/system/screen_layout_observer_unittest.cc
@@ -48,16 +48,16 @@
void CloseNotification();
void ClickNotification();
- base::string16 GetDisplayNotificationText() const;
- base::string16 GetDisplayNotificationAdditionalText() const;
+ std::u16string GetDisplayNotificationText() const;
+ std::u16string GetDisplayNotificationAdditionalText() const;
- base::string16 GetFirstDisplayName();
+ std::u16string GetFirstDisplayName();
- base::string16 GetSecondDisplayName();
+ std::u16string GetSecondDisplayName();
- base::string16 GetMirroringDisplayNames();
+ std::u16string GetMirroringDisplayNames();
- base::string16 GetUnifiedDisplayName();
+ std::u16string GetUnifiedDisplayName();
bool IsNotificationShown() const;
@@ -96,32 +96,32 @@
notification->delegate()->Click(base::nullopt, base::nullopt);
}
-base::string16 ScreenLayoutObserverTest::GetDisplayNotificationText() const {
+std::u16string ScreenLayoutObserverTest::GetDisplayNotificationText() const {
const message_center::Notification* notification = GetDisplayNotification();
- return notification ? notification->title() : base::string16();
+ return notification ? notification->title() : std::u16string();
}
-base::string16 ScreenLayoutObserverTest::GetDisplayNotificationAdditionalText()
+std::u16string ScreenLayoutObserverTest::GetDisplayNotificationAdditionalText()
const {
const message_center::Notification* notification = GetDisplayNotification();
- return notification ? notification->message() : base::string16();
+ return notification ? notification->message() : std::u16string();
}
-base::string16 ScreenLayoutObserverTest::GetFirstDisplayName() {
+std::u16string ScreenLayoutObserverTest::GetFirstDisplayName() {
return base::UTF8ToUTF16(display_manager()->GetDisplayNameForId(
display_manager()->first_display_id()));
}
-base::string16 ScreenLayoutObserverTest::GetSecondDisplayName() {
+std::u16string ScreenLayoutObserverTest::GetSecondDisplayName() {
return base::UTF8ToUTF16(display_manager()->GetDisplayNameForId(
display::test::DisplayManagerTestApi(display_manager())
.GetSecondaryDisplay()
.id()));
}
-base::string16 ScreenLayoutObserverTest::GetMirroringDisplayNames() {
+std::u16string ScreenLayoutObserverTest::GetMirroringDisplayNames() {
DCHECK(display_manager()->IsInMirrorMode());
- base::string16 display_names;
+ std::u16string display_names;
for (auto& id : display_manager()->GetMirroringDestinationDisplayIdList()) {
if (!display_names.empty())
display_names.append(base::UTF8ToUTF16(","));
@@ -131,7 +131,7 @@
return display_names;
}
-base::string16 ScreenLayoutObserverTest::GetUnifiedDisplayName() {
+std::u16string ScreenLayoutObserverTest::GetUnifiedDisplayName() {
return base::UTF8ToUTF16(
display_manager()->GetDisplayNameForId(display::kUnifiedDisplayId));
}
diff --git a/ash/system/screen_security/screen_capture_observer.h b/ash/system/screen_security/screen_capture_observer.h
index ea839ef..ecbf9de 100644
--- a/ash/system/screen_security/screen_capture_observer.h
+++ b/ash/system/screen_security/screen_capture_observer.h
@@ -22,7 +22,7 @@
virtual void OnScreenCaptureStart(
const base::RepeatingClosure& stop_callback,
const base::RepeatingClosure& source_callback,
- const base::string16& screen_capture_status) = 0;
+ const std::u16string& screen_capture_status) = 0;
// Called when screen capture is stopped.
virtual void OnScreenCaptureStop() = 0;
diff --git a/ash/system/screen_security/screen_security_notification_controller.cc b/ash/system/screen_security/screen_security_notification_controller.cc
index ea4ac9c..2cdafc0 100644
--- a/ash/system/screen_security/screen_security_notification_controller.cc
+++ b/ash/system/screen_security/screen_security_notification_controller.cc
@@ -40,7 +40,7 @@
}
void ScreenSecurityNotificationController::CreateNotification(
- const base::string16& message,
+ const std::u16string& message,
bool is_capture) {
message_center::RichNotificationData data;
data.buttons.push_back(message_center::ButtonInfo(l10n_util::GetStringUTF16(
@@ -84,7 +84,7 @@
message_center::NOTIFICATION_TYPE_SIMPLE,
is_capture ? kScreenCaptureNotificationId : kScreenShareNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_TITLE),
- message, base::string16() /* display_source */, GURL(),
+ message, std::u16string() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
is_capture ? kNotifierScreenCapture : kNotifierScreenShare),
@@ -119,7 +119,7 @@
void ScreenSecurityNotificationController::OnScreenCaptureStart(
const base::RepeatingClosure& stop_callback,
const base::RepeatingClosure& source_callback,
- const base::string16& screen_capture_status) {
+ const std::u16string& screen_capture_status) {
capture_stop_callbacks_.push_back(stop_callback);
change_source_callback_ = source_callback;
@@ -142,10 +142,10 @@
void ScreenSecurityNotificationController::OnScreenShareStart(
const base::RepeatingClosure& stop_callback,
- const base::string16& helper_name) {
+ const std::u16string& helper_name) {
share_stop_callbacks_.emplace_back(std::move(stop_callback));
- base::string16 help_label_text;
+ std::u16string help_label_text;
if (!helper_name.empty()) {
help_label_text = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_SCREEN_SHARE_BEING_HELPED_NAME, helper_name);
diff --git a/ash/system/screen_security/screen_security_notification_controller.h b/ash/system/screen_security/screen_security_notification_controller.h
index 2c1c496..7dbdb7b 100644
--- a/ash/system/screen_security/screen_security_notification_controller.h
+++ b/ash/system/screen_security/screen_security_notification_controller.h
@@ -28,7 +28,7 @@
~ScreenSecurityNotificationController() override;
private:
- void CreateNotification(const base::string16& message, bool is_capture);
+ void CreateNotification(const std::u16string& message, bool is_capture);
// Remove the notification and call all the callbacks in
// |capture_stop_callbacks_| or |share_stop_callbacks_|, depending on
// |is_capture| argument.
@@ -41,12 +41,12 @@
void OnScreenCaptureStart(
const base::RepeatingClosure& stop_callback,
const base::RepeatingClosure& source_callback,
- const base::string16& screen_capture_status) override;
+ const std::u16string& screen_capture_status) override;
void OnScreenCaptureStop() override;
// ScreenShareObserver:
void OnScreenShareStart(const base::RepeatingClosure& stop_callback,
- const base::string16& helper_name) override;
+ const std::u16string& helper_name) override;
void OnScreenShareStop() override;
// ShellObserver:
diff --git a/ash/system/screen_security/screen_security_notification_controller_unittest.cc b/ash/system/screen_security/screen_security_notification_controller_unittest.cc
index c640816..9f4e17f 100644
--- a/ash/system/screen_security/screen_security_notification_controller_unittest.cc
+++ b/ash/system/screen_security/screen_security_notification_controller_unittest.cc
@@ -25,7 +25,7 @@
TEST_F(ScreenSecurityNotificationControllerTest,
ShowScreenCaptureNotification) {
Shell::Get()->system_tray_notifier()->NotifyScreenCaptureStart(
- base::DoNothing(), base::RepeatingClosure(), base::string16());
+ base::DoNothing(), base::RepeatingClosure(), std::u16string());
EXPECT_TRUE(FindNotification(kScreenCaptureNotificationId));
Shell::Get()->system_tray_notifier()->NotifyScreenCaptureStop();
EXPECT_FALSE(FindNotification(kScreenCaptureNotificationId));
@@ -33,7 +33,7 @@
TEST_F(ScreenSecurityNotificationControllerTest, ShowScreenShareNotification) {
Shell::Get()->system_tray_notifier()->NotifyScreenShareStart(
- base::DoNothing(), base::string16());
+ base::DoNothing(), std::u16string());
EXPECT_TRUE(FindNotification(kScreenShareNotificationId));
Shell::Get()->system_tray_notifier()->NotifyScreenShareStop();
EXPECT_FALSE(FindNotification(kScreenShareNotificationId));
@@ -43,7 +43,7 @@
DoNotShowScreenCaptureNotificationWhenCasting) {
Shell::Get()->OnCastingSessionStartedOrStopped(true /* started */);
Shell::Get()->system_tray_notifier()->NotifyScreenCaptureStart(
- base::DoNothing(), base::RepeatingClosure(), base::string16());
+ base::DoNothing(), base::RepeatingClosure(), std::u16string());
EXPECT_FALSE(FindNotification(kScreenCaptureNotificationId));
Shell::Get()->system_tray_notifier()->NotifyScreenCaptureStop();
Shell::Get()->OnCastingSessionStartedOrStopped(false /* started */);
diff --git a/ash/system/screen_security/screen_share_observer.h b/ash/system/screen_security/screen_share_observer.h
index fcff57eb..5d19f97 100644
--- a/ash/system/screen_security/screen_share_observer.h
+++ b/ash/system/screen_security/screen_share_observer.h
@@ -18,7 +18,7 @@
// |stop_callback| must be a base::RepeatingCallback so that it can be passed
// to all observers.
virtual void OnScreenShareStart(const base::RepeatingClosure& stop_callback,
- const base::string16& helper_name) = 0;
+ const std::u16string& helper_name) = 0;
// Called when screen share is stopped.
virtual void OnScreenShareStop() = 0;
diff --git a/ash/system/screen_security/screen_switch_check_controller.cc b/ash/system/screen_security/screen_switch_check_controller.cc
index 51eb4cf8..300e25d 100644
--- a/ash/system/screen_security/screen_switch_check_controller.cc
+++ b/ash/system/screen_security/screen_switch_check_controller.cc
@@ -86,7 +86,7 @@
void ScreenSwitchCheckController::OnScreenCaptureStart(
const base::RepeatingClosure& stop_callback,
const base::RepeatingClosure& source_callback,
- const base::string16& screen_capture_status) {
+ const std::u16string& screen_capture_status) {
has_capture_ = true;
}
@@ -98,7 +98,7 @@
void ScreenSwitchCheckController::OnScreenShareStart(
const base::RepeatingClosure& stop_callback,
- const base::string16& helper_name) {
+ const std::u16string& helper_name) {
has_share_ = true;
}
diff --git a/ash/system/screen_security/screen_switch_check_controller.h b/ash/system/screen_security/screen_switch_check_controller.h
index 911f3113..1708986 100644
--- a/ash/system/screen_security/screen_switch_check_controller.h
+++ b/ash/system/screen_security/screen_switch_check_controller.h
@@ -28,12 +28,12 @@
void OnScreenCaptureStart(
const base::RepeatingClosure& stop_callback,
const base::RepeatingClosure& source_callback,
- const base::string16& screen_capture_status) override;
+ const std::u16string& screen_capture_status) override;
void OnScreenCaptureStop() override;
// ScreenShareObserver:
void OnScreenShareStart(const base::RepeatingClosure& stop_callback,
- const base::string16& helper_name) override;
+ const std::u16string& helper_name) override;
void OnScreenShareStop() override;
bool has_capture_ = false;
diff --git a/ash/system/session/logout_button_tray.cc b/ash/system/session/logout_button_tray.cc
index a53f767..5865ec3 100644
--- a/ash/system/session/logout_button_tray.cc
+++ b/ash/system/session/logout_button_tray.cc
@@ -39,7 +39,7 @@
tray_container()->AddChildView(std::make_unique<views::MdTextButton>(
base::BindRepeating(&LogoutButtonTray::ButtonPressed,
base::Unretained(this)),
- base::string16(), CONTEXT_LAUNCHER_BUTTON));
+ std::u16string(), CONTEXT_LAUNCHER_BUTTON));
button_->SetProminent(true);
}
@@ -112,7 +112,7 @@
void LogoutButtonTray::HideBubbleWithView(const TrayBubbleView* bubble_view) {}
-base::string16 LogoutButtonTray::GetAccessibleNameForTray() {
+std::u16string LogoutButtonTray::GetAccessibleNameForTray() {
return button_->GetText();
}
@@ -129,14 +129,14 @@
void LogoutButtonTray::UpdateButtonTextAndImage() {
LoginStatus login_status = shelf()->GetStatusAreaWidget()->login_status();
- const base::string16 title =
+ const std::u16string title =
user::GetLocalizedSignOutStringForStatus(login_status, false);
if (shelf()->IsHorizontalAlignment()) {
button_->SetText(title);
button_->SetImage(views::Button::STATE_NORMAL, gfx::ImageSkia());
button_->SetMinSize(gfx::Size(0, kTrayItemSize));
} else {
- button_->SetText(base::string16());
+ button_->SetText(std::u16string());
button_->SetAccessibleName(title);
button_->SetImage(
views::Button::STATE_NORMAL,
diff --git a/ash/system/session/logout_button_tray.h b/ash/system/session/logout_button_tray.h
index 27133fef4..407d9b9 100644
--- a/ash/system/session/logout_button_tray.h
+++ b/ash/system/session/logout_button_tray.h
@@ -41,7 +41,7 @@
void UpdateBackground() override;
void ClickedOutsideBubble() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
const char* GetClassName() const override;
void OnThemeChanged() override;
diff --git a/ash/system/session/session_limit_notification_controller.cc b/ash/system/session/session_limit_notification_controller.cc
index e7cda83..5ac8329 100644
--- a/ash/system/session/session_limit_notification_controller.cc
+++ b/ash/system/session/session_limit_notification_controller.cc
@@ -92,7 +92,7 @@
ComposeNotificationTitle(),
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_NOTIFICATION_SESSION_LENGTH_LIMIT_MESSAGE),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierSessionLengthTimeout),
@@ -108,7 +108,7 @@
has_notification_been_shown_ = true;
}
-base::string16 SessionLimitNotificationController::ComposeNotificationTitle()
+std::u16string SessionLimitNotificationController::ComposeNotificationTitle()
const {
return l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NOTIFICATION_SESSION_LENGTH_LIMIT_TITLE,
diff --git a/ash/system/session/session_limit_notification_controller.h b/ash/system/session/session_limit_notification_controller.h
index 06d7e69..6d9ad8e 100644
--- a/ash/system/session/session_limit_notification_controller.h
+++ b/ash/system/session/session_limit_notification_controller.h
@@ -24,7 +24,7 @@
void UpdateNotification();
- base::string16 ComposeNotificationTitle() const;
+ std::u16string ComposeNotificationTitle() const;
static const char kNotificationId[];
diff --git a/ash/system/session/session_limit_notification_controller_unittest.cc b/ash/system/session/session_limit_notification_controller_unittest.cc
index 1f6362c9..f3c8ddc8 100644
--- a/ash/system/session/session_limit_notification_controller_unittest.cc
+++ b/ash/system/session/session_limit_notification_controller_unittest.cc
@@ -61,7 +61,7 @@
UpdateSessionLengthLimitInMin(15);
message_center::Notification* notification = GetNotification();
EXPECT_TRUE(notification);
- base::string16 first_title = notification->title();
+ std::u16string first_title = notification->title();
// Should read the content.
EXPECT_TRUE(notification->rich_notification_data()
.should_make_spoken_feedback_for_popup_updates);
diff --git a/ash/system/supervised/supervised_icon_string.cc b/ash/system/supervised/supervised_icon_string.cc
index 437a09a..b8971417 100644
--- a/ash/system/supervised/supervised_icon_string.cc
+++ b/ash/system/supervised/supervised_icon_string.cc
@@ -25,7 +25,7 @@
return kSystemMenuLegacySupervisedUserIcon;
}
-base::string16 GetSupervisedUserMessage() {
+std::u16string GetSupervisedUserMessage() {
SessionControllerImpl* session_controller =
Shell::Get()->session_controller();
DCHECK(session_controller->IsUserChild());
@@ -35,8 +35,8 @@
const UserSession* const user_session = session_controller->GetUserSession(0);
DCHECK(user_session);
- base::string16 first_custodian = UTF8ToUTF16(user_session->custodian_email);
- base::string16 second_custodian =
+ std::u16string first_custodian = UTF8ToUTF16(user_session->custodian_email);
+ std::u16string second_custodian =
UTF8ToUTF16(user_session->second_custodian_email);
if (second_custodian.empty()) {
diff --git a/ash/system/supervised/supervised_icon_string.h b/ash/system/supervised/supervised_icon_string.h
index 0bc4b8ec..20025fb 100644
--- a/ash/system/supervised/supervised_icon_string.h
+++ b/ash/system/supervised/supervised_icon_string.h
@@ -17,7 +17,7 @@
const gfx::VectorIcon& GetSupervisedUserIcon();
-base::string16 GetSupervisedUserMessage();
+std::u16string GetSupervisedUserMessage();
} // namespace ash
diff --git a/ash/system/time/time_view.cc b/ash/system/time/time_view.cc
index 3fcc448..1bd6df2 100644
--- a/ash/system/time/time_view.cc
+++ b/ash/system/time/time_view.cc
@@ -54,7 +54,7 @@
// when the shelf is vertically aligned.
const int kClockLeadingPadding = 8;
-base::string16 FormatDate(const base::Time& time) {
+std::u16string FormatDate(const base::Time& time) {
// Use 'short' month format (e.g., "Oct") followed by non-padded day of
// month (e.g., "2", "10").
return base::TimeFormatWithPattern(time, "LLLd");
@@ -201,9 +201,9 @@
NotifyAccessibilityEvent(ax::mojom::Event::kTextChanged, true);
- base::string16 current_time = base::TimeFormatTimeOfDayWithHourClockType(
+ std::u16string current_time = base::TimeFormatTimeOfDayWithHourClockType(
now, model_->hour_clock_type(), base::kDropAmPm);
- base::string16 current_date_time = l10n_util::GetStringFUTF16(
+ std::u16string current_date_time = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_DATE_TIME, FormatDate(now), current_time);
horizontal_label_->SetText(show_date_when_horizontal_ ? current_date_time
@@ -214,8 +214,8 @@
// Calculate vertical clock layout labels.
size_t colon_pos = current_time.find(base::ASCIIToUTF16(":"));
- base::string16 hour = current_time.substr(0, colon_pos);
- base::string16 minute = current_time.substr(colon_pos + 1);
+ std::u16string hour = current_time.substr(0, colon_pos);
+ std::u16string minute = current_time.substr(colon_pos + 1);
// Sometimes pad single-digit hours with a zero for aesthetic reasons.
if (hour.length() == 1 && model_->hour_clock_type() == base::k24HourClock &&
diff --git a/ash/system/time/time_view_unittest.cc b/ash/system/time/time_view_unittest.cc
index 803a54a..a2a838f7 100644
--- a/ash/system/time/time_view_unittest.cc
+++ b/ash/system/time/time_view_unittest.cc
@@ -79,7 +79,7 @@
// Test the show date mode in the time view.
TEST_F(TimeViewTest, ShowDateMode) {
CreateTimeView(TimeView::ClockLayout::HORIZONTAL_CLOCK);
- base::string16 time_text = horizontal_label()->GetText();
+ std::u16string time_text = horizontal_label()->GetText();
// When showing date, the text is expected to be longer since it's showing
// more content.
@@ -91,8 +91,8 @@
EXPECT_EQ(time_text, horizontal_label()->GetText());
time_view()->UpdateClockLayout(TimeView::ClockLayout::VERTICAL_CLOCK);
- base::string16 hours_text = vertical_label_hours()->GetText();
- base::string16 minutes_text = vertical_label_minutes()->GetText();
+ std::u16string hours_text = vertical_label_hours()->GetText();
+ std::u16string minutes_text = vertical_label_minutes()->GetText();
// Show date mode should not affect vertical view.
time_view()->SetShowDateWhenHorizontal(true /* show_date_when_horizontal */);
diff --git a/ash/system/toast/toast_manager_unittest.cc b/ash/system/toast/toast_manager_unittest.cc
index 2441db2..2cb546b 100644
--- a/ash/system/toast/toast_manager_unittest.cc
+++ b/ash/system/toast/toast_manager_unittest.cc
@@ -71,14 +71,14 @@
return overlay->dismiss_button_for_testing();
}
- base::string16 GetCurrentText() {
+ std::u16string GetCurrentText() {
ToastOverlay* overlay = GetCurrentOverlay();
- return overlay ? overlay->text_ : base::string16();
+ return overlay ? overlay->text_ : std::u16string();
}
- base::Optional<base::string16> GetCurrentDismissText() {
+ base::Optional<std::u16string> GetCurrentDismissText() {
ToastOverlay* overlay = GetCurrentOverlay();
- return overlay ? overlay->dismiss_text_ : base::string16();
+ return overlay ? overlay->dismiss_text_ : std::u16string();
}
void ClickDismissButton() {
@@ -92,7 +92,7 @@
bool visible_on_lock_screen = false) {
std::string id = "TOAST_ID_" + base::NumberToString(serial_++);
manager()->Show(ToastData(id, base::ASCIIToUTF16(text), duration,
- base::string16(), visible_on_lock_screen));
+ std::u16string(), visible_on_lock_screen));
return id;
}
@@ -100,7 +100,7 @@
const std::string& text,
int32_t duration,
const base::Optional<std::string>& dismiss_text) {
- base::Optional<base::string16> localized_dismiss;
+ base::Optional<std::u16string> localized_dismiss;
if (dismiss_text.has_value())
localized_dismiss = base::ASCIIToUTF16(dismiss_text.value());
diff --git a/ash/system/toast/toast_overlay.cc b/ash/system/toast/toast_overlay.cc
index e56b268..b1351b8 100644
--- a/ash/system/toast/toast_overlay.cc
+++ b/ash/system/toast/toast_overlay.cc
@@ -72,7 +72,7 @@
// ToastOverlayLabel
class ToastOverlayLabel : public views::Label {
public:
- explicit ToastOverlayLabel(const base::string16& label)
+ explicit ToastOverlayLabel(const std::u16string& label)
: Label(label, CONTEXT_TOAST_OVERLAY) {
SetHorizontalAlignment(gfx::ALIGN_LEFT);
SetAutoColorReadabilityEnabled(false);
@@ -127,7 +127,7 @@
// ToastOverlayButton
class ToastOverlayButton : public views::LabelButton {
public:
- ToastOverlayButton(PressedCallback callback, const base::string16& text)
+ ToastOverlayButton(PressedCallback callback, const std::u16string& text)
: views::LabelButton(std::move(callback), text, CONTEXT_TOAST_OVERLAY) {
SetInkDropMode(InkDropMode::ON);
SetHasInkDropActionOnClick(true);
@@ -174,8 +174,8 @@
public:
// This object is not owned by the views hierarchy or by the widget.
ToastOverlayView(ToastOverlay* overlay,
- const base::string16& text,
- const base::Optional<base::string16>& dismiss_text,
+ const std::u16string& text,
+ const base::Optional<std::u16string>& dismiss_text,
const bool is_managed) {
SetPaintToLayer();
layer()->SetFillsBoundsOpaquely(false);
@@ -258,8 +258,8 @@
///////////////////////////////////////////////////////////////////////////////
// ToastOverlay
ToastOverlay::ToastOverlay(Delegate* delegate,
- const base::string16& text,
- base::Optional<base::string16> dismiss_text,
+ const std::u16string& text,
+ base::Optional<std::u16string> dismiss_text,
bool show_on_lock_screen,
bool is_managed)
: delegate_(delegate),
diff --git a/ash/system/toast/toast_overlay.h b/ash/system/toast/toast_overlay.h
index 7705e5d..dd9d7c5d 100644
--- a/ash/system/toast/toast_overlay.h
+++ b/ash/system/toast/toast_overlay.h
@@ -49,8 +49,8 @@
// |dismiss_text| has a value but the string is empty, the default text is
// used. If |is_managed| is true, a managed icon will be added to the toast.
ToastOverlay(Delegate* delegate,
- const base::string16& text,
- base::Optional<base::string16> dismiss_text,
+ const std::u16string& text,
+ base::Optional<std::u16string> dismiss_text,
bool show_on_lock_screen,
bool is_managed);
~ToastOverlay() override;
@@ -81,8 +81,8 @@
void ClickDismissButtonForTesting(const ui::Event& event);
Delegate* const delegate_;
- const base::string16 text_;
- const base::Optional<base::string16> dismiss_text_;
+ const std::u16string text_;
+ const base::Optional<std::u16string> dismiss_text_;
std::unique_ptr<views::Widget> overlay_widget_;
std::unique_ptr<ToastOverlayView> overlay_view_;
std::unique_ptr<ToastDisplayObserver> display_observer_;
diff --git a/ash/system/tracing_notification_controller.cc b/ash/system/tracing_notification_controller.cc
index c67e2e7..5a5bfb3 100644
--- a/ash/system/tracing_notification_controller.cc
+++ b/ash/system/tracing_notification_controller.cc
@@ -64,7 +64,7 @@
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_TRACING_NOTIFICATION_TITLE),
l10n_util::GetStringUTF16(
IDS_ASH_STATUS_TRAY_TRACING_NOTIFICATION_MESSAGE),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierId),
message_center::RichNotificationData(),
diff --git a/ash/system/tray/detailed_view_delegate.cc b/ash/system/tray/detailed_view_delegate.cc
index 28b2fd5..a4aee26 100644
--- a/ash/system/tray/detailed_view_delegate.cc
+++ b/ash/system/tray/detailed_view_delegate.cc
@@ -170,7 +170,7 @@
HoverHighlightView* DetailedViewDelegate::CreateScrollListItem(
ViewClickListener* listener,
const gfx::VectorIcon& icon,
- const base::string16& text) {
+ const std::u16string& text) {
HoverHighlightView* item = new HoverHighlightView(listener);
if (icon.is_empty())
item->AddLabelRow(text);
diff --git a/ash/system/tray/detailed_view_delegate.h b/ash/system/tray/detailed_view_delegate.h
index 8f8b1ba..e8aaefb0 100644
--- a/ash/system/tray/detailed_view_delegate.h
+++ b/ash/system/tray/detailed_view_delegate.h
@@ -77,7 +77,7 @@
// ownership of the returned view.
virtual HoverHighlightView* CreateScrollListItem(ViewClickListener* listener,
const gfx::VectorIcon& icon,
- const base::string16& text);
+ const std::u16string& text);
// Return the back button used in the title row. Caller takes ownership of the
// returned view.
diff --git a/ash/system/tray/hover_highlight_view.cc b/ash/system/tray/hover_highlight_view.cc
index 3188857..880d2bb 100644
--- a/ash/system/tray/hover_highlight_view.cc
+++ b/ash/system/tray/hover_highlight_view.cc
@@ -71,7 +71,7 @@
Layout();
}
-void HoverHighlightView::SetSubText(const base::string16& sub_text) {
+void HoverHighlightView::SetSubText(const std::u16string& sub_text) {
DCHECK(is_populated_);
DCHECK(text_label_);
DCHECK(!sub_text.empty());
@@ -89,7 +89,7 @@
}
void HoverHighlightView::AddIconAndLabel(const gfx::ImageSkia& image,
- const base::string16& text) {
+ const std::u16string& text) {
DCHECK(!is_populated_);
is_populated_ = true;
@@ -120,7 +120,7 @@
SetAccessibleName(text);
}
-void HoverHighlightView::AddLabelRow(const base::string16& text) {
+void HoverHighlightView::AddLabelRow(const std::u16string& text) {
DCHECK(!is_populated_);
is_populated_ = true;
@@ -139,7 +139,7 @@
SetAccessibleName(text);
}
-void HoverHighlightView::AddLabelRow(const base::string16& text,
+void HoverHighlightView::AddLabelRow(const std::u16string& text,
int start_inset) {
AddLabelRow(text);
@@ -171,7 +171,7 @@
is_populated_ = false;
}
-void HoverHighlightView::OnSetTooltipText(const base::string16& tooltip_text) {
+void HoverHighlightView::OnSetTooltipText(const std::u16string& tooltip_text) {
if (text_label_)
text_label_->SetTooltipText(tooltip_text);
if (sub_text_label_)
diff --git a/ash/system/tray/hover_highlight_view.h b/ash/system/tray/hover_highlight_view.h
index 901227c..683bc74 100644
--- a/ash/system/tray/hover_highlight_view.h
+++ b/ash/system/tray/hover_highlight_view.h
@@ -45,14 +45,14 @@
// Convenience function for populating the view with an icon and a label. This
// also sets the accessible name. Primarily used for scrollable rows in
// detailed views.
- void AddIconAndLabel(const gfx::ImageSkia& image, const base::string16& text);
+ void AddIconAndLabel(const gfx::ImageSkia& image, const std::u16string& text);
// Populates the view with a text label, inset on the left by the horizontal
// space that would normally be occupied by an icon.
- void AddLabelRow(const base::string16& text);
+ void AddLabelRow(const std::u16string& text);
// Populates the view with a text label with custom start inset.
- void AddLabelRow(const base::string16& text, int start_inset);
+ void AddLabelRow(const std::u16string& text, int start_inset);
// Adds an optional right icon to an already populated view. |icon_size| is
// the size of the icon in DP.
@@ -68,7 +68,7 @@
// Sets the text of the sub label for an already populated view. |sub_text|
// must not be empty and prior to calling this function, |text_label_| must
// not be null.
- void SetSubText(const base::string16& sub_text);
+ void SetSubText(const std::u16string& sub_text);
// Allows view to expand its height. Size of unexapandable view is fixed and
// equals to kTrayPopupItemHeight.
@@ -90,7 +90,7 @@
protected:
// Override from Button to also set the tooltip for all child elements.
- void OnSetTooltipText(const base::string16& tooltip_text) override;
+ void OnSetTooltipText(const std::u16string& tooltip_text) override;
// views::View:
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
diff --git a/ash/system/tray/status_area_overflow_button_tray.cc b/ash/system/tray/status_area_overflow_button_tray.cc
index 07b7c08..f1b324b 100644
--- a/ash/system/tray/status_area_overflow_button_tray.cc
+++ b/ash/system/tray/status_area_overflow_button_tray.cc
@@ -103,7 +103,7 @@
icon_->ToggleState(state_);
}
-base::string16 StatusAreaOverflowButtonTray::GetAccessibleNameForTray() {
+std::u16string StatusAreaOverflowButtonTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(
state_ == CLICK_TO_COLLAPSE ? IDS_ASH_STATUS_AREA_OVERFLOW_BUTTON_COLLAPSE
: IDS_ASH_STATUS_AREA_OVERFLOW_BUTTON_EXPAND);
diff --git a/ash/system/tray/status_area_overflow_button_tray.h b/ash/system/tray/status_area_overflow_button_tray.h
index 4b5d55a1..a6303e4 100644
--- a/ash/system/tray/status_area_overflow_button_tray.h
+++ b/ash/system/tray/status_area_overflow_button_tray.h
@@ -36,7 +36,7 @@
// TrayBackgroundView:
void ClickedOutsideBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void Initialize() override;
diff --git a/ash/system/tray/system_tray_notifier.cc b/ash/system/tray/system_tray_notifier.cc
index 5eb4834..574f1c5 100644
--- a/ash/system/tray/system_tray_notifier.cc
+++ b/ash/system/tray/system_tray_notifier.cc
@@ -61,7 +61,7 @@
void SystemTrayNotifier::NotifyScreenCaptureStart(
base::RepeatingClosure stop_callback,
base::RepeatingClosure source_callback,
- const base::string16& sharing_app_name) {
+ const std::u16string& sharing_app_name) {
for (auto& observer : screen_capture_observers_)
observer.OnScreenCaptureStart(stop_callback, source_callback,
sharing_app_name);
@@ -83,7 +83,7 @@
void SystemTrayNotifier::NotifyScreenShareStart(
base::RepeatingClosure stop_callback,
- const base::string16& helper_name) {
+ const std::u16string& helper_name) {
for (auto& observer : screen_share_observers_)
observer.OnScreenShareStart(stop_callback, helper_name);
}
diff --git a/ash/system/tray/system_tray_notifier.h b/ash/system/tray/system_tray_notifier.h
index 28958dd..3be2588 100644
--- a/ash/system/tray/system_tray_notifier.h
+++ b/ash/system/tray/system_tray_notifier.h
@@ -49,14 +49,14 @@
void RemoveScreenCaptureObserver(ScreenCaptureObserver* observer);
void NotifyScreenCaptureStart(base::RepeatingClosure stop_callback,
base::RepeatingClosure source_callback,
- const base::string16& sharing_app_name);
+ const std::u16string& sharing_app_name);
void NotifyScreenCaptureStop();
// Screen share.
void AddScreenShareObserver(ScreenShareObserver* observer);
void RemoveScreenShareObserver(ScreenShareObserver* observer);
void NotifyScreenShareStart(base::RepeatingClosure stop_callback,
- const base::string16& helper_name);
+ const std::u16string& helper_name);
void NotifyScreenShareStop();
// System tray focus.
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index ff6b01b..bb2845461 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -86,7 +86,7 @@
virtual void AnchorUpdated() {}
// Called from GetAccessibleNodeData, must return a valid accessible name.
- virtual base::string16 GetAccessibleNameForTray() = 0;
+ virtual std::u16string GetAccessibleNameForTray() = 0;
// Called when a locale change is detected. It should reload any strings the
// view may be using. Note that the locale is not expected to change after the
diff --git a/ash/system/tray/tray_bubble_view.cc b/ash/system/tray/tray_bubble_view.cc
index 0bba0d6..3cc4bd6 100644
--- a/ash/system/tray/tray_bubble_view.cc
+++ b/ash/system/tray/tray_bubble_view.cc
@@ -133,8 +133,8 @@
void TrayBubbleView::Delegate::OnMouseExitedView() {}
-base::string16 TrayBubbleView::Delegate::GetAccessibleNameForBubble() {
- return base::string16();
+std::u16string TrayBubbleView::Delegate::GetAccessibleNameForBubble() {
+ return std::u16string();
}
bool TrayBubbleView::Delegate::ShouldEnableExtraKeyboardAccessibility() {
@@ -412,11 +412,11 @@
mask->addRect(gfx::RectToSkRect(GetBubbleFrameView()->GetContentsBounds()));
}
-base::string16 TrayBubbleView::GetAccessibleWindowTitle() const {
+std::u16string TrayBubbleView::GetAccessibleWindowTitle() const {
if (delegate_)
return delegate_->GetAccessibleNameForBubble();
else
- return base::string16();
+ return std::u16string();
}
gfx::Size TrayBubbleView::CalculatePreferredSize() const {
diff --git a/ash/system/tray/tray_bubble_view.h b/ash/system/tray/tray_bubble_view.h
index e2e988b..51359a1 100644
--- a/ash/system/tray/tray_bubble_view.h
+++ b/ash/system/tray/tray_bubble_view.h
@@ -56,7 +56,7 @@
// Called from GetAccessibleNodeData(); should return the appropriate
// accessible name for the bubble.
- virtual base::string16 GetAccessibleNameForBubble();
+ virtual std::u16string GetAccessibleNameForBubble();
// Should return true if extra keyboard accessibility is enabled.
// TrayBubbleView will put focus on the default item if extra keyboard
@@ -164,7 +164,7 @@
views::Widget* widget) override;
bool WidgetHasHitTestMask() const override;
void GetWidgetHitTestMask(SkPath* mask) const override;
- base::string16 GetAccessibleWindowTitle() const override;
+ std::u16string GetAccessibleWindowTitle() const override;
// views::BubbleDialogDelegateView:
void OnBeforeBubbleWidgetInit(views::Widget::InitParams* params,
diff --git a/ash/system/tray/tray_detailed_view.cc b/ash/system/tray/tray_detailed_view.cc
index 079da67..d739011 100644
--- a/ash/system/tray/tray_detailed_view.cc
+++ b/ash/system/tray/tray_detailed_view.cc
@@ -316,7 +316,7 @@
HoverHighlightView* TrayDetailedView::AddScrollListItem(
const gfx::VectorIcon& icon,
- const base::string16& text) {
+ const std::u16string& text) {
HoverHighlightView* item = delegate_->CreateScrollListItem(this, icon, text);
scroll_content_->AddChildView(item);
return item;
@@ -324,7 +324,7 @@
HoverHighlightView* TrayDetailedView::AddScrollListCheckableItem(
const gfx::VectorIcon& icon,
- const base::string16& text,
+ const std::u16string& text,
bool checked,
bool enterprise_managed) {
HoverHighlightView* item = AddScrollListItem(icon, text);
@@ -337,7 +337,7 @@
}
HoverHighlightView* TrayDetailedView::AddScrollListCheckableItem(
- const base::string16& text,
+ const std::u16string& text,
bool checked,
bool enterprise_managed) {
return AddScrollListCheckableItem(gfx::kNoneIcon, text, checked,
@@ -353,7 +353,7 @@
base::Optional<uint8_t> battery_percentage) {
DCHECK(view->is_populated());
- base::string16 status;
+ std::u16string status;
if (battery_percentage) {
view->SetSubText(l10n_util::GetStringFUTF16(
diff --git a/ash/system/tray/tray_detailed_view.h b/ash/system/tray/tray_detailed_view.h
index 6d6dea8..4f7bff2 100644
--- a/ash/system/tray/tray_detailed_view.h
+++ b/ash/system/tray/tray_detailed_view.h
@@ -66,7 +66,7 @@
// Adds a targetable row to |scroll_content_| containing |icon| and |text|.
HoverHighlightView* AddScrollListItem(const gfx::VectorIcon& icon,
- const base::string16& text);
+ const std::u16string& text);
// Add a child view to the scroll list.
void AddScrollListChild(std::unique_ptr<views::View> child);
@@ -77,7 +77,7 @@
// managed icon for that item.
HoverHighlightView* AddScrollListCheckableItem(
const gfx::VectorIcon& icon,
- const base::string16& text,
+ const std::u16string& text,
bool checked,
bool enterprise_managed = false);
@@ -86,7 +86,7 @@
// |enterprise_managed| determines whether or not there will be an enterprise
// managed icon for that item.
HoverHighlightView* AddScrollListCheckableItem(
- const base::string16& text,
+ const std::u16string& text,
bool checked,
bool enterprise_managed = false);
diff --git a/ash/system/tray/tray_event_filter_unittest.cc b/ash/system/tray/tray_event_filter_unittest.cc
index 826ec7f..77c643f 100644
--- a/ash/system/tray/tray_event_filter_unittest.cc
+++ b/ash/system/tray/tray_event_filter_unittest.cc
@@ -63,7 +63,7 @@
MessageCenter::Get()->AddNotification(std::make_unique<Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, notification_id,
base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), base::string16() /* display_source */, GURL(),
+ gfx::Image(), std::u16string() /* display_source */, GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
new message_center::NotificationDelegate()));
return notification_id;
diff --git a/ash/system/tray/tray_item_view.h b/ash/system/tray/tray_item_view.h
index 820ded5..6cd16280 100644
--- a/ash/system/tray/tray_item_view.h
+++ b/ash/system/tray/tray_item_view.h
@@ -30,11 +30,11 @@
// understandable.
class IconizedLabel : public views::Label {
public:
- void SetCustomAccessibleName(const base::string16& name) {
+ void SetCustomAccessibleName(const std::u16string& name) {
custom_accessible_name_ = name;
}
- base::string16 GetAccessibleNameString() const {
+ std::u16string GetAccessibleNameString() const {
return custom_accessible_name_;
}
@@ -42,7 +42,7 @@
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
private:
- base::string16 custom_accessible_name_;
+ std::u16string custom_accessible_name_;
};
// Base-class for items in the tray. It makes sure the widget is updated
diff --git a/ash/system/tray/tray_popup_utils.cc b/ash/system/tray/tray_popup_utils.cc
index 94bfe55..d47e249 100644
--- a/ash/system/tray/tray_popup_utils.cc
+++ b/ash/system/tray/tray_popup_utils.cc
@@ -259,7 +259,7 @@
views::LabelButton* TrayPopupUtils::CreateTrayPopupButton(
views::Button::PressedCallback callback,
- const base::string16& text) {
+ const std::u16string& text) {
auto button =
std::make_unique<views::MdTextButton>(std::move(callback), text);
button->SetProminent(true);
diff --git a/ash/system/tray/tray_popup_utils.h b/ash/system/tray/tray_popup_utils.h
index cd6ee32..29a44de 100644
--- a/ash/system/tray/tray_popup_utils.h
+++ b/ash/system/tray/tray_popup_utils.h
@@ -146,7 +146,7 @@
// ownership.
static views::LabelButton* CreateTrayPopupButton(
views::Button::PressedCallback callback,
- const base::string16& text);
+ const std::u16string& text);
// Creates and returns a vertical separator to be used between two items in a
// material design system menu row. The caller assumes ownership of the
diff --git a/ash/system/unified/camera_mic_tray_item_view.cc b/ash/system/unified/camera_mic_tray_item_view.cc
index 8426b086..d5ce43e2 100644
--- a/ash/system/unified/camera_mic_tray_item_view.cc
+++ b/ash/system/unified/camera_mic_tray_item_view.cc
@@ -88,7 +88,7 @@
chromeos::features::kVmCameraMicIndicatorsAndNotifications));
}
-base::string16 CameraMicTrayItemView::GetAccessibleNameString() const {
+std::u16string CameraMicTrayItemView::GetAccessibleNameString() const {
return message_;
}
@@ -97,7 +97,7 @@
return GetLocalBounds().Contains(point) ? this : nullptr;
}
-base::string16 CameraMicTrayItemView::GetTooltipText(
+std::u16string CameraMicTrayItemView::GetTooltipText(
const gfx::Point& p) const {
return message_;
}
diff --git a/ash/system/unified/camera_mic_tray_item_view.h b/ash/system/unified/camera_mic_tray_item_view.h
index 6a66aac5..9c9e66b1 100644
--- a/ash/system/unified/camera_mic_tray_item_view.h
+++ b/ash/system/unified/camera_mic_tray_item_view.h
@@ -29,12 +29,12 @@
CameraMicTrayItemView(const CameraMicTrayItemView&) = delete;
CameraMicTrayItemView& operator=(const CameraMicTrayItemView&) = delete;
- base::string16 GetAccessibleNameString() const;
+ std::u16string GetAccessibleNameString() const;
// views::View:
const char* GetClassName() const override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
// SessionObserver:
void OnActiveUserSessionChanged(const AccountId& account_id) override;
@@ -55,7 +55,7 @@
bool active_ = false;
bool with_mic_ = false; // Only for `type_ == kCamera`.
bool is_primary_session_ = false;
- base::string16 message_;
+ std::u16string message_;
};
} // namespace ash
diff --git a/ash/system/unified/current_locale_view.cc b/ash/system/unified/current_locale_view.cc
index ce8ddaf..0192c12 100644
--- a/ash/system/unified/current_locale_view.cc
+++ b/ash/system/unified/current_locale_view.cc
@@ -43,7 +43,7 @@
const std::vector<LocaleInfo>& locales = locale_model->locale_list();
for (auto& entry : locales) {
if (entry.iso_code == locale_model->current_locale_iso_code()) {
- const base::string16 description = l10n_util::GetStringFUTF16(
+ const std::u16string description = l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_INDICATOR_LOCALE_TOOLTIP, entry.display_name);
label()->SetTooltipText(description);
label()->SetCustomAccessibleName(description);
diff --git a/ash/system/unified/detailed_view_controller.h b/ash/system/unified/detailed_view_controller.h
index 68177bb..55dfedc 100644
--- a/ash/system/unified/detailed_view_controller.h
+++ b/ash/system/unified/detailed_view_controller.h
@@ -25,7 +25,7 @@
// Create the detailed view. The view will be owned by views hierarchy. The
// view will be always deleted after the controller is destructed.
virtual views::View* CreateView() = 0;
- virtual base::string16 GetAccessibleName() const = 0;
+ virtual std::u16string GetAccessibleName() const = 0;
};
} // namespace ash
diff --git a/ash/system/unified/feature_pod_button.cc b/ash/system/unified/feature_pod_button.cc
index d099ba4..a591296 100644
--- a/ash/system/unified/feature_pod_button.cc
+++ b/ash/system/unified/feature_pod_button.cc
@@ -273,22 +273,22 @@
OnEnabledChanged();
}
-void FeaturePodLabelButton::SetLabel(const base::string16& label) {
+void FeaturePodLabelButton::SetLabel(const std::u16string& label) {
label_->SetText(label);
InvalidateLayout();
}
-const base::string16& FeaturePodLabelButton::GetLabelText() const {
+const std::u16string& FeaturePodLabelButton::GetLabelText() const {
return label_->GetText();
}
-void FeaturePodLabelButton::SetSubLabel(const base::string16& sub_label) {
+void FeaturePodLabelButton::SetSubLabel(const std::u16string& sub_label) {
sub_label_->SetText(sub_label);
sub_label_->SetVisible(true);
InvalidateLayout();
}
-const base::string16& FeaturePodLabelButton::GetSubLabelText() const {
+const std::u16string& FeaturePodLabelButton::GetSubLabelText() const {
return sub_label_->GetText();
}
@@ -361,7 +361,7 @@
icon_button_->SetVectorIcon(icon);
}
-void FeaturePodButton::SetLabel(const base::string16& label) {
+void FeaturePodButton::SetLabel(const std::u16string& label) {
if (label_button_->GetLabelText() == label)
return;
@@ -370,7 +370,7 @@
label_button_->SchedulePaint();
}
-void FeaturePodButton::SetSubLabel(const base::string16& sub_label) {
+void FeaturePodButton::SetSubLabel(const std::u16string& sub_label) {
if (label_button_->GetSubLabelText() == sub_label)
return;
@@ -379,15 +379,15 @@
label_button_->SchedulePaint();
}
-void FeaturePodButton::SetIconTooltip(const base::string16& text) {
+void FeaturePodButton::SetIconTooltip(const std::u16string& text) {
icon_button_->SetTooltipText(text);
}
-void FeaturePodButton::SetLabelTooltip(const base::string16& text) {
+void FeaturePodButton::SetLabelTooltip(const std::u16string& text) {
label_button_->SetTooltipText(text);
}
-void FeaturePodButton::SetIconAndLabelTooltips(const base::string16& text) {
+void FeaturePodButton::SetIconAndLabelTooltips(const std::u16string& text) {
SetIconTooltip(text);
SetLabelTooltip(text);
}
diff --git a/ash/system/unified/feature_pod_button.h b/ash/system/unified/feature_pod_button.h
index 934491d0..51b37e8 100644
--- a/ash/system/unified/feature_pod_button.h
+++ b/ash/system/unified/feature_pod_button.h
@@ -82,13 +82,13 @@
~FeaturePodLabelButton() override;
// Set the text of label shown below the icon. See FeaturePodButton::SetLabel.
- void SetLabel(const base::string16& label);
- const base::string16& GetLabelText() const;
+ void SetLabel(const std::u16string& label);
+ const std::u16string& GetLabelText() const;
// Set the text of sub-label shown below the label.
// See FeaturePodButton::SetSubLabel.
- void SetSubLabel(const base::string16& sub_label);
- const base::string16& GetSubLabelText() const;
+ void SetSubLabel(const std::u16string& sub_label);
+ const std::u16string& GetSubLabelText() const;
// Show arrow to indicate that the feature has a detailed view.
// See FeaturePodButton::ShowDetailedViewArrow.
@@ -138,19 +138,19 @@
void SetVectorIcon(const gfx::VectorIcon& icon);
// Set the text of label shown below the icon.
- void SetLabel(const base::string16& label);
+ void SetLabel(const std::u16string& label);
// Set the text of sub-label shown below the label.
- void SetSubLabel(const base::string16& sub_label);
+ void SetSubLabel(const std::u16string& sub_label);
// Set the tooltip text of the icon button.
- void SetIconTooltip(const base::string16& text);
+ void SetIconTooltip(const std::u16string& text);
// Set the tooltip text of the label button.
- void SetLabelTooltip(const base::string16& text);
+ void SetLabelTooltip(const std::u16string& text);
// Convenience method to set both icon and label tooltip texts.
- void SetIconAndLabelTooltips(const base::string16& text);
+ void SetIconAndLabelTooltips(const std::u16string& text);
// Show arrow to indicate that the feature has a detailed view.
void ShowDetailedViewArrow();
diff --git a/ash/system/unified/ime_mode_view.cc b/ash/system/unified/ime_mode_view.cc
index 70b630f..74f981d 100644
--- a/ash/system/unified/ime_mode_view.cc
+++ b/ash/system/unified/ime_mode_view.cc
@@ -99,7 +99,7 @@
label()->SetText(ime_controller->current_ime().short_name);
label()->SetEnabledColor(
TrayIconColor(Shell::Get()->session_controller()->GetSessionState()));
- base::string16 description =
+ std::u16string description =
l10n_util::GetStringFUTF16(IDS_ASH_STATUS_TRAY_INDICATOR_IME_TOOLTIP,
ime_controller->current_ime().name);
label()->SetTooltipText(description);
diff --git a/ash/system/unified/managed_device_tray_item_view.cc b/ash/system/unified/managed_device_tray_item_view.cc
index 3368d04..0187b06 100644
--- a/ash/system/unified/managed_device_tray_item_view.cc
+++ b/ash/system/unified/managed_device_tray_item_view.cc
@@ -69,7 +69,7 @@
IDS_ASH_ENTERPRISE_DEVICE_MANAGED_BY, ui::GetChromeOSDeviceName(),
base::UTF8ToUTF16(enterprise_domain_manager)));
} else {
- image_view()->SetTooltipText(base::string16());
+ image_view()->SetTooltipText(std::u16string());
LOG(WARNING)
<< "Public account user, but device not enterprise-enrolled.";
}
diff --git a/ash/system/unified/notification_counter_view.cc b/ash/system/unified/notification_counter_view.cc
index 69d922d3..dab7550 100644
--- a/ash/system/unified/notification_counter_view.cc
+++ b/ash/system/unified/notification_counter_view.cc
@@ -141,7 +141,7 @@
SetVisible(true);
}
-base::string16 NotificationCounterView::GetAccessibleNameString() const {
+std::u16string NotificationCounterView::GetAccessibleNameString() const {
return GetVisible() ? image_view()->GetTooltipText() : base::EmptyString16();
}
diff --git a/ash/system/unified/notification_counter_view.h b/ash/system/unified/notification_counter_view.h
index 958cf9f..9830619e 100644
--- a/ash/system/unified/notification_counter_view.h
+++ b/ash/system/unified/notification_counter_view.h
@@ -30,7 +30,7 @@
void Update();
// Returns a string describing the current state for accessibility.
- base::string16 GetAccessibleNameString() const;
+ std::u16string GetAccessibleNameString() const;
// TrayItemView:
void HandleLocaleChange() override;
diff --git a/ash/system/unified/notification_counter_view_unittest.cc b/ash/system/unified/notification_counter_view_unittest.cc
index 4b145ac..08b9c4f6 100644
--- a/ash/system/unified/notification_counter_view_unittest.cc
+++ b/ash/system/unified/notification_counter_view_unittest.cc
@@ -30,7 +30,7 @@
std::make_unique<message_center::Notification>(
message_center::NOTIFICATION_TYPE_BASE_FORMAT, notification_id,
base::UTF8ToUTF16("test_title"), base::UTF8ToUTF16("test message"),
- gfx::Image(), /*display_source=*/base::string16(), GURL(),
+ gfx::Image(), /*display_source=*/std::u16string(), GURL(),
message_center::NotifierId(message_center::NotifierType::APPLICATION,
"app"),
rich_notification_data, new message_center::NotificationDelegate()));
diff --git a/ash/system/unified/notification_icons_controller.cc b/ash/system/unified/notification_icons_controller.cc
index 04595d7e..cd49564 100644
--- a/ash/system/unified/notification_icons_controller.cc
+++ b/ash/system/unified/notification_icons_controller.cc
@@ -98,10 +98,10 @@
void NotificationIconTrayItemView::Reset() {
notification_id_ = std::string();
image_view()->SetImage(gfx::ImageSkia());
- image_view()->SetTooltipText(base::string16());
+ image_view()->SetTooltipText(std::u16string());
}
-const base::string16& NotificationIconTrayItemView::GetAccessibleNameString()
+const std::u16string& NotificationIconTrayItemView::GetAccessibleNameString()
const {
if (notification_id_.empty())
return base::EmptyString16();
@@ -169,11 +169,11 @@
AshMessageCenterLockScreenController::IsEnabled());
}
-base::string16 NotificationIconsController::GetAccessibleNameString() const {
+std::u16string NotificationIconsController::GetAccessibleNameString() const {
if (!TrayItemHasNotification())
return notification_counter_view_->GetAccessibleNameString();
- std::vector<base::string16> status;
+ std::vector<std::u16string> status;
status.push_back(l10n_util::GetPluralStringFUTF16(
IDS_ASH_STATUS_TRAY_NOTIFICATIONS_IMPORTANT_COUNT_ACCESSIBLE_NAME,
TrayNotificationIconsCount()));
diff --git a/ash/system/unified/notification_icons_controller.h b/ash/system/unified/notification_icons_controller.h
index f381383..4fe90c0 100644
--- a/ash/system/unified/notification_icons_controller.h
+++ b/ash/system/unified/notification_icons_controller.h
@@ -40,7 +40,7 @@
void Reset();
// Returns a string describing the current state for accessibility.
- const base::string16& GetAccessibleNameString() const;
+ const std::u16string& GetAccessibleNameString() const;
const std::string& GetNotificationId() const;
@@ -82,7 +82,7 @@
bool ShouldShowNotificationItemsInTray();
// Returns a string describing the current state for accessibility.
- base::string16 GetAccessibleNameString() const;
+ std::u16string GetAccessibleNameString() const;
// Update notification indicators, including counters and quiet mode view.
void UpdateNotificationIndicators();
diff --git a/ash/system/unified/notification_icons_controller_unittest.cc b/ash/system/unified/notification_icons_controller_unittest.cc
index b1eebfd..78edc33 100644
--- a/ash/system/unified/notification_icons_controller_unittest.cc
+++ b/ash/system/unified/notification_icons_controller_unittest.cc
@@ -64,7 +64,7 @@
CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, id,
base::UTF8ToUTF16("test_title"), base::UTF8ToUTF16("test message"),
- base::string16() /*display_source */, GURL() /* origin_url */,
+ std::u16string() /*display_source */, GURL() /* origin_url */,
message_center::NotifierId(
message_center::NotifierType::SYSTEM_COMPONENT, app_id),
rich_notification_data, nullptr /* delegate */, gfx::VectorIcon(),
diff --git a/ash/system/unified/quiet_mode_feature_pod_controller.cc b/ash/system/unified/quiet_mode_feature_pod_controller.cc
index a3075bd2..4210e14e 100644
--- a/ash/system/unified/quiet_mode_feature_pod_controller.cc
+++ b/ash/system/unified/quiet_mode_feature_pod_controller.cc
@@ -126,7 +126,7 @@
}
}
-base::string16 QuietModeFeaturePodController::GetQuietModeStateTooltip() {
+std::u16string QuietModeFeaturePodController::GetQuietModeStateTooltip() {
return l10n_util::GetStringUTF16(
MessageCenter::Get()->IsQuietMode()
? IDS_ASH_STATUS_TRAY_NOTIFICATIONS_DO_NOT_DISTURB_ON_STATE
diff --git a/ash/system/unified/quiet_mode_feature_pod_controller.h b/ash/system/unified/quiet_mode_feature_pod_controller.h
index 0c81c47..54feef0d 100644
--- a/ash/system/unified/quiet_mode_feature_pod_controller.h
+++ b/ash/system/unified/quiet_mode_feature_pod_controller.h
@@ -45,7 +45,7 @@
const std::vector<NotifierMetadata>& notifiers) override;
private:
- base::string16 GetQuietModeStateTooltip();
+ std::u16string GetQuietModeStateTooltip();
void RecordDisabledNotifierCount(int disabled_count);
diff --git a/ash/system/unified/rounded_label_button.cc b/ash/system/unified/rounded_label_button.cc
index e46b30a..d58fea2c 100644
--- a/ash/system/unified/rounded_label_button.cc
+++ b/ash/system/unified/rounded_label_button.cc
@@ -25,7 +25,7 @@
} // namespace
RoundedLabelButton::RoundedLabelButton(PressedCallback callback,
- const base::string16& text)
+ const std::u16string& text)
: views::LabelButton(std::move(callback), text) {
SetHorizontalAlignment(gfx::ALIGN_CENTER);
SetBorder(views::CreateEmptyBorder(gfx::Insets()));
diff --git a/ash/system/unified/rounded_label_button.h b/ash/system/unified/rounded_label_button.h
index 36f8c8f..5ed11a9 100644
--- a/ash/system/unified/rounded_label_button.h
+++ b/ash/system/unified/rounded_label_button.h
@@ -16,7 +16,7 @@
// LabelButton that has a rounded shape with a Material Design ink drop.
class RoundedLabelButton : public views::LabelButton {
public:
- RoundedLabelButton(PressedCallback callback, const base::string16& text);
+ RoundedLabelButton(PressedCallback callback, const std::u16string& text);
~RoundedLabelButton() override;
// views::LabelButton:
diff --git a/ash/system/unified/system_tray_test_api.cc b/ash/system/unified/system_tray_test_api.cc
index 771660f9..c43cd56f 100644
--- a/ash/system/unified/system_tray_test_api.cc
+++ b/ash/system/unified/system_tray_test_api.cc
@@ -94,14 +94,14 @@
}
}
-base::string16 SystemTrayTestApi::GetBubbleViewTooltip(int view_id) {
+std::u16string SystemTrayTestApi::GetBubbleViewTooltip(int view_id) {
views::View* view = GetBubbleView(view_id);
- return view ? view->GetTooltipText(gfx::Point()) : base::string16();
+ return view ? view->GetTooltipText(gfx::Point()) : std::u16string();
}
-base::string16 SystemTrayTestApi::GetBubbleViewText(int view_id) {
+std::u16string SystemTrayTestApi::GetBubbleViewText(int view_id) {
views::View* view = GetBubbleView(view_id);
- return view ? static_cast<views::Label*>(view)->GetText() : base::string16();
+ return view ? static_cast<views::Label*>(view)->GetText() : std::u16string();
}
bool SystemTrayTestApi::Is24HourClock() {
diff --git a/ash/system/unified/unified_notifier_settings_controller.cc b/ash/system/unified/unified_notifier_settings_controller.cc
index 94b3b71..43094a4 100644
--- a/ash/system/unified/unified_notifier_settings_controller.cc
+++ b/ash/system/unified/unified_notifier_settings_controller.cc
@@ -63,7 +63,7 @@
return new UnifiedNotifierSettingsView(detailed_view_delegate_.get());
}
-base::string16 UnifiedNotifierSettingsController::GetAccessibleName() const {
+std::u16string UnifiedNotifierSettingsController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_NOTIFIER_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/unified/unified_notifier_settings_controller.h b/ash/system/unified/unified_notifier_settings_controller.h
index 70240f03..647f7a7 100644
--- a/ash/system/unified/unified_notifier_settings_controller.h
+++ b/ash/system/unified/unified_notifier_settings_controller.h
@@ -24,7 +24,7 @@
// DetailedViewControllerBase:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
diff --git a/ash/system/unified/unified_system_info_view.cc b/ash/system/unified/unified_system_info_view.cc
index 58e120e..5c93979 100644
--- a/ash/system/unified/unified_system_info_view.cc
+++ b/ash/system/unified/unified_system_info_view.cc
@@ -46,13 +46,13 @@
namespace {
-base::string16 FormatDate(const base::Time& time) {
+std::u16string FormatDate(const base::Time& time) {
// Use 'short' month format (e.g., "Oct") followed by non-padded day of
// month (e.g., "2", "10").
return base::TimeFormatWithPattern(time, "LLLd");
}
-base::string16 FormatDayOfWeek(const base::Time& time) {
+std::u16string FormatDayOfWeek(const base::Time& time) {
// Use 'short' day of week format (e.g., "Wed").
return base::TimeFormatWithPattern(time, "EEE");
}
@@ -210,8 +210,8 @@
}
void BatteryView::Update() {
- base::string16 percentage_text;
- base::string16 status_text;
+ std::u16string percentage_text;
+ std::u16string status_text;
std::tie(percentage_text, status_text) =
PowerStatus::Get()->GetStatusStrings();
@@ -379,7 +379,7 @@
}
// Display both device and user management if the feature is enabled.
- base::string16 managed_string;
+ std::u16string managed_string;
if (enterprise_domain_manager.empty() && account_domain_manager.empty()) {
managed_string = l10n_util::GetStringFUTF16(
IDS_ASH_ENTERPRISE_DEVICE_MANAGED, ui::GetChromeOSDeviceName());
@@ -391,7 +391,7 @@
base::UTF8ToUTF16(enterprise_domain_manager),
base::UTF8ToUTF16(account_domain_manager));
} else {
- base::string16 display_domain_manager =
+ std::u16string display_domain_manager =
enterprise_domain_manager.empty()
? base::UTF8ToUTF16(account_domain_manager)
: base::UTF8ToUTF16(enterprise_domain_manager);
diff --git a/ash/system/unified/unified_system_tray.cc b/ash/system/unified/unified_system_tray.cc
index e3fe8b1..666e878 100644
--- a/ash/system/unified/unified_system_tray.cc
+++ b/ash/system/unified/unified_system_tray.cc
@@ -378,14 +378,14 @@
HideBubbleInternal();
}
-base::string16 UnifiedSystemTray::GetAccessibleNameForBubble() {
+std::u16string UnifiedSystemTray::GetAccessibleNameForBubble() {
if (IsBubbleShown())
return GetAccessibleNameForQuickSettingsBubble();
else
return GetAccessibleNameForTray();
}
-base::string16 UnifiedSystemTray::GetAccessibleNameForQuickSettingsBubble() {
+std::u16string UnifiedSystemTray::GetAccessibleNameForQuickSettingsBubble() {
if (bubble_->unified_view()->IsDetailedViewShown())
return bubble_->unified_view()->GetDetailedViewAccessibleName();
@@ -398,13 +398,13 @@
item->HandleLocaleChange();
}
-base::string16 UnifiedSystemTray::GetAccessibleNameForTray() {
- base::string16 time = base::TimeFormatTimeOfDayWithHourClockType(
+std::u16string UnifiedSystemTray::GetAccessibleNameForTray() {
+ std::u16string time = base::TimeFormatTimeOfDayWithHourClockType(
base::Time::Now(),
Shell::Get()->system_tray_model()->clock()->hour_clock_type(),
base::kKeepAmPm);
- base::string16 battery = PowerStatus::Get()->GetAccessibleNameString(false);
- std::vector<base::string16> status = {time, battery};
+ std::u16string battery = PowerStatus::Get()->GetAccessibleNameString(false);
+ std::vector<std::u16string> status = {time, battery};
status.push_back(network_tray_view_->GetVisible()
? network_tray_view_->GetAccessibleNameString()
diff --git a/ash/system/unified/unified_system_tray.h b/ash/system/unified/unified_system_tray.h
index 87f78dd4..18b3a10 100644
--- a/ash/system/unified/unified_system_tray.h
+++ b/ash/system/unified/unified_system_tray.h
@@ -141,8 +141,8 @@
// TrayBackgroundView:
void ShowBubble() override;
void CloseBubble() override;
- base::string16 GetAccessibleNameForBubble() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForBubble() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubble(const TrayBubbleView* bubble_view) override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
@@ -156,7 +156,7 @@
// ShelfConfig::Observer:
void OnShelfConfigUpdated() override;
- base::string16 GetAccessibleNameForQuickSettingsBubble();
+ std::u16string GetAccessibleNameForQuickSettingsBubble();
UnifiedSystemTrayModel* model() { return model_.get(); }
UnifiedSystemTrayBubble* bubble() { return bubble_.get(); }
diff --git a/ash/system/unified/unified_system_tray_view.cc b/ash/system/unified/unified_system_tray_view.cc
index 9b9a8f0f..cac8bba 100644
--- a/ash/system/unified/unified_system_tray_view.cc
+++ b/ash/system/unified/unified_system_tray_view.cc
@@ -366,7 +366,7 @@
return feature_pods_container_->GetVisibleCount();
}
-base::string16 UnifiedSystemTrayView::GetDetailedViewAccessibleName() const {
+std::u16string UnifiedSystemTrayView::GetDetailedViewAccessibleName() const {
return controller_->detailed_view_controller()->GetAccessibleName();
}
diff --git a/ash/system/unified/unified_system_tray_view.h b/ash/system/unified/unified_system_tray_view.h
index 14b8d40..6ab674b 100644
--- a/ash/system/unified/unified_system_tray_view.h
+++ b/ash/system/unified/unified_system_tray_view.h
@@ -120,7 +120,7 @@
int GetVisibleFeaturePodCount() const;
// Get the accessible name for the currently shown detailed view.
- base::string16 GetDetailedViewAccessibleName() const;
+ std::u16string GetDetailedViewAccessibleName() const;
// Returns true if a detailed view is being shown in the tray. (e.g Bluetooth
// Settings).
diff --git a/ash/system/unified/user_chooser_detailed_view_controller.cc b/ash/system/unified/user_chooser_detailed_view_controller.cc
index 7fe4c860..6b56640 100644
--- a/ash/system/unified/user_chooser_detailed_view_controller.cc
+++ b/ash/system/unified/user_chooser_detailed_view_controller.cc
@@ -74,7 +74,7 @@
return new UserChooserView(this);
}
-base::string16 UserChooserDetailedViewController::GetAccessibleName() const {
+std::u16string UserChooserDetailedViewController::GetAccessibleName() const {
return l10n_util::GetStringUTF16(
IDS_ASH_QUICK_SETTINGS_BUBBLE_USER_SETTINGS_ACCESSIBLE_DESCRIPTION);
}
diff --git a/ash/system/unified/user_chooser_detailed_view_controller.h b/ash/system/unified/user_chooser_detailed_view_controller.h
index 6729554f..6401ccb 100644
--- a/ash/system/unified/user_chooser_detailed_view_controller.h
+++ b/ash/system/unified/user_chooser_detailed_view_controller.h
@@ -34,7 +34,7 @@
// DetailedViewController:
views::View* CreateView() override;
- base::string16 GetAccessibleName() const override;
+ std::u16string GetAccessibleName() const override;
private:
UnifiedSystemTrayController* tray_controller_;
diff --git a/ash/system/unified/user_chooser_view.cc b/ash/system/unified/user_chooser_view.cc
index 9186d59..475cc10 100644
--- a/ash/system/unified/user_chooser_view.cc
+++ b/ash/system/unified/user_chooser_view.cc
@@ -100,7 +100,7 @@
DISALLOW_COPY_AND_ASSIGN(Separator);
};
-views::View* CreateAddUserErrorView(const base::string16& message) {
+views::View* CreateAddUserErrorView(const std::u16string& message) {
auto* label = new views::Label(message);
label->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextColorPrimary));
@@ -137,7 +137,7 @@
return image_view;
}
-base::string16 GetUserItemAccessibleString(int user_index) {
+std::u16string GetUserItemAccessibleString(int user_index) {
DCHECK(Shell::Get());
const UserSession* const user_session =
Shell::Get()->session_controller()->GetUserSession(user_index);
@@ -265,11 +265,11 @@
capture_icon_->SetTooltipText(l10n_util::GetStringUTF16(res_id));
}
-base::string16 UserItemButton::GetTooltipText(const gfx::Point& p) const {
+std::u16string UserItemButton::GetTooltipText(const gfx::Point& p) const {
// If both of them are full shown, hide the tooltip.
if (name_->GetPreferredSize().width() <= name_->width() &&
email_->GetPreferredSize().width() <= email_->width()) {
- return base::string16();
+ return std::u16string();
}
return views::Button::GetTooltipText(p);
}
diff --git a/ash/system/unified/user_chooser_view.h b/ash/system/unified/user_chooser_view.h
index c2ac0641..b08bec0 100644
--- a/ash/system/unified/user_chooser_view.h
+++ b/ash/system/unified/user_chooser_view.h
@@ -22,7 +22,7 @@
views::View* CreateUserAvatarView(int user_index);
// Get accessibility string for |user_index|.
-base::string16 GetUserItemAccessibleString(int user_index);
+std::u16string GetUserItemAccessibleString(int user_index);
// A button item of a switchable user.
class UserItemButton : public views::Button {
@@ -37,7 +37,7 @@
void SetCaptureState(MediaCaptureState capture_states);
// views::Button:
- base::string16 GetTooltipText(const gfx::Point& p) const override;
+ std::u16string GetTooltipText(const gfx::Point& p) const override;
void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
private:
diff --git a/ash/system/update/update_notification_controller.cc b/ash/system/update/update_notification_controller.cc
index 9bcc8a97..1767df2 100644
--- a/ash/system/update/update_notification_controller.cc
+++ b/ash/system/update/update_notification_controller.cc
@@ -82,7 +82,7 @@
std::unique_ptr<Notification> notification = CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
GetNotificationTitle(), GetNotificationMessage(),
- base::string16() /* display_source */, GURL(),
+ std::u16string() /* display_source */, GURL(),
message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
kNotifierId),
message_center::RichNotificationData(),
@@ -123,11 +123,11 @@
return model_->update_required() || model_->update_over_cellular_available();
}
-base::string16 UpdateNotificationController::GetNotificationMessage() const {
+std::u16string UpdateNotificationController::GetNotificationMessage() const {
if (model_->update_type() == UpdateType::kLacros)
return l10n_util::GetStringUTF16(IDS_UPDATE_NOTIFICATION_MESSAGE_LACROS);
- base::string16 system_app_name =
+ std::u16string system_app_name =
l10n_util::GetStringUTF16(IDS_ASH_MESSAGE_CENTER_SYSTEM_APP_NAME);
if (model_->rollback()) {
return l10n_util::GetStringUTF16(IDS_UPDATE_NOTIFICATION_MESSAGE_ROLLBACK);
@@ -137,8 +137,8 @@
system_app_name);
}
- const base::string16 notification_body = model_->notification_body();
- base::string16 update_text;
+ const std::u16string notification_body = model_->notification_body();
+ std::u16string update_text;
if (model_->update_type() == UpdateType::kSystem &&
!notification_body.empty()) {
update_text = notification_body;
@@ -154,11 +154,11 @@
return update_text;
}
-base::string16 UpdateNotificationController::GetNotificationTitle() const {
+std::u16string UpdateNotificationController::GetNotificationTitle() const {
if (model_->update_type() == UpdateType::kLacros)
return l10n_util::GetStringUTF16(IDS_UPDATE_NOTIFICATION_TITLE_LACROS);
- const base::string16 notification_title = model_->notification_title();
+ const std::u16string notification_title = model_->notification_title();
if (!notification_title.empty())
return notification_title;
diff --git a/ash/system/update/update_notification_controller.h b/ash/system/update/update_notification_controller.h
index e4bfea860..0fd5490 100644
--- a/ash/system/update/update_notification_controller.h
+++ b/ash/system/update/update_notification_controller.h
@@ -33,8 +33,8 @@
friend class UpdateNotificationControllerTest;
bool ShouldShowUpdate() const;
- base::string16 GetNotificationTitle() const;
- base::string16 GetNotificationMessage() const;
+ std::u16string GetNotificationTitle() const;
+ std::u16string GetNotificationMessage() const;
void HandleNotificationClick(base::Optional<int> index);
void GenerateUpdateNotification(
base::Optional<bool> slow_boot_file_path_exists);
diff --git a/ash/system/update/update_notification_controller_unittest.cc b/ash/system/update/update_notification_controller_unittest.cc
index 136969a..87b49e1b 100644
--- a/ash/system/update/update_notification_controller_unittest.cc
+++ b/ash/system/update/update_notification_controller_unittest.cc
@@ -352,7 +352,7 @@
// Simulate notification type set back to default.
Shell::Get()->system_tray_model()->SetUpdateNotificationState(
- NotificationStyle::kDefault, base::string16(), base::string16());
+ NotificationStyle::kDefault, std::u16string(), std::u16string());
// Showing Update Notification posts a task to check for slow boot request
// and use the result of that check to generate appropriate notification. Wait
diff --git a/ash/system/user/login_status.cc b/ash/system/user/login_status.cc
index 88c4e68..2973d48f 100644
--- a/ash/system/user/login_status.cc
+++ b/ash/system/user/login_status.cc
@@ -14,7 +14,7 @@
namespace ash {
namespace user {
-base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status,
+std::u16string GetLocalizedSignOutStringForStatus(LoginStatus status,
bool multiline) {
int message_id;
switch (status) {
@@ -31,13 +31,13 @@
: IDS_ASH_STATUS_TRAY_SIGN_OUT;
break;
}
- base::string16 message =
+ std::u16string message =
ui::ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
// Desirable line breaking points are marked using \n. As the resource
// framework does not evaluate escape sequences, the \n need to be explicitly
// handled. Depending on the value of |multiline|, actual line breaks or
// spaces are substituted.
- base::string16 newline =
+ std::u16string newline =
multiline ? base::ASCIIToUTF16("\n") : base::ASCIIToUTF16(" ");
base::ReplaceSubstringsAfterOffset(&message, 0, base::ASCIIToUTF16("\\n"),
newline);
diff --git a/ash/system/user/login_status.h b/ash/system/user/login_status.h
index 197c97b..45ab0d5 100644
--- a/ash/system/user/login_status.h
+++ b/ash/system/user/login_status.h
@@ -13,7 +13,7 @@
namespace ash {
namespace user {
-base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status,
+std::u16string GetLocalizedSignOutStringForStatus(LoginStatus status,
bool multiline);
} // namespace user
diff --git a/ash/system/virtual_keyboard/virtual_keyboard_tray.cc b/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
index 274f802..6f898d4b 100644
--- a/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
+++ b/ash/system/virtual_keyboard/virtual_keyboard_tray.cc
@@ -54,7 +54,7 @@
Shell::Get()->accessibility_controller()->virtual_keyboard().enabled());
}
-base::string16 VirtualKeyboardTray::GetAccessibleNameForTray() {
+std::u16string VirtualKeyboardTray::GetAccessibleNameForTray() {
return l10n_util::GetStringUTF16(
IDS_ASH_VIRTUAL_KEYBOARD_TRAY_ACCESSIBLE_NAME);
}
diff --git a/ash/system/virtual_keyboard/virtual_keyboard_tray.h b/ash/system/virtual_keyboard/virtual_keyboard_tray.h
index 4553929..f392d403 100644
--- a/ash/system/virtual_keyboard/virtual_keyboard_tray.h
+++ b/ash/system/virtual_keyboard/virtual_keyboard_tray.h
@@ -30,7 +30,7 @@
// TrayBackgroundView:
void Initialize() override;
- base::string16 GetAccessibleNameForTray() override;
+ std::u16string GetAccessibleNameForTray() override;
void HandleLocaleChange() override;
void HideBubbleWithView(const TrayBubbleView* bubble_view) override;
void ClickedOutsideBubble() override;
diff --git a/ash/tooltips/tooltip_controller_unittest.cc b/ash/tooltips/tooltip_controller_unittest.cc
index 1ce99553..2fbe2b8 100644
--- a/ash/tooltips/tooltip_controller_unittest.cc
+++ b/ash/tooltips/tooltip_controller_unittest.cc
@@ -95,7 +95,7 @@
TEST_F(TooltipControllerTest, NonNullTooltipClient) {
EXPECT_TRUE(::wm::GetTooltipClient(Shell::GetPrimaryRootWindow()) != NULL);
- EXPECT_EQ(base::string16(), helper_->GetTooltipText());
+ EXPECT_EQ(std::u16string(), helper_->GetTooltipText());
EXPECT_EQ(NULL, helper_->GetTooltipWindow());
EXPECT_FALSE(helper_->IsTooltipVisible());
}
@@ -105,13 +105,13 @@
TooltipTestView* view = new TooltipTestView;
AddViewToWidgetAndResize(widget.get(), view);
view->set_tooltip_text(base::ASCIIToUTF16("Tooltip Text"));
- EXPECT_EQ(base::string16(), helper_->GetTooltipText());
+ EXPECT_EQ(std::u16string(), helper_->GetTooltipText());
EXPECT_EQ(NULL, helper_->GetTooltipWindow());
ui::test::EventGenerator generator(Shell::GetPrimaryRootWindow());
generator.MoveMouseRelativeTo(widget->GetNativeView(),
view->bounds().CenterPoint());
- base::string16 expected_tooltip = base::ASCIIToUTF16("Tooltip Text");
+ std::u16string expected_tooltip = base::ASCIIToUTF16("Tooltip Text");
// Mouse event triggers tooltip update so it becomes visible.
EXPECT_TRUE(helper_->IsTooltipVisible());
diff --git a/ash/touch/touch_hud_debug.cc b/ash/touch/touch_hud_debug.cc
index 845651e..d7be7ec7 100644
--- a/ash/touch/touch_hud_debug.cc
+++ b/ash/touch/touch_hud_debug.cc
@@ -303,7 +303,7 @@
if (widget()->IsVisible()) {
canvas_->Clear();
for (int i = 0; i < kMaxTouchPoints; ++i)
- touch_labels_[i]->SetText(base::string16());
+ touch_labels_[i]->SetText(std::u16string());
label_container_->SetSize(label_container_->GetPreferredSize());
}
}
diff --git a/ash/wm/desks/desk.cc b/ash/wm/desks/desk.cc
index 14a7a114..e2399bf 100644
--- a/ash/wm/desks/desk.cc
+++ b/ash/wm/desks/desk.cc
@@ -299,7 +299,7 @@
return base::AutoReset<bool>(&should_notify_content_changed_, false);
}
-void Desk::SetName(base::string16 new_name, bool set_by_user) {
+void Desk::SetName(std::u16string new_name, bool set_by_user) {
// Even if the user focuses the DeskNameView for the first time and hits enter
// without changing the desk's name (i.e. |new_name| is the same,
// |is_name_set_by_user_| is false, and |set_by_user| is true), we don't
diff --git a/ash/wm/desks/desk.h b/ash/wm/desks/desk.h
index ecefddf2..0f4f7ab6 100644
--- a/ash/wm/desks/desk.h
+++ b/ash/wm/desks/desk.h
@@ -47,7 +47,7 @@
virtual void OnDeskDestroyed(const Desk* desk) = 0;
// Called when the desk's name changes.
- virtual void OnDeskNameChanged(const base::string16& new_name) = 0;
+ virtual void OnDeskNameChanged(const std::u16string& new_name) = 0;
};
explicit Desk(int associated_container_id);
@@ -57,8 +57,7 @@
const std::vector<aura::Window*>& windows() const { return windows_; }
-
- const base::string16& name() const { return name_; }
+ const std::u16string& name() const { return name_; }
bool is_active() const { return is_active_; }
@@ -99,7 +98,7 @@
// Sets the desk's name to |new_name| and updates the observers.
// |set_by_user| should be true if this name was given to the desk by the user
// from its mini view in overview mode.
- void SetName(base::string16 new_name, bool set_by_user);
+ void SetName(std::u16string new_name, bool set_by_user);
// Prepares for the animation to activate this desk (i.e. this desk is not
// active yet), by showing its containers on all root windows while setting
@@ -197,7 +196,7 @@
std::vector<aura::Window*> windows_;
// The name given to this desk.
- base::string16 name_;
+ std::u16string name_;
// Maps all root windows to observer objects observing the containers
// associated with this desk on those root windows.
diff --git a/ash/wm/desks/desk_mini_view.cc b/ash/wm/desks/desk_mini_view.cc
index f0c3fc78..ab4c80eba 100644
--- a/ash/wm/desks/desk_mini_view.cc
+++ b/ash/wm/desks/desk_mini_view.cc
@@ -247,7 +247,7 @@
// No need to remove `this` as an observer; it's done automatically.
}
-void DeskMiniView::OnDeskNameChanged(const base::string16& new_name) {
+void DeskMiniView::OnDeskNameChanged(const std::u16string& new_name) {
if (is_desk_name_being_modified_)
return;
@@ -298,19 +298,19 @@
}
void DeskMiniView::ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
DCHECK_EQ(sender, desk_name_view_);
DCHECK(is_desk_name_being_modified_);
if (!desk_)
return;
// Avoid copying new_contents if we don't need to trim it below.
- const base::string16* new_text = &new_contents;
+ const std::u16string* new_text = &new_contents;
// To avoid potential security and memory issues, we don't allow desk names to
// have an unbounded length. Therefore we trim if needed at kMaxLength UTF-16
// boundary. Note that we don't care about code point boundaries in this case.
- base::string16 trimmed_new_contents;
+ std::u16string trimmed_new_contents;
if (new_contents.size() > DeskNameView::kMaxLength) {
trimmed_new_contents = new_contents;
trimmed_new_contents.resize(DeskNameView::kMaxLength);
diff --git a/ash/wm/desks/desk_mini_view.h b/ash/wm/desks/desk_mini_view.h
index be6ac08..5d4ca394 100644
--- a/ash/wm/desks/desk_mini_view.h
+++ b/ash/wm/desks/desk_mini_view.h
@@ -96,7 +96,7 @@
// Desk::Observer:
void OnContentChanged() override;
void OnDeskDestroyed(const Desk* desk) override;
- void OnDeskNameChanged(const base::string16& new_name) override;
+ void OnDeskNameChanged(const std::u16string& new_name) override;
// OverviewHighlightController::OverviewHighlightableView:
views::View* GetView() override;
@@ -108,7 +108,7 @@
// views::TextfieldController:
void ContentsChanged(views::Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
bool HandleKeyEvent(views::Textfield* sender,
const ui::KeyEvent& key_event) override;
bool HandleMouseEvent(views::Textfield* sender,
diff --git a/ash/wm/desks/desk_name_view.cc b/ash/wm/desks/desk_name_view.cc
index ad7cdc4..d87d6514f 100644
--- a/ash/wm/desks/desk_name_view.cc
+++ b/ash/wm/desks/desk_name_view.cc
@@ -75,7 +75,7 @@
focus_manager->SetStoredFocusView(nullptr);
}
-void DeskNameView::SetTextAndElideIfNeeded(const base::string16& text) {
+void DeskNameView::SetTextAndElideIfNeeded(const std::u16string& text) {
// Use the potential max size of this to calculate elision, not its current
// size to avoid eliding names that don't need to be.
SetText(
diff --git a/ash/wm/desks/desk_name_view.h b/ash/wm/desks/desk_name_view.h
index 000af932..779e108 100644
--- a/ash/wm/desks/desk_name_view.h
+++ b/ash/wm/desks/desk_name_view.h
@@ -34,7 +34,7 @@
// from any view on |widget|, where |widget| should be the desks bar widget.
static void CommitChanges(views::Widget* widget);
- void SetTextAndElideIfNeeded(const base::string16& text);
+ void SetTextAndElideIfNeeded(const std::u16string& text);
// If this view has focus, make the view's border visible and change
// background to its active color. If it doesn't have focus, hide the view's
@@ -74,7 +74,7 @@
WmHighlightItemBorder* border_ptr_;
// Full text without being elided.
- base::string16 full_text_;
+ std::u16string full_text_;
};
} // namespace ash
diff --git a/ash/wm/desks/desks_controller.cc b/ash/wm/desks/desks_controller.cc
index f3fb95a9..f082127 100644
--- a/ash/wm/desks/desks_controller.cc
+++ b/ash/wm/desks/desks_controller.cc
@@ -253,7 +253,7 @@
}
// static
-base::string16 DesksController::GetDeskDefaultName(size_t desk_index) {
+std::u16string DesksController::GetDeskDefaultName(size_t desk_index) {
DCHECK_LT(desk_index, desks_util::GetMaxNumberOfDesks());
return l10n_util::GetStringUTF16(kDeskDefaultNameIds[desk_index]);
}
@@ -669,7 +669,7 @@
desk->SetName(GetDeskDefaultName(GetDeskIndex(desk)), /*set_by_user=*/false);
}
-void DesksController::RestoreNameOfDeskAtIndex(base::string16 name,
+void DesksController::RestoreNameOfDeskAtIndex(std::u16string name,
size_t index) {
DCHECK(!name.empty());
DCHECK_LT(index, desks_.size());
@@ -732,9 +732,9 @@
return GetDeskIndex(active_desk_);
}
-base::string16 DesksController::GetDeskName(int index) const {
+std::u16string DesksController::GetDeskName(int index) const {
return index < static_cast<int>(desks_.size()) ? desks_[index]->name()
- : base::string16();
+ : std::u16string();
}
int DesksController::GetNumberOfDesks() const {
diff --git a/ash/wm/desks/desks_controller.h b/ash/wm/desks/desks_controller.h
index 4944d6f..460c56f 100644
--- a/ash/wm/desks/desks_controller.h
+++ b/ash/wm/desks/desks_controller.h
@@ -74,7 +74,7 @@
static DesksController* Get();
// Returns the default name for a desk at |desk_index|.
- static base::string16 GetDeskDefaultName(size_t desk_index);
+ static std::u16string GetDeskDefaultName(size_t desk_index);
const std::vector<std::unique_ptr<Desk>>& desks() const { return desks_; }
@@ -194,7 +194,7 @@
// Restores the desk at |index| to the given |name|. This is only for
// user-modified desk names, and hence |name| should never be empty since
// users are not allowed to set empty names.
- void RestoreNameOfDeskAtIndex(base::string16 name, size_t index);
+ void RestoreNameOfDeskAtIndex(std::u16string name, size_t index);
// Restores the creation time of the desk at |index|.
void RestoreCreationTimeOfDeskAtIndex(base::Time creation_time, size_t index);
@@ -220,7 +220,7 @@
// DesksHelper:
bool BelongsToActiveDesk(aura::Window* window) override;
int GetActiveDeskIndex() const override;
- base::string16 GetDeskName(int index) const override;
+ std::u16string GetDeskName(int index) const override;
int GetNumberOfDesks() const override;
void SendToDeskAtIndex(aura::Window* window, int desk_index) override;
diff --git a/ash/wm/desks/desks_unittests.cc b/ash/wm/desks/desks_unittests.cc
index b7c5c02..ac49290 100644
--- a/ash/wm/desks/desks_unittests.cc
+++ b/ash/wm/desks/desks_unittests.cc
@@ -332,7 +332,7 @@
// Desk::Observer:
void OnContentChanged() override { ++notify_counts_; }
void OnDeskDestroyed(const Desk* desk) override {}
- void OnDeskNameChanged(const base::string16& new_name) override {}
+ void OnDeskNameChanged(const std::u16string& new_name) override {}
private:
int notify_counts_ = 0;
@@ -2113,7 +2113,7 @@
SendKey(ui::VKEY_BACK);
// Simulate user is typing text beyond the max length.
- base::string16 expected_desk_name(DeskNameView::kMaxLength, L'a');
+ std::u16string expected_desk_name(DeskNameView::kMaxLength, L'a');
for (size_t i = 0; i < DeskNameView::kMaxLength + 10; ++i)
SendKey(ui::VKEY_A);
SendKey(ui::VKEY_RETURN);
@@ -2125,8 +2125,8 @@
EXPECT_TRUE(desk_1->is_name_set_by_user());
// Test that pasting a large amount of text is trimmed at the max length.
- base::string16 clipboard_text(DeskNameView::kMaxLength + 10, L'b');
- expected_desk_name = base::string16(DeskNameView::kMaxLength, L'b');
+ std::u16string clipboard_text(DeskNameView::kMaxLength + 10, L'b');
+ expected_desk_name = std::u16string(DeskNameView::kMaxLength, L'b');
EXPECT_GT(clipboard_text.size(), DeskNameView::kMaxLength);
ui::ScopedClipboardWriter(ui::ClipboardBuffer::kCopyPaste)
.WriteText(clipboard_text);
@@ -4130,7 +4130,7 @@
ClickOnView(new_desk_button, event_generator);
auto* desk_name_view = desks_bar_view->mini_views()[i]->desk_name_view();
EXPECT_TRUE(desk_name_view->HasFocus());
- EXPECT_EQ(base::string16(), controller->desks()[i]->name());
+ EXPECT_EQ(std::u16string(), controller->desks()[i]->name());
EXPECT_EQ(DesksController::GetDeskDefaultName(i),
desk_name_view->GetAccessibleName());
EXPECT_EQ(DesksController::GetDeskDefaultName(i - 1),
@@ -4701,8 +4701,8 @@
desks_bar_view = GetOverviewGridForRoot(root_window)->desks_bar_view();
auto* zero_state_default_desk_button =
desks_bar_view->zero_state_default_desk_button();
- base::string16 desk_button_text = zero_state_default_desk_button->GetText();
- base::string16 expected_desk_name(DeskNameView::kMaxLength, L'a');
+ std::u16string desk_button_text = zero_state_default_desk_button->GetText();
+ std::u16string expected_desk_name(DeskNameView::kMaxLength, L'a');
// Zero state desk button should show the elided name as the DeskNameView.
EXPECT_EQ(expected_desk_name,
DesksController::Get()->desks()[0].get()->name());
diff --git a/ash/wm/desks/expanded_state_new_desk_button.cc b/ash/wm/desks/expanded_state_new_desk_button.cc
index 2cb3b268..1dd0f53 100644
--- a/ash/wm/desks/expanded_state_new_desk_button.cc
+++ b/ash/wm/desks/expanded_state_new_desk_button.cc
@@ -32,7 +32,7 @@
class ASH_EXPORT InnerNewDeskButton : public DeskButtonBase {
public:
InnerNewDeskButton(ExpandedStateNewDeskButton* outer_button)
- : DeskButtonBase(base::string16(), kBorderCornerRadius, kCornerRadius),
+ : DeskButtonBase(std::u16string(), kBorderCornerRadius, kCornerRadius),
outer_button_(outer_button) {
paint_contents_only_ = true;
}
diff --git a/ash/wm/desks/zero_state_button.cc b/ash/wm/desks/zero_state_button.cc
index 1ec007f..f7f70b14 100644
--- a/ash/wm/desks/zero_state_button.cc
+++ b/ash/wm/desks/zero_state_button.cc
@@ -41,7 +41,7 @@
// -----------------------------------------------------------------------------
// DeskButtonBase:
-DeskButtonBase::DeskButtonBase(const base::string16& text,
+DeskButtonBase::DeskButtonBase(const std::u16string& text,
int border_corder_radius,
int corner_radius)
: LabelButton(base::BindRepeating(&DeskButtonBase::OnButtonPressed,
@@ -57,7 +57,7 @@
SetFocusPainter(nullptr);
SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY);
- const base::string16 tooltip_text =
+ const std::u16string tooltip_text =
text.empty() ? l10n_util::GetStringUTF16(IDS_ASH_DESKS_NEW_DESK_BUTTON)
: text;
SetAccessibleName(tooltip_text);
@@ -201,7 +201,7 @@
// ZeroStateNewDeskButton:
ZeroStateNewDeskButton::ZeroStateNewDeskButton()
- : DeskButtonBase(base::string16(), kCornerRadius, kCornerRadius) {
+ : DeskButtonBase(std::u16string(), kCornerRadius, kCornerRadius) {
highlight_on_hover_ = false;
}
diff --git a/ash/wm/desks/zero_state_button.h b/ash/wm/desks/zero_state_button.h
index 73b7c12..749cf30 100644
--- a/ash/wm/desks/zero_state_button.h
+++ b/ash/wm/desks/zero_state_button.h
@@ -20,7 +20,7 @@
: public views::LabelButton,
public OverviewHighlightController::OverviewHighlightableView {
public:
- DeskButtonBase(const base::string16& text,
+ DeskButtonBase(const std::u16string& text,
int border_corder_radius,
int corner_radius);
~DeskButtonBase() override = default;
diff --git a/ash/wm/overview/overview_highlight_controller_unittest.cc b/ash/wm/overview/overview_highlight_controller_unittest.cc
index f8ca597..0d669ca 100644
--- a/ash/wm/overview/overview_highlight_controller_unittest.cc
+++ b/ash/wm/overview/overview_highlight_controller_unittest.cc
@@ -781,7 +781,7 @@
desk_bar_view->mini_views()[index]->desk_name_view();
EXPECT_TRUE(desk_name_view->HasFocus());
EXPECT_EQ(GetHighlightedView(), desk_name_view);
- EXPECT_EQ(base::string16(), desk_name_view->GetText());
+ EXPECT_EQ(std::u16string(), desk_name_view->GetText());
};
// Use the keyboard to navigate to the new desk button.
diff --git a/ash/wm/overview/overview_session_unittest.cc b/ash/wm/overview/overview_session_unittest.cc
index 087a788..2770579 100644
--- a/ash/wm/overview/overview_session_unittest.cc
+++ b/ash/wm/overview/overview_session_unittest.cc
@@ -1615,7 +1615,7 @@
// Test that a label is created under the window on entering overview mode.
TEST_F(OverviewSessionTest, CreateLabelUnderWindow) {
std::unique_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(300, 500)));
- const base::string16 window_title = base::UTF8ToUTF16("My window");
+ const std::u16string window_title = base::UTF8ToUTF16("My window");
window->SetTitle(window_title);
ToggleOverview();
OverviewItem* window_item = GetOverviewItemsForRoot(0).back().get();
@@ -1626,7 +1626,7 @@
EXPECT_EQ(window_title, label->GetText());
// Update the window title and check that the label is updated, too.
- const base::string16 updated_title = base::UTF8ToUTF16("Updated title");
+ const std::u16string updated_title = base::UTF8ToUTF16("Updated title");
window->SetTitle(updated_title);
EXPECT_EQ(updated_title, label->GetText());
diff --git a/ash/wm/splitview/split_view_drag_indicators.cc b/ash/wm/splitview/split_view_drag_indicators.cc
index d6faeeb5..7655c7e 100644
--- a/ash/wm/splitview/split_view_drag_indicators.cc
+++ b/ash/wm/splitview/split_view_drag_indicators.cc
@@ -144,7 +144,7 @@
kSplitviewLabelHorizontalInsetDp)));
label_ = label_parent_->AddChildView(std::make_unique<views::Label>(
- base::string16(), views::style::CONTEXT_LABEL));
+ std::u16string(), views::style::CONTEXT_LABEL));
label_->SetEnabledColor(DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextColorPrimary,
kSplitviewLabelEnabledColor));
@@ -155,7 +155,7 @@
~RotatedImageLabelView() override = default;
- void SetLabelText(const base::string16& text) { label_->SetText(text); }
+ void SetLabelText(const std::u16string& text) { label_->SetText(text); }
// Called when the view's bounds are altered. Rotates the view by |angle|
// degrees.
diff --git a/ash/wm/splitview/split_view_utils.cc b/ash/wm/splitview/split_view_utils.cc
index 3e9ac61a..7ad43b66 100644
--- a/ash/wm/splitview/split_view_utils.cc
+++ b/ash/wm/splitview/split_view_utils.cc
@@ -409,7 +409,7 @@
Shell::Get()->toast_manager()->Show(ToastData(
kAppCannotSnapToastId,
l10n_util::GetStringUTF16(IDS_ASH_SPLIT_VIEW_CANNOT_SNAP),
- kAppCannotSnapToastDurationMs, base::Optional<base::string16>()));
+ kAppCannotSnapToastDurationMs, base::Optional<std::u16string>()));
}
SplitViewController::SnapPosition GetSnapPositionForLocation(
diff --git a/ash/wm/window_cycle/window_cycle_tab_slider_button.cc b/ash/wm/window_cycle/window_cycle_tab_slider_button.cc
index 46b233e..d151b25 100644
--- a/ash/wm/window_cycle/window_cycle_tab_slider_button.cc
+++ b/ash/wm/window_cycle/window_cycle_tab_slider_button.cc
@@ -29,7 +29,7 @@
WindowCycleTabSliderButton::WindowCycleTabSliderButton(
views::Button::PressedCallback callback,
- const base::string16& label_text)
+ const std::u16string& label_text)
: LabelButton(std::move(callback), label_text) {
SetHorizontalAlignment(gfx::ALIGN_CENTER);
diff --git a/ash/wm/window_cycle/window_cycle_tab_slider_button.h b/ash/wm/window_cycle/window_cycle_tab_slider_button.h
index 813867d..4dc7cdd 100644
--- a/ash/wm/window_cycle/window_cycle_tab_slider_button.h
+++ b/ash/wm/window_cycle/window_cycle_tab_slider_button.h
@@ -18,7 +18,7 @@
METADATA_HEADER(WindowCycleTabSliderButton);
WindowCycleTabSliderButton(views::Button::PressedCallback callback,
- const base::string16& label);
+ const std::u16string& label);
WindowCycleTabSliderButton(const WindowCycleTabSliderButton&) = delete;
WindowCycleTabSliderButton& operator=(const WindowCycleTabSliderButton&) =
delete;
diff --git a/ash/wm/window_mini_view.cc b/ash/wm/window_mini_view.cc
index 537c178..eaa15ad 100644
--- a/ash/wm/window_mini_view.cc
+++ b/ash/wm/window_mini_view.cc
@@ -32,9 +32,9 @@
// Values of the backdrop.
constexpr int kBackdropBorderRoundingDp = 4;
-base::string16 GetWindowTitle(aura::Window* window) {
+std::u16string GetWindowTitle(aura::Window* window) {
aura::Window* transient_root = wm::GetTransientRoot(window);
- const base::string16* overview_title =
+ const std::u16string* overview_title =
transient_root->GetProperty(chromeos::kWindowOverviewTitleKey);
return (overview_title && !overview_title->empty())
? *overview_title
diff --git a/base/android/content_uri_utils.cc b/base/android/content_uri_utils.cc
index 5713c16..0284dd8 100644
--- a/base/android/content_uri_utils.cc
+++ b/base/android/content_uri_utils.cc
@@ -43,7 +43,7 @@
}
bool MaybeGetFileDisplayName(const FilePath& content_uri,
- base::string16* file_display_name) {
+ std::u16string* file_display_name) {
if (!content_uri.IsContentUri())
return false;
diff --git a/base/android/content_uri_utils.h b/base/android/content_uri_utils.h
index 991e3c4..ebc2ebb 100644
--- a/base/android/content_uri_utils.h
+++ b/base/android/content_uri_utils.h
@@ -26,7 +26,7 @@
// Gets the display name from a content URI. Returns true if the name was found.
BASE_EXPORT bool MaybeGetFileDisplayName(const FilePath& content_uri,
- base::string16* file_display_name);
+ std::u16string* file_display_name);
// Deletes a content URI.
BASE_EXPORT bool DeleteContentUri(const FilePath& content_uri);
diff --git a/base/android/timezone_utils.cc b/base/android/timezone_utils.cc
index 73bce49..8680def 100644
--- a/base/android/timezone_utils.cc
+++ b/base/android/timezone_utils.cc
@@ -14,7 +14,7 @@
namespace base {
namespace android {
-base::string16 GetDefaultTimeZoneId() {
+std::u16string GetDefaultTimeZoneId() {
JNIEnv* env = base::android::AttachCurrentThread();
ScopedJavaLocalRef<jstring> timezone_id =
Java_TimezoneUtils_getDefaultTimeZoneId(env);
diff --git a/base/android/timezone_utils.h b/base/android/timezone_utils.h
index 3dc06bb2..ba0f04f0 100644
--- a/base/android/timezone_utils.h
+++ b/base/android/timezone_utils.h
@@ -16,7 +16,7 @@
namespace android {
// Return an ICU timezone created from the host timezone.
-BASE_EXPORT base::string16 GetDefaultTimeZoneId();
+BASE_EXPORT std::u16string GetDefaultTimeZoneId();
} // namespace android
} // namespace base
diff --git a/base/containers/contiguous_iterator_unittest.cc b/base/containers/contiguous_iterator_unittest.cc
index ff0e47b..ad2b4fa 100644
--- a/base/containers/contiguous_iterator_unittest.cc
+++ b/base/containers/contiguous_iterator_unittest.cc
@@ -234,21 +234,21 @@
}
TEST(ContiguousIterator, String16) {
- static_assert(IsContiguousIterator<base::string16::iterator>::value,
- "Error: base::string16:iterator should be considered a "
+ static_assert(IsContiguousIterator<std::u16string::iterator>::value,
+ "Error: std::u16string:iterator should be considered a "
"contiguous iterator.");
- static_assert(IsContiguousIterator<base::string16::const_iterator>::value,
- "Error: base::string16::const_iterator should be considered a "
+ static_assert(IsContiguousIterator<std::u16string::const_iterator>::value,
+ "Error: std::u16string::const_iterator should be considered a "
"contiguous iterator.");
- static_assert(!IsContiguousIterator<base::string16::reverse_iterator>::value,
- "Error: base::string16::reverse_iterator should not be "
+ static_assert(!IsContiguousIterator<std::u16string::reverse_iterator>::value,
+ "Error: std::u16string::reverse_iterator should not be "
"considered a contiguous iterator.");
static_assert(
- !IsContiguousIterator<base::string16::const_reverse_iterator>::value,
- "Error: base::string16::const_reverse_iterator should not be considered a"
+ !IsContiguousIterator<std::u16string::const_reverse_iterator>::value,
+ "Error: std::u16string::const_reverse_iterator should not be considered a"
"contiguous iterator.");
}
diff --git a/base/file_version_info.h b/base/file_version_info.h
index 4956c73..6f2383a8 100644
--- a/base/file_version_info.h
+++ b/base/file_version_info.h
@@ -55,16 +55,16 @@
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- virtual base::string16 company_name() = 0;
- virtual base::string16 company_short_name() = 0;
- virtual base::string16 product_name() = 0;
- virtual base::string16 product_short_name() = 0;
- virtual base::string16 internal_name() = 0;
- virtual base::string16 product_version() = 0;
- virtual base::string16 special_build() = 0;
- virtual base::string16 original_filename() = 0;
- virtual base::string16 file_description() = 0;
- virtual base::string16 file_version() = 0;
+ virtual std::u16string company_name() = 0;
+ virtual std::u16string company_short_name() = 0;
+ virtual std::u16string product_name() = 0;
+ virtual std::u16string product_short_name() = 0;
+ virtual std::u16string internal_name() = 0;
+ virtual std::u16string product_version() = 0;
+ virtual std::u16string special_build() = 0;
+ virtual std::u16string original_filename() = 0;
+ virtual std::u16string file_description() = 0;
+ virtual std::u16string file_version() = 0;
};
#endif // BASE_FILE_VERSION_INFO_H_
diff --git a/base/file_version_info_mac.h b/base/file_version_info_mac.h
index 0ac2b41..072771d 100644
--- a/base/file_version_info_mac.h
+++ b/base/file_version_info_mac.h
@@ -22,21 +22,21 @@
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- base::string16 company_name() override;
- base::string16 company_short_name() override;
- base::string16 product_name() override;
- base::string16 product_short_name() override;
- base::string16 internal_name() override;
- base::string16 product_version() override;
- base::string16 special_build() override;
- base::string16 original_filename() override;
- base::string16 file_description() override;
- base::string16 file_version() override;
+ std::u16string company_name() override;
+ std::u16string company_short_name() override;
+ std::u16string product_name() override;
+ std::u16string product_short_name() override;
+ std::u16string internal_name() override;
+ std::u16string product_version() override;
+ std::u16string special_build() override;
+ std::u16string original_filename() override;
+ std::u16string file_description() override;
+ std::u16string file_version() override;
private:
- // Returns a base::string16 value for a property name.
+ // Returns a std::u16string value for a property name.
// Returns the empty string if the property does not exist.
- base::string16 GetString16Value(CFStringRef name);
+ std::u16string GetString16Value(CFStringRef name);
base::scoped_nsobject<NSBundle> bundle_;
};
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm
index b463e8d7..e45979f6 100644
--- a/base/file_version_info_mac.mm
+++ b/base/file_version_info_mac.mm
@@ -32,34 +32,34 @@
return std::make_unique<FileVersionInfoMac>(bundle);
}
-base::string16 FileVersionInfoMac::company_name() {
- return base::string16();
+std::u16string FileVersionInfoMac::company_name() {
+ return std::u16string();
}
-base::string16 FileVersionInfoMac::company_short_name() {
- return base::string16();
+std::u16string FileVersionInfoMac::company_short_name() {
+ return std::u16string();
}
-base::string16 FileVersionInfoMac::internal_name() {
- return base::string16();
+std::u16string FileVersionInfoMac::internal_name() {
+ return std::u16string();
}
-base::string16 FileVersionInfoMac::product_name() {
+std::u16string FileVersionInfoMac::product_name() {
return GetString16Value(kCFBundleNameKey);
}
-base::string16 FileVersionInfoMac::product_short_name() {
+std::u16string FileVersionInfoMac::product_short_name() {
return GetString16Value(kCFBundleNameKey);
}
-base::string16 FileVersionInfoMac::product_version() {
+std::u16string FileVersionInfoMac::product_version() {
// On OS X, CFBundleVersion is used by LaunchServices, and must follow
// specific formatting rules, so the four-part Chrome version is in
// CFBundleShortVersionString. On iOS, both have a policy-enfoced limit
// of three version components, so the full version is stored in a custom
// key (CrBundleVersion) falling back to CFBundleVersion if not present.
#if defined(OS_IOS)
- base::string16 version(GetString16Value(CFSTR("CrBundleVersion")));
+ std::u16string version(GetString16Value(CFSTR("CrBundleVersion")));
if (version.length() > 0)
return version;
return GetString16Value(CFSTR("CFBundleVersion"));
@@ -68,23 +68,23 @@
#endif // defined(OS_IOS)
}
-base::string16 FileVersionInfoMac::file_description() {
- return base::string16();
+std::u16string FileVersionInfoMac::file_description() {
+ return std::u16string();
}
-base::string16 FileVersionInfoMac::file_version() {
+std::u16string FileVersionInfoMac::file_version() {
return product_version();
}
-base::string16 FileVersionInfoMac::original_filename() {
+std::u16string FileVersionInfoMac::original_filename() {
return GetString16Value(kCFBundleNameKey);
}
-base::string16 FileVersionInfoMac::special_build() {
- return base::string16();
+std::u16string FileVersionInfoMac::special_build() {
+ return std::u16string();
}
-base::string16 FileVersionInfoMac::GetString16Value(CFStringRef name) {
+std::u16string FileVersionInfoMac::GetString16Value(CFStringRef name) {
if (bundle_) {
NSString *ns_name = base::mac::CFToNSCast(name);
NSString* value = [bundle_ objectForInfoDictionaryKey:ns_name];
@@ -92,5 +92,5 @@
return base::SysNSStringToUTF16(value);
}
}
- return base::string16();
+ return std::u16string();
}
diff --git a/base/file_version_info_win.cc b/base/file_version_info_win.cc
index de13990..3be3327 100644
--- a/base/file_version_info_win.cc
+++ b/base/file_version_info_win.cc
@@ -96,48 +96,48 @@
std::move(data), translate->language, translate->code_page));
}
-base::string16 FileVersionInfoWin::company_name() {
+std::u16string FileVersionInfoWin::company_name() {
return GetStringValue(u"CompanyName");
}
-base::string16 FileVersionInfoWin::company_short_name() {
+std::u16string FileVersionInfoWin::company_short_name() {
return GetStringValue(u"CompanyShortName");
}
-base::string16 FileVersionInfoWin::internal_name() {
+std::u16string FileVersionInfoWin::internal_name() {
return GetStringValue(u"InternalName");
}
-base::string16 FileVersionInfoWin::product_name() {
+std::u16string FileVersionInfoWin::product_name() {
return GetStringValue(u"ProductName");
}
-base::string16 FileVersionInfoWin::product_short_name() {
+std::u16string FileVersionInfoWin::product_short_name() {
return GetStringValue(u"ProductShortName");
}
-base::string16 FileVersionInfoWin::product_version() {
+std::u16string FileVersionInfoWin::product_version() {
return GetStringValue(u"ProductVersion");
}
-base::string16 FileVersionInfoWin::file_description() {
+std::u16string FileVersionInfoWin::file_description() {
return GetStringValue(u"FileDescription");
}
-base::string16 FileVersionInfoWin::file_version() {
+std::u16string FileVersionInfoWin::file_version() {
return GetStringValue(u"FileVersion");
}
-base::string16 FileVersionInfoWin::original_filename() {
+std::u16string FileVersionInfoWin::original_filename() {
return GetStringValue(u"OriginalFilename");
}
-base::string16 FileVersionInfoWin::special_build() {
+std::u16string FileVersionInfoWin::special_build() {
return GetStringValue(u"SpecialBuild");
}
bool FileVersionInfoWin::GetValue(const char16_t* name,
- base::string16* value) const {
+ std::u16string* value) const {
const struct LanguageAndCodePage lang_codepages[] = {
// Use the language and codepage from the DLL.
{language_, code_page_},
@@ -165,8 +165,8 @@
return false;
}
-base::string16 FileVersionInfoWin::GetStringValue(const char16_t* name) const {
- base::string16 str;
+std::u16string FileVersionInfoWin::GetStringValue(const char16_t* name) const {
+ std::u16string str;
GetValue(name, &str);
return str;
}
diff --git a/base/file_version_info_win.h b/base/file_version_info_win.h
index 65849668..4ff8319ea 100644
--- a/base/file_version_info_win.h
+++ b/base/file_version_info_win.h
@@ -28,24 +28,24 @@
// Accessors to the different version properties.
// Returns an empty string if the property is not found.
- base::string16 company_name() override;
- base::string16 company_short_name() override;
- base::string16 product_name() override;
- base::string16 product_short_name() override;
- base::string16 internal_name() override;
- base::string16 product_version() override;
- base::string16 special_build() override;
- base::string16 original_filename() override;
- base::string16 file_description() override;
- base::string16 file_version() override;
+ std::u16string company_name() override;
+ std::u16string company_short_name() override;
+ std::u16string product_name() override;
+ std::u16string product_short_name() override;
+ std::u16string internal_name() override;
+ std::u16string product_version() override;
+ std::u16string special_build() override;
+ std::u16string original_filename() override;
+ std::u16string file_description() override;
+ std::u16string file_version() override;
// Lets you access other properties not covered above. |value| is only
// modified if GetValue() returns true.
- bool GetValue(const char16_t* name, base::string16* value) const;
+ bool GetValue(const char16_t* name, std::u16string* value) const;
// Similar to GetValue but returns a string16 (empty string if the property
// does not exist).
- base::string16 GetStringValue(const char16_t* name) const;
+ std::u16string GetStringValue(const char16_t* name) const;
// Get file version number in dotted version format.
base::Version GetFileVersion() const;
diff --git a/base/file_version_info_win_unittest.cc b/base/file_version_info_win_unittest.cc
index a281440..c5e4658 100644
--- a/base/file_version_info_win_unittest.cc
+++ b/base/file_version_info_win_unittest.cc
@@ -135,7 +135,7 @@
ASSERT_TRUE(version_info);
// Test few existing properties.
- base::string16 str;
+ std::u16string str;
FileVersionInfoWin* version_info_win =
static_cast<FileVersionInfoWin*>(version_info.get());
EXPECT_TRUE(version_info_win->GetValue(u"Custom prop 1", &str));
@@ -153,7 +153,7 @@
// Test an non-existing property.
EXPECT_FALSE(version_info_win->GetValue(u"Unknown property", &str));
- EXPECT_EQ(base::string16(),
+ EXPECT_EQ(std::u16string(),
version_info_win->GetStringValue(u"Unknown property"));
EXPECT_EQ(base::Version(std::vector<uint32_t>{1, 0, 0, 1}),
diff --git a/base/files/file_path.cc b/base/files/file_path.cc
index 24abb851..d14eca1 100644
--- a/base/files/file_path.cc
+++ b/base/files/file_path.cc
@@ -685,7 +685,7 @@
bool FilePath::ReadFromPickle(PickleIterator* iter) {
#if defined(OS_WIN)
- base::string16 path;
+ std::u16string path;
if (!iter->ReadString16(&path))
return false;
path_ = UTF16ToWide(path);
diff --git a/base/i18n/break_iterator_unittest.cc b/base/i18n/break_iterator_unittest.cc
index 0501424b..3503ae4 100644
--- a/base/i18n/break_iterator_unittest.cc
+++ b/base/i18n/break_iterator_unittest.cc
@@ -562,7 +562,7 @@
// A string containing the English word "foo", followed by two Khmer
// characters, the English word "Can", and then two Russian characters and
// punctuation.
- base::string16 text(
+ std::u16string text(
base::WideToUTF16(L"foo \x1791\x17C1 \nCan \x041C\x0438..."));
BreakIterator iter(text, BreakIterator::BREAK_LINE);
ASSERT_TRUE(iter.Init());
@@ -594,7 +594,7 @@
// A string containing the English word "foo", followed by two Khmer
// characters, the English word "Can", and then two Russian characters and
// punctuation.
- base::string16 text(
+ std::u16string text(
base::WideToUTF16(L"foo \x1791\x17C1 \nCan \x041C\x0438..."));
BreakIterator iter(text, BreakIterator::BREAK_WORD);
ASSERT_TRUE(iter.Init());
diff --git a/base/i18n/unicodestring.h b/base/i18n/unicodestring.h
index 5ec245e..031d036 100644
--- a/base/i18n/unicodestring.h
+++ b/base/i18n/unicodestring.h
@@ -20,10 +20,10 @@
inline string16 UnicodeStringToString16(const icu::UnicodeString& unistr) {
#if U_ICU_VERSION_MAJOR_NUM >= 59
- return base::string16(icu::toUCharPtr(unistr.getBuffer()),
+ return std::u16string(icu::toUCharPtr(unistr.getBuffer()),
static_cast<size_t>(unistr.length()));
#else
- return base::string16(unistr.getBuffer(),
+ return std::u16string(unistr.getBuffer(),
static_cast<size_t>(unistr.length()));
#endif
}
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index 88e0704..841e5f7 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -867,27 +867,27 @@
// Basic stream test.
{
std::ostringstream stream;
- stream << "Empty '" << base::string16() << "' standard '"
- << base::string16(base::ASCIIToUTF16("Hello, world")) << "'";
+ stream << "Empty '" << std::u16string() << "' standard '"
+ << std::u16string(base::ASCIIToUTF16("Hello, world")) << "'";
EXPECT_STREQ("Empty '' standard 'Hello, world'", stream.str().c_str());
}
// Interesting edge cases.
{
// These should each get converted to the invalid character: EF BF BD.
- base::string16 initial_surrogate;
+ std::u16string initial_surrogate;
initial_surrogate.push_back(0xd800);
- base::string16 final_surrogate;
+ std::u16string final_surrogate;
final_surrogate.push_back(0xdc00);
// Old italic A = U+10300, will get converted to: F0 90 8C 80 'z'.
- base::string16 surrogate_pair;
+ std::u16string surrogate_pair;
surrogate_pair.push_back(0xd800);
surrogate_pair.push_back(0xdf00);
surrogate_pair.push_back('z');
// Will get converted to the invalid char + 's': EF BF BD 's'.
- base::string16 unterminated_surrogate;
+ std::u16string unterminated_surrogate;
unterminated_surrogate.push_back(0xd800);
unterminated_surrogate.push_back('s');
diff --git a/base/pickle_fuzzer.cc b/base/pickle_fuzzer.cc
index 90cabb6eb..2f06f995 100644
--- a/base/pickle_fuzzer.cc
+++ b/base/pickle_fuzzer.cc
@@ -86,7 +86,7 @@
break;
}
case 11: {
- base::string16 result;
+ std::u16string result;
ignore_result(iter.ReadString16(&result));
break;
}
diff --git a/base/stl_util_unittest.cc b/base/stl_util_unittest.cc
index 1a172eb..ece60d4b 100644
--- a/base/stl_util_unittest.cc
+++ b/base/stl_util_unittest.cc
@@ -544,13 +544,13 @@
}
TEST(Erase, String16) {
- std::pair<base::string16, base::string16> test_data[] = {
- {base::string16(), base::string16()},
+ std::pair<std::u16string, std::u16string> test_data[] = {
+ {std::u16string(), std::u16string()},
{UTF8ToUTF16("abc"), UTF8ToUTF16("bc")},
{UTF8ToUTF16("abca"), UTF8ToUTF16("bc")},
};
- const base::string16 letters = UTF8ToUTF16("ab");
+ const std::u16string letters = UTF8ToUTF16("ab");
for (auto test_case : test_data) {
Erase(test_case.first, letters[0]);
EXPECT_EQ(test_case.second, test_case.first);
diff --git a/base/strings/string_number_conversions_fuzzer.cc b/base/strings/string_number_conversions_fuzzer.cc
index 064923d..3ec395c 100644
--- a/base/strings/string_number_conversions_fuzzer.cc
+++ b/base/strings/string_number_conversions_fuzzer.cc
@@ -44,7 +44,7 @@
const size_t size,
bool (*string_to_num)(base::StringPiece16,
NumberType*)) {
- return CheckRoundtripsT<NumberType, base::StringPiece16, base::string16>(
+ return CheckRoundtripsT<NumberType, base::StringPiece16, std::u16string>(
data, size, &base::NumberToString16, string_to_num);
}
diff --git a/base/strings/string_piece.h b/base/strings/string_piece.h
index 15d4119..292c108 100644
--- a/base/strings/string_piece.h
+++ b/base/strings/string_piece.h
@@ -98,7 +98,7 @@
// StringPiece and StringPiece16.
//
// This is templatized by string class type rather than character type, so
-// BasicStringPiece<std::string> or BasicStringPiece<base::string16>.
+// BasicStringPiece<std::string> or BasicStringPiece<std::u16string>.
template <typename STRING_TYPE> class BasicStringPiece {
public:
// Standard STL container boilerplate.
diff --git a/base/strings/string_util.h b/base/strings/string_util.h
index 71fdd6d..1008576b 100644
--- a/base/strings/string_util.h
+++ b/base/strings/string_util.h
@@ -408,11 +408,10 @@
// Starting at |start_offset| (usually 0), replace the first instance of
// |find_this| with |replace_with|.
-BASE_EXPORT void ReplaceFirstSubstringAfterOffset(
- base::string16* str,
- size_t start_offset,
- StringPiece16 find_this,
- StringPiece16 replace_with);
+BASE_EXPORT void ReplaceFirstSubstringAfterOffset(std::u16string* str,
+ size_t start_offset,
+ StringPiece16 find_this,
+ StringPiece16 replace_with);
BASE_EXPORT void ReplaceFirstSubstringAfterOffset(
std::string* str,
size_t start_offset,
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index 2db741d..fe69fec0 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -756,7 +756,7 @@
{"abababab", 1, "aba", "c", "abcbab"},
};
- // base::string16 variant
+ // std::u16string variant
for (const auto& scenario : cases) {
string16 str = ASCIIToUTF16(scenario.str);
ReplaceSubstringsAfterOffset(&str, scenario.start_offset,
diff --git a/base/strings/sys_string_conversions_mac_unittest.mm b/base/strings/sys_string_conversions_mac_unittest.mm
index 7c76d4b..04d56009 100644
--- a/base/strings/sys_string_conversions_mac_unittest.mm
+++ b/base/strings/sys_string_conversions_mac_unittest.mm
@@ -46,9 +46,9 @@
TEST(SysStrings, RoundTripsFromUTF16) {
for (const auto& string8 : GetRoundTripStrings()) {
- base::string16 string16 = base::UTF8ToUTF16(string8);
+ std::u16string string16 = base::UTF8ToUTF16(string8);
NSString* nsstring16 = SysUTF16ToNSString(string16);
- base::string16 back16 = SysNSStringToUTF16(nsstring16);
+ std::u16string back16 = SysNSStringToUTF16(nsstring16);
EXPECT_EQ(string16, back16);
}
}
diff --git a/base/strings/utf_string_conversions_fuzzer.cc b/base/strings/utf_string_conversions_fuzzer.cc
index 1e034c8..ca1832f 100644
--- a/base/strings/utf_string_conversions_fuzzer.cc
+++ b/base/strings/utf_string_conversions_fuzzer.cc
@@ -8,7 +8,7 @@
std::string output_std_string;
std::wstring output_std_wstring;
-base::string16 output_string16;
+std::u16string output_string16;
// Entry point for LibFuzzer.
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
diff --git a/base/util/values/values_util.h b/base/util/values/values_util.h
index 2958ae0..c24896d 100644
--- a/base/util/values/values_util.h
+++ b/base/util/values/values_util.h
@@ -43,7 +43,7 @@
base::Optional<base::Time> ValueToTime(const base::Value* value);
base::Optional<base::Time> ValueToTime(const base::Value& value);
-// Converts between a base::FilePath (a std::string or base::string16) and a
+// Converts between a base::FilePath (a std::string or std::u16string) and a
// string-flavored base::Value (the UTF-8 representation).
base::Value FilePathToValue(base::FilePath file_path);
base::Optional<base::FilePath> ValueToFilePath(const base::Value* value);
diff --git a/build/build_config.h b/build/build_config.h
index c37c7429..0f1cd57 100644
--- a/build/build_config.h
+++ b/build/build_config.h
@@ -224,7 +224,7 @@
// The compiler thinks std::string::const_iterator and "const char*" are
// equivalent types.
#define STD_STRING_ITERATOR_IS_CHAR_POINTER
-// The compiler thinks base::string16::const_iterator and "char16*" are
+// The compiler thinks std::u16string::const_iterator and "char16*" are
// equivalent types.
#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
#endif
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 6abb9ed..d7d87dc 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -221,7 +221,7 @@
printer_info.pPrinterName = const_cast<LPWSTR>(driver_name.c_str());
printer_info.pComment = const_cast<LPWSTR>(driver_name.c_str());
printer_info.pLocation = const_cast<LPWSTR>(kGcpUrl);
- base::string16 port_name;
+ std::u16string port_name;
printer_info.pPortName = const_cast<LPWSTR>(kPortName);
printer_info.Attributes = PRINTER_ATTRIBUTE_DIRECT | PRINTER_ATTRIBUTE_LOCAL;
printer_info.pPrintProcessor = const_cast<LPWSTR>(L"winprint");
diff --git a/device/base/device_info_query_win.cc b/device/base/device_info_query_win.cc
index e12699c..e05ab9d 100644
--- a/device/base/device_info_query_win.cc
+++ b/device/base/device_info_query_win.cc
@@ -53,7 +53,7 @@
return false;
}
- base::string16 buffer;
+ std::u16string buffer;
if (!SetupDiGetDeviceProperty(
device_info_list_, &device_info_data_, &property, &property_type,
reinterpret_cast<PBYTE>(base::WriteInto(&buffer, required_size)),
diff --git a/device/bluetooth/bluetooth_classic_win_fake.cc b/device/bluetooth/bluetooth_classic_win_fake.cc
index 8db19c7..7acb9f8 100644
--- a/device/bluetooth/bluetooth_classic_win_fake.cc
+++ b/device/bluetooth/bluetooth_classic_win_fake.cc
@@ -86,7 +86,7 @@
}
BluetoothRadio* BluetoothClassicWrapperFake::SimulateARadio(
- base::string16 name,
+ std::u16string name,
BLUETOOTH_ADDRESS address) {
BluetoothRadio* radio = new BluetoothRadio();
radio->is_connectable = true; // set it connectable by default.
diff --git a/device/bluetooth/bluetooth_classic_win_fake.h b/device/bluetooth/bluetooth_classic_win_fake.h
index 03b4021..903ff523 100644
--- a/device/bluetooth/bluetooth_classic_win_fake.h
+++ b/device/bluetooth/bluetooth_classic_win_fake.h
@@ -41,7 +41,7 @@
DWORD LastError() override;
bool HasHandle() override;
- BluetoothRadio* SimulateARadio(base::string16 name,
+ BluetoothRadio* SimulateARadio(std::u16string name,
BLUETOOTH_ADDRESS address);
private:
diff --git a/device/bluetooth/bluetooth_device.cc b/device/bluetooth/bluetooth_device.cc
index 21d7c38..c824066c 100644
--- a/device/bluetooth/bluetooth_device.cc
+++ b/device/bluetooth/bluetooth_device.cc
@@ -110,7 +110,7 @@
BluetoothDevice::ConnectionInfo::~ConnectionInfo() = default;
-base::string16 BluetoothDevice::GetNameForDisplay() const {
+std::u16string BluetoothDevice::GetNameForDisplay() const {
base::Optional<std::string> name = GetName();
if (name && HasGraphicCharacter(name.value())) {
return base::UTF8ToUTF16(name.value());
@@ -119,8 +119,8 @@
}
}
-base::string16 BluetoothDevice::GetAddressWithLocalizedDeviceTypeName() const {
- base::string16 address_utf16 = base::UTF8ToUTF16(GetAddress());
+std::u16string BluetoothDevice::GetAddressWithLocalizedDeviceTypeName() const {
+ std::u16string address_utf16 = base::UTF8ToUTF16(GetAddress());
BluetoothDeviceType device_type = GetDeviceType();
switch (device_type) {
case BluetoothDeviceType::COMPUTER:
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index 3c22b2f..8589f76 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -254,7 +254,7 @@
// Returns the name of the device suitable for displaying, this may
// be a synthesized string containing the address and localized type name
// if the device has no obtained name.
- virtual base::string16 GetNameForDisplay() const;
+ virtual std::u16string GetNameForDisplay() const;
// Returns the type of the device, limited to those we support or are
// aware of, by decoding the bluetooth class information. The returned
@@ -775,7 +775,7 @@
private:
// Returns a localized string containing the device's bluetooth address and
// a device type for display when |name_| is empty.
- base::string16 GetAddressWithLocalizedDeviceTypeName() const;
+ std::u16string GetAddressWithLocalizedDeviceTypeName() const;
#if defined(OS_CHROMEOS) || defined(OS_LINUX)
// Remaining battery level of the device.
diff --git a/device/bluetooth/bluetooth_socket_win.cc b/device/bluetooth/bluetooth_socket_win.cc
index c62ad902..b744559 100644
--- a/device/bluetooth/bluetooth_socket_win.cc
+++ b/device/bluetooth/bluetooth_socket_win.cc
@@ -72,7 +72,7 @@
SOCKADDR_BTH address;
CSADDR_INFO address_info;
GUID uuid;
- base::string16 name;
+ std::u16string name;
WSAQUERYSET service;
};
@@ -298,7 +298,7 @@
reg_data->address_info.iSocketType = SOCK_STREAM;
reg_data->address_info.iProtocol = BTHPROTO_RFCOMM;
- base::string16 cannonical_uuid =
+ std::u16string cannonical_uuid =
u"{" + base::ASCIIToUTF16(uuid.canonical_value()) + u"}";
if (!SUCCEEDED(
CLSIDFromString(base::as_wcstr(cannonical_uuid), ®_data->uuid))) {
diff --git a/device/bluetooth/public/cpp/bluetooth_uuid.cc b/device/bluetooth/public/cpp/bluetooth_uuid.cc
index bb11d20..7a52c9f 100644
--- a/device/bluetooth/public/cpp/bluetooth_uuid.cc
+++ b/device/bluetooth/public/cpp/bluetooth_uuid.cc
@@ -100,7 +100,7 @@
// static
GUID BluetoothUUID::GetCanonicalValueAsGUID(base::StringPiece uuid) {
DCHECK_EQ(36u, uuid.size());
- base::string16 braced_uuid = u'{' + base::UTF8ToUTF16(uuid) + u'}';
+ std::u16string braced_uuid = u'{' + base::UTF8ToUTF16(uuid) + u'}';
GUID guid;
CHECK_EQ(NOERROR, ::CLSIDFromString(base::as_wcstr(braced_uuid), &guid));
return guid;
diff --git a/device/bluetooth/test/fake_peripheral.cc b/device/bluetooth/test/fake_peripheral.cc
index 0767665a..fe7b24e3 100644
--- a/device/bluetooth/test/fake_peripheral.cc
+++ b/device/bluetooth/test/fake_peripheral.cc
@@ -171,8 +171,8 @@
return name_;
}
-base::string16 FakePeripheral::GetNameForDisplay() const {
- return base::string16();
+std::u16string FakePeripheral::GetNameForDisplay() const {
+ return std::u16string();
}
bool FakePeripheral::IsPaired() const {
diff --git a/device/bluetooth/test/fake_peripheral.h b/device/bluetooth/test/fake_peripheral.h
index a4552e4..5eb4ae75 100644
--- a/device/bluetooth/test/fake_peripheral.h
+++ b/device/bluetooth/test/fake_peripheral.h
@@ -81,7 +81,7 @@
uint16_t GetDeviceID() const override;
uint16_t GetAppearance() const override;
base::Optional<std::string> GetName() const override;
- base::string16 GetNameForDisplay() const override;
+ std::u16string GetNameForDisplay() const override;
bool IsPaired() const override;
bool IsConnected() const override;
bool IsGattConnected() const override;
diff --git a/device/bluetooth/test/mock_bluetooth_device.h b/device/bluetooth/test/mock_bluetooth_device.h
index 02569e7..154f231 100644
--- a/device/bluetooth/test/mock_bluetooth_device.h
+++ b/device/bluetooth/test/mock_bluetooth_device.h
@@ -47,7 +47,7 @@
MOCK_CONST_METHOD0(GetDeviceID, uint16_t());
MOCK_CONST_METHOD0(GetAppearance, uint16_t());
MOCK_CONST_METHOD0(GetName, base::Optional<std::string>());
- MOCK_CONST_METHOD0(GetNameForDisplay, base::string16());
+ MOCK_CONST_METHOD0(GetNameForDisplay, std::u16string());
MOCK_CONST_METHOD0(GetDeviceType, BluetoothDeviceType());
MOCK_CONST_METHOD0(IsPaired, bool());
MOCK_CONST_METHOD0(IsConnected, bool());
diff --git a/device/fido/auth_token_requester.cc b/device/fido/auth_token_requester.cc
index 6b41b54f..ce90e50 100644
--- a/device/fido/auth_token_requester.cc
+++ b/device/fido/auth_token_requester.cc
@@ -248,7 +248,7 @@
base::BindOnce(&AuthTokenRequester::HavePIN, weak_factory_.GetWeakPtr()));
}
-void AuthTokenRequester::HavePIN(base::string16 pin16) {
+void AuthTokenRequester::HavePIN(std::u16string pin16) {
pin::PINEntryError error = pin::ValidatePIN(
pin16, authenticator_->CurrentMinPINLength(), current_pin_);
if (error != pin::PINEntryError::kNoError) {
@@ -320,7 +320,7 @@
weak_factory_.GetWeakPtr()));
}
-void AuthTokenRequester::HaveNewPIN(base::string16 pin16) {
+void AuthTokenRequester::HaveNewPIN(std::u16string pin16) {
pin::PINEntryError error =
pin::ValidatePIN(pin16, authenticator_->NewMinPINLength(), current_pin_);
if (error != pin::PINEntryError::kNoError) {
diff --git a/device/fido/auth_token_requester.h b/device/fido/auth_token_requester.h
index a5882e2..a5e3615 100644
--- a/device/fido/auth_token_requester.h
+++ b/device/fido/auth_token_requester.h
@@ -64,7 +64,7 @@
public:
// ProvidePINCallback is used to provide the AuthTokenRequester with a PIN
// entered by the user.
- using ProvidePINCallback = base::OnceCallback<void(base::string16 pin)>;
+ using ProvidePINCallback = base::OnceCallback<void(std::u16string pin)>;
virtual ~Delegate();
@@ -138,13 +138,13 @@
void ObtainTokenFromPIN();
void OnGetPINRetries(CtapDeviceResponseCode status,
base::Optional<pin::RetriesResponse> response);
- void HavePIN(base::string16 pin);
+ void HavePIN(std::u16string pin);
void OnGetPINToken(std::string pin,
CtapDeviceResponseCode status,
base::Optional<pin::TokenResponse> response);
void ObtainTokenFromNewPIN();
- void HaveNewPIN(base::string16 pin);
+ void HaveNewPIN(std::u16string pin);
void OnSetPIN(std::string pin,
CtapDeviceResponseCode status,
base::Optional<pin::EmptyResponse> response);
diff --git a/device/fido/auth_token_requester_unittest.cc b/device/fido/auth_token_requester_unittest.cc
index d80e47a..82a3668 100644
--- a/device/fido/auth_token_requester_unittest.cc
+++ b/device/fido/auth_token_requester_unittest.cc
@@ -42,7 +42,7 @@
pin::PINEntryError error = pin::PINEntryError::kNoError;
uint32_t min_pin_length = kMinPinLength;
int attempts = 8;
- base::string16 pin = base::UTF8ToUTF16(kTestPIN);
+ std::u16string pin = base::UTF8ToUTF16(kTestPIN);
};
struct TestCase {
@@ -84,7 +84,7 @@
DCHECK_EQ(min_pin_length, expectations_.front().min_pin_length);
DCHECK_EQ(attempts, expectations_.front().attempts);
- base::string16 pin = expectations_.front().pin;
+ std::u16string pin = expectations_.front().pin;
expectations_.pop_front();
std::move(provide_pin_cb).Run(pin);
}
@@ -392,7 +392,7 @@
UserVerificationAvailability::kNotSupported,
true,
{{.reason = pin::PINEntryReason::kChallenge,
- .pin = base::string16({0xd800, 0xd800, 0xd800, 0xd800})},
+ .pin = std::u16string({0xd800, 0xd800, 0xd800, 0xd800})},
{pin::PINEntryReason::kChallenge,
pin::PINEntryError::kInvalidCharacters}}});
}
diff --git a/device/fido/ble_adapter_manager_unittest.cc b/device/fido/ble_adapter_manager_unittest.cc
index 76631926..c90bf48 100644
--- a/device/fido/ble_adapter_manager_unittest.cc
+++ b/device/fido/ble_adapter_manager_unittest.cc
@@ -49,7 +49,7 @@
MOCK_CONST_METHOD0(SupportsPIN, bool());
MOCK_METHOD2(CollectPIN,
void(CollectPINOptions,
- base::OnceCallback<void(base::string16)>));
+ base::OnceCallback<void(std::u16string)>));
MOCK_METHOD0(OnForcePINChange, void());
MOCK_METHOD1(StartBioEnrollment, void(base::OnceClosure));
MOCK_METHOD1(OnSampleCollected, void(int));
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h
index 44a2b7b..865ad01 100644
--- a/device/fido/fido_request_handler_base.h
+++ b/device/fido/fido_request_handler_base.h
@@ -170,7 +170,7 @@
// hard lock.
virtual void CollectPIN(
CollectPINOptions options,
- base::OnceCallback<void(base::string16)> provide_pin_cb) = 0;
+ base::OnceCallback<void(std::u16string)> provide_pin_cb) = 0;
virtual void FinishCollectToken() = 0;
diff --git a/device/fido/fido_request_handler_unittest.cc b/device/fido/fido_request_handler_unittest.cc
index b7596230..92b47b1 100644
--- a/device/fido/fido_request_handler_unittest.cc
+++ b/device/fido/fido_request_handler_unittest.cc
@@ -111,7 +111,7 @@
void CollectPIN(
CollectPINOptions options,
- base::OnceCallback<void(base::string16)> provide_pin_cb) override {
+ base::OnceCallback<void(std::u16string)> provide_pin_cb) override {
NOTREACHED();
}
diff --git a/device/fido/get_assertion_handler_unittest.cc b/device/fido/get_assertion_handler_unittest.cc
index 3b83766e..dbf36a1 100644
--- a/device/fido/get_assertion_handler_unittest.cc
+++ b/device/fido/get_assertion_handler_unittest.cc
@@ -803,7 +803,7 @@
bool SupportsPIN() const override { return false; }
void CollectPIN(
CollectPINOptions options,
- base::OnceCallback<void(base::string16)> provide_pin_cb) override {
+ base::OnceCallback<void(std::u16string)> provide_pin_cb) override {
NOTREACHED();
}
void StartBioEnrollment(base::OnceClosure next_callback) override {}
diff --git a/device/fido/mac/fake_touch_id_context.h b/device/fido/mac/fake_touch_id_context.h
index 28f55297..5d75db8 100644
--- a/device/fido/mac/fake_touch_id_context.h
+++ b/device/fido/mac/fake_touch_id_context.h
@@ -19,7 +19,7 @@
~FakeTouchIdContext() override;
// TouchIdContext:
- void PromptTouchId(const base::string16& reason, Callback callback) override;
+ void PromptTouchId(const std::u16string& reason, Callback callback) override;
void set_callback_result(bool callback_result) {
callback_result_ = callback_result;
diff --git a/device/fido/mac/fake_touch_id_context.mm b/device/fido/mac/fake_touch_id_context.mm
index ad95504..0ec2a56e 100644
--- a/device/fido/mac/fake_touch_id_context.mm
+++ b/device/fido/mac/fake_touch_id_context.mm
@@ -14,7 +14,7 @@
FakeTouchIdContext::FakeTouchIdContext() = default;
FakeTouchIdContext::~FakeTouchIdContext() = default;
-void FakeTouchIdContext::PromptTouchId(const base::string16& reason,
+void FakeTouchIdContext::PromptTouchId(const std::u16string& reason,
Callback callback) {
std::move(callback).Run(callback_result_);
}
diff --git a/device/fido/mac/touch_id_context.h b/device/fido/mac/touch_id_context.h
index 4e69cd7..75a1ff0 100644
--- a/device/fido/mac/touch_id_context.h
+++ b/device/fido/mac/touch_id_context.h
@@ -57,7 +57,7 @@
// reason string to the user. On completion or error, the provided callback is
// invoked, unless the TouchIdContext instance has been destroyed in the
// meantime (in which case nothing happens).
- virtual void PromptTouchId(const base::string16& reason, Callback callback);
+ virtual void PromptTouchId(const std::u16string& reason, Callback callback);
// authentication_context returns the LAContext used for the local user
// authentication prompt.
diff --git a/device/fido/mac/touch_id_context.mm b/device/fido/mac/touch_id_context.mm
index 26f1438..54667be 100644
--- a/device/fido/mac/touch_id_context.mm
+++ b/device/fido/mac/touch_id_context.mm
@@ -191,7 +191,7 @@
[context_ invalidate];
}
-void TouchIdContext::PromptTouchId(const base::string16& reason,
+void TouchIdContext::PromptTouchId(const std::u16string& reason,
Callback callback) {
callback_ = std::move(callback);
scoped_refptr<base::SequencedTaskRunner> runner =
diff --git a/device/fido/pin.cc b/device/fido/pin.cc
index b1fbcc0..8e4b0069 100644
--- a/device/fido/pin.cc
+++ b/device/fido/pin.cc
@@ -61,7 +61,7 @@
return PINEntryError::kNoError;
}
-PINEntryError ValidatePIN(const base::string16& pin16,
+PINEntryError ValidatePIN(const std::u16string& pin16,
uint32_t min_pin_length,
base::Optional<std::string> current_pin) {
std::string pin;
diff --git a/device/fido/pin.h b/device/fido/pin.h
index 402bb6f..2b13a74 100644
--- a/device/fido/pin.h
+++ b/device/fido/pin.h
@@ -85,7 +85,7 @@
// Like |ValidatePIN| above but takes a wide string.
COMPONENT_EXPORT(DEVICE_FIDO)
PINEntryError ValidatePIN(
- const base::string16& pin16,
+ const std::u16string& pin16,
uint32_t min_pin_length = kMinPinLength,
base::Optional<std::string> current_pin = base::nullopt);
diff --git a/device/fido/win/type_conversions.cc b/device/fido/win/type_conversions.cc
index 85512ff..0d71c81 100644
--- a/device/fido/win/type_conversions.cc
+++ b/device/fido/win/type_conversions.cc
@@ -197,7 +197,7 @@
}
CtapDeviceResponseCode WinErrorNameToCtapDeviceResponseCode(
- const base::string16& error_name) {
+ const std::u16string& error_name) {
// See WebAuthNGetErrorName in <webauthn.h> for these string literals.
//
// Note that the set of errors that browser are allowed to return in a
@@ -206,7 +206,7 @@
// permissible errors are "InvalidStateError" (aka CREDENTIAL_EXCLUDED in
// Chromium code) and "NotAllowedError". Hence, we can collapse the set of
// Windows errors to a smaller set of CtapDeviceResponseCodes.
- static base::flat_map<base::string16, CtapDeviceResponseCode>
+ static base::flat_map<std::u16string, CtapDeviceResponseCode>
kResponseCodeMap({
{u"Success", CtapDeviceResponseCode::kSuccess},
{u"InvalidStateError",
diff --git a/device/fido/win/type_conversions.h b/device/fido/win/type_conversions.h
index bf6eafa8..e3b43e07 100644
--- a/device/fido/win/type_conversions.h
+++ b/device/fido/win/type_conversions.h
@@ -60,7 +60,7 @@
// WinCtapDeviceResponseCodeTo{MakeCredential,GetAssertion}Status().
COMPONENT_EXPORT(DEVICE_FIDO)
CtapDeviceResponseCode WinErrorNameToCtapDeviceResponseCode(
- const base::string16& error_name);
+ const std::u16string& error_name);
// WinCtapDeviceResponseCodeToMakeCredentialStatus returns the
// MakeCredentialStatus that corresponds to a synthetic CtapDeviceResponseCode
diff --git a/device/fido/win/webauthn_api.cc b/device/fido/win/webauthn_api.cc
index 7950224f..903178e3 100644
--- a/device/fido/win/webauthn_api.cc
+++ b/device/fido/win/webauthn_api.cc
@@ -26,8 +26,8 @@
namespace device {
namespace {
-base::string16 OptionalGURLToUTF16(const base::Optional<GURL>& in) {
- return in ? base::UTF8ToUTF16(in->spec()) : base::string16();
+std::u16string OptionalGURLToUTF16(const base::Optional<GURL>& in) {
+ return in ? base::UTF8ToUTF16(in->spec()) : std::u16string();
}
} // namespace
@@ -204,16 +204,16 @@
CtapMakeCredentialRequest request) {
DCHECK(webauthn_api->IsAvailable());
- base::string16 rp_id = base::UTF8ToUTF16(request.rp.id);
- base::string16 rp_name = base::UTF8ToUTF16(request.rp.name.value_or(""));
- base::string16 rp_icon_url = OptionalGURLToUTF16(request.rp.icon_url);
+ std::u16string rp_id = base::UTF8ToUTF16(request.rp.id);
+ std::u16string rp_name = base::UTF8ToUTF16(request.rp.name.value_or(""));
+ std::u16string rp_icon_url = OptionalGURLToUTF16(request.rp.icon_url);
WEBAUTHN_RP_ENTITY_INFORMATION rp_info{
WEBAUTHN_RP_ENTITY_INFORMATION_CURRENT_VERSION, base::as_wcstr(rp_id),
base::as_wcstr(rp_name), base::as_wcstr(rp_icon_url)};
- base::string16 user_name = base::UTF8ToUTF16(request.user.name.value_or(""));
- base::string16 user_icon_url = OptionalGURLToUTF16(request.user.icon_url);
- base::string16 user_display_name =
+ std::u16string user_name = base::UTF8ToUTF16(request.user.name.value_or(""));
+ std::u16string user_icon_url = OptionalGURLToUTF16(request.user.icon_url);
+ std::u16string user_display_name =
base::UTF8ToUTF16(request.user.display_name.value_or(""));
std::vector<uint8_t> user_id = request.user.id;
WEBAUTHN_USER_ENTITY_INFORMATION user_info{
@@ -362,7 +362,7 @@
CtapGetAssertionOptions request_options) {
DCHECK(webauthn_api->IsAvailable());
- base::string16 rp_id16 = base::UTF8ToUTF16(request.rp_id);
+ std::u16string rp_id16 = base::UTF8ToUTF16(request.rp_id);
std::string client_data_json = request.client_data_json;
WEBAUTHN_CLIENT_DATA client_data{
WEBAUTHN_CLIENT_DATA_CURRENT_VERSION, client_data_json.size(),
@@ -370,7 +370,7 @@
reinterpret_cast<const unsigned char*>(client_data_json.data())),
WEBAUTHN_HASH_ALGORITHM_SHA_256};
- base::Optional<base::string16> opt_app_id16 = base::nullopt;
+ base::Optional<std::u16string> opt_app_id16 = base::nullopt;
if (request.app_id) {
opt_app_id16 = base::UTF8ToUTF16(
base::StringPiece(reinterpret_cast<const char*>(request.app_id->data()),
diff --git a/device/gamepad/public/cpp/gamepad.cc b/device/gamepad/public/cpp/gamepad.cc
index 5c79a5c..687b2b7 100644
--- a/device/gamepad/public/cpp/gamepad.cc
+++ b/device/gamepad/public/cpp/gamepad.cc
@@ -26,7 +26,7 @@
Gamepad::Gamepad(const Gamepad& other) = default;
-void Gamepad::SetID(const base::string16& src) {
+void Gamepad::SetID(const std::u16string& src) {
memset(id, 0, sizeof(id));
src.copy(id, kIdLengthCap - 1);
}
diff --git a/device/gamepad/public/cpp/gamepad.h b/device/gamepad/public/cpp/gamepad.h
index 20b77dc..b471256 100644
--- a/device/gamepad/public/cpp/gamepad.h
+++ b/device/gamepad/public/cpp/gamepad.h
@@ -115,7 +115,7 @@
// If src is too long, then the contents of id will be truncated to
// kIdLengthCap-1. id will be null-terminated and any extra space in the
// buffer will be zeroed out.
- void SetID(const base::string16& src);
+ void SetID(const std::u16string& src);
// Is there a gamepad connected at this index?
bool connected;
diff --git a/docs/ios/build_instructions.md b/docs/ios/build_instructions.md
index 3440d30..09e356b 100644
--- a/docs/ios/build_instructions.md
+++ b/docs/ios/build_instructions.md
@@ -350,7 +350,7 @@
```
This will also allow you to see the content of some of Chromium types in the
-debugger like `base::string16`, ... If you want to use `lldb` directly, name
+debugger like `std::u16string`, ... If you want to use `lldb` directly, name
the file `~/.lldbinit` instead of `~/.lldbinit-Xcode`.
Note: if you are using `ios/build/tools/setup-gn.py` to generate the Xcode
diff --git a/docs/mac_build_instructions.md b/docs/mac_build_instructions.md
index efce848a..4395a245 100644
--- a/docs/mac_build_instructions.md
+++ b/docs/mac_build_instructions.md
@@ -209,7 +209,7 @@
Tips for printing variables from `lldb` prompt (both in Xcode or in terminal):
* If `uptr` is a `std::unique_ptr`, the address it wraps is accessible as
`uptr.__ptr_.__value_`.
-* To pretty-print `base::string16`, ensure you have a `~/.lldbinit` file and
+* To pretty-print `std::u16string`, ensure you have a `~/.lldbinit` file and
add the following line into it (substitute {SRC} for your actual path to the
root of Chromium's sources):
```
diff --git a/docs/ui/create/examples/login_dialog.md b/docs/ui/create/examples/login_dialog.md
index 408b83e..30ab51d 100644
--- a/docs/ui/create/examples/login_dialog.md
+++ b/docs/ui/create/examples/login_dialog.md
@@ -137,7 +137,7 @@
// Adds a label textfield pair to the login dialog's layout.
views::Textfield* AddFormRow(views::GridLayout* layout,
- const base::string16& label_text) {
+ const std::u16string& label_text) {
layout->StartRow(0, 0);
views::Label* label =
layout->AddView(std::make_unique<views::Label>(label_text));
@@ -241,8 +241,8 @@
...
class LoginBubbleDialogView : public views::BubbleDialogDelegateView {
public:
- using username,
- base::string16 password)>;
+ using username,
+ std::u16string password)>;
static void Show(View* anchor_view,
BubbleBorder::Arrow anchor_position,
@@ -324,7 +324,7 @@
...
// TextfieldController:
void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
...
};
```
@@ -336,7 +336,7 @@
``` cpp
views::Textfield* AddFormRow(LoginBubbleDialogView* bubble,
views::GridLayout* layout,
- const base::string16& label_text) {
+ const std::u16string& label_text) {
...
textfield->set_controller(bubble);
return textfield;
@@ -345,7 +345,7 @@
void LoginBubbleDialogView::ContentsChanged(
views::Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
SetButtonEnabled(ui::DIALOG_BUTTON_OK, !username_->GetText().empty() &&
!password_->GetText().empty());
DialogModelChanged();
@@ -398,8 +398,8 @@
class LoginBubbleDialogView : public BubbleDialogDelegateView,
public TextfieldController {
public:
- using username,
- base::string16 password)>;
+ using username,
+ std::u16string password)>;
static void Show(View* anchor_view,
BubbleBorder::Arrow anchor_position,
@@ -409,7 +409,7 @@
// TextfieldController:
void ContentsChanged(Textfield* sender,
- const base::string16& new_contents) override;
+ const std::u16string& new_contents) override;
private:
LoginBubbleDialogView(View* anchor_view,
@@ -448,7 +448,7 @@
// Adds a label textfield pair to the login dialog's layout.
Textfield* AddFormRow(LoginBubbleDialogView* bubble,
GridLayout* layout,
- const base::string16& label_text) {
+ const std::u16string& label_text) {
layout->StartRow(0, 0);
Label* label = layout->AddView(std::make_unique<Label>(label_text));
Textfield* textfield = layout->AddView(std::make_unique<Textfield>());
@@ -477,7 +477,7 @@
void LoginBubbleDialogView::ContentsChanged(
Textfield* sender,
- const base::string16& new_contents) {
+ const std::u16string& new_contents) {
SetButtonEnabled(ui::DIALOG_BUTTON_OK, !username_->GetText().empty() &&
!password_->GetText().empty());
DialogModelChanged();
diff --git a/docs/ui/create/examples/theme_aware.md b/docs/ui/create/examples/theme_aware.md
index 36e4152..3e12a5c 100644
--- a/docs/ui/create/examples/theme_aware.md
+++ b/docs/ui/create/examples/theme_aware.md
@@ -94,7 +94,7 @@
``` cpp
class ThemeTrackingCheckbox : public views::Checkbox {
public:
- explicit ThemeTrackingCheckbox(const base::string16& label)
+ explicit ThemeTrackingCheckbox(const std::u16string& label)
: Checkbox(label, this) {}
ThemeTrackingCheckbox(const ThemeTrackingCheckbox&) = delete;
ThemeTrackingCheckbox& operator=(const ThemeTrackingCheckbox&) = delete;
@@ -154,7 +154,7 @@
class TextVectorImageButton : public views::MdTextButton {
public:
TextVectorImageButton(PressedCallback callback,
- const base::string16& text,
+ const std::u16string& text,
const gfx::VectorIcon& icon)
: MdTextButton(std::move(callback), text), icon_(icon) {}
TextVectorImageButton(const TextVectorImageButton&) = delete;
diff --git a/docs/ui/learn/bestpractices/layout.md b/docs/ui/learn/bestpractices/layout.md
index e57ec9c..d89dfdb 100644
--- a/docs/ui/learn/bestpractices/layout.md
+++ b/docs/ui/learn/bestpractices/layout.md
@@ -106,7 +106,7 @@
: instruction_view_(nullptr) {
...
instruction_view_ =
- new InstructionView(base::string16());
+ new InstructionView(std::u16string());
int outer_padding_horiz = kOuterPaddingHorizPx;
int outer_padding_vert = kOuterPaddingVertPx;
@@ -135,7 +135,7 @@
: instruction_view_(nullptr) {
...
AddChildView(std::make_unique<InstructionView>(
- base::string16()));
+ std::u16string()));
const gfx::Insets kDialogInsets =
ChromeLayoutProvider::Get()->GetInsetsMetric(
@@ -514,8 +514,8 @@
HoverButton::HoverButton(
...
std::unique_ptr<views::View> icon_view,
- const base::string16& title,
- const base::string16& subtitle,
+ const std::u16string& title,
+ const std::u16string& subtitle,
std::unique_ptr<views::View> secondary_view,
...) {
...
@@ -592,8 +592,8 @@
HoverButton::HoverButton(
...
std::unique_ptr<views::View> icon_view,
- const base::string16& title,
- const base::string16& subtitle,
+ const std::u16string& title,
+ const std::u16string& subtitle,
std::unique_ptr<views::View> secondary_view,
...) {
...
diff --git a/docs/ui/views/class_splitting.md b/docs/ui/views/class_splitting.md
index fd62da8..d84bec5 100644
--- a/docs/ui/views/class_splitting.md
+++ b/docs/ui/views/class_splitting.md
@@ -28,7 +28,7 @@
~MyDialogView() override;
// DialogDelegate:
- base::string16 GetWindowTitle() const override;
+ std::u16string GetWindowTitle() const override;
bool ShouldShowCloseButton() const override;
...
diff --git a/docs/webui_in_chrome.md b/docs/webui_in_chrome.md
index f24a9c5..12e4352 100644
--- a/docs/webui_in_chrome.md
+++ b/docs/webui_in_chrome.md
@@ -253,7 +253,7 @@
HelloWorldDialog();
// ui::WebDialogDelegate:
ui::ModalType GetDialogModalType() const override;
- base::string16 GetDialogTitle() const override;
+ std::u16string GetDialogTitle() const override;
GURL GetDialogContentURL() const override;
void GetWebUIMessageHandlers(
std::vector<content::WebUIMessageHandler*>* handlers) const override;
@@ -286,7 +286,7 @@
return ui::MODAL_TYPE_NONE;
}
-base::string16 HelloWorldDialog::GetDialogTitle() const {
+std::u16string HelloWorldDialog::GetDialogTitle() const {
return base::UTF8ToUTF16("Hello world");
}
diff --git a/extensions/browser/api/automation_internal/automation_internal_api.cc b/extensions/browser/api/automation_internal/automation_internal_api.cc
index a55a969..65f35eb4 100644
--- a/extensions/browser/api/automation_internal/automation_internal_api.cc
+++ b/extensions/browser/api/automation_internal/automation_internal_api.cc
@@ -71,7 +71,7 @@
content::WebContents* web_contents,
int request_id,
int acc_obj_id,
- const base::string16& query,
+ const std::u16string& query,
extensions::AutomationInternalQuerySelectorFunction::Callback callback)
: content::WebContentsObserver(web_contents),
request_id_(request_id),
@@ -688,7 +688,7 @@
content::WebContents::FromRenderFrameHost(rfh);
int request_id = query_request_id_counter_++;
- base::string16 selector = base::UTF8ToUTF16(params->args.selector);
+ std::u16string selector = base::UTF8ToUTF16(params->args.selector);
// QuerySelectorHandler handles IPCs and deletes itself on completion.
new QuerySelectorHandler(
diff --git a/extensions/browser/api/declarative_net_request/declarative_net_request_api.cc b/extensions/browser/api/declarative_net_request/declarative_net_request_api.cc
index 72ac34c2..358b2fc 100644
--- a/extensions/browser/api/declarative_net_request/declarative_net_request_api.cc
+++ b/extensions/browser/api/declarative_net_request/declarative_net_request_api.cc
@@ -69,7 +69,7 @@
DeclarativeNetRequestUpdateDynamicRulesFunction::Run() {
using Params = dnr_api::UpdateDynamicRules::Params;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
@@ -164,7 +164,7 @@
DeclarativeNetRequestUpdateSessionRulesFunction::Run() {
using Params = dnr_api::UpdateSessionRules::Params;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
@@ -228,7 +228,7 @@
using RulesetID = declarative_net_request::RulesetID;
using DNRManifestData = declarative_net_request::DNRManifestData;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
@@ -341,7 +341,7 @@
DeclarativeNetRequestGetMatchedRulesFunction::Run() {
using Params = dnr_api::GetMatchedRules::Params;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
@@ -414,7 +414,7 @@
DeclarativeNetRequestSetExtensionActionOptionsFunction::Run() {
using Params = dnr_api::SetExtensionActionOptions::Params;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
@@ -483,7 +483,7 @@
DeclarativeNetRequestIsRegexSupportedFunction::Run() {
using Params = dnr_api::IsRegexSupported::Params;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<Params> params(Params::Create(*args_, &error));
EXTENSION_FUNCTION_VALIDATE(params);
EXTENSION_FUNCTION_VALIDATE(error.empty());
diff --git a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc
index 50f454f6..91da86e 100644
--- a/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc
+++ b/extensions/browser/api/declarative_net_request/file_backed_ruleset_source.cc
@@ -138,7 +138,7 @@
for (size_t i = 0; i < rules_list.size(); i++) {
dnr_api::Rule parsed_rule;
- base::string16 parse_error;
+ std::u16string parse_error;
if (dnr_api::Rule::Populate(rules_list[i], &parsed_rule, &parse_error)) {
DCHECK(parse_error.empty());
diff --git a/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc b/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc
index c2e6b42..031ca86 100644
--- a/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc
+++ b/extensions/browser/api/declarative_net_request/file_sequence_helper_unittest.cc
@@ -37,7 +37,7 @@
std::unique_ptr<base::DictionaryValue> value = rule.ToValue();
EXPECT_TRUE(value);
api::declarative_net_request::Rule result;
- base::string16 error;
+ std::u16string error;
EXPECT_TRUE(
api::declarative_net_request::Rule::Populate(*value, &result, &error))
<< error;
diff --git a/extensions/browser/api/declarative_net_request/filter_list_converter/converter.cc b/extensions/browser/api/declarative_net_request/filter_list_converter/converter.cc
index 656a07cd..f361f1e 100644
--- a/extensions/browser/api/declarative_net_request/filter_list_converter/converter.cc
+++ b/extensions/browser/api/declarative_net_request/filter_list_converter/converter.cc
@@ -73,7 +73,7 @@
}
// Sanity check that we can parse this rule.
- base::string16 err;
+ std::u16string err;
dnr_api::Rule rule;
CHECK(dnr_api::Rule::Populate(json_rule_, &rule, &err) && err.empty())
<< "Converted rule can't be parsed " << json_rule_;
diff --git a/extensions/browser/api/declarative_net_request/flat_ruleset_indexer_unittest.cc b/extensions/browser/api/declarative_net_request/flat_ruleset_indexer_unittest.cc
index c5b38d23..2e4dec3 100644
--- a/extensions/browser/api/declarative_net_request/flat_ruleset_indexer_unittest.cc
+++ b/extensions/browser/api/declarative_net_request/flat_ruleset_indexer_unittest.cc
@@ -110,7 +110,7 @@
base::Optional<base::Value> value = base::JSONReader::Read(transform);
CHECK(value);
- base::string16 error;
+ std::u16string error;
auto result = dnr_api::URLTransform::FromValue(*value, &error);
CHECK(result);
CHECK(error.empty());
diff --git a/extensions/browser/api/declarative_net_request/indexed_rule_unittest.cc b/extensions/browser/api/declarative_net_request/indexed_rule_unittest.cc
index a337d81..f7607bc 100644
--- a/extensions/browser/api/declarative_net_request/indexed_rule_unittest.cc
+++ b/extensions/browser/api/declarative_net_request/indexed_rule_unittest.cc
@@ -560,7 +560,7 @@
base::JSONReader::Read(cases[i].redirect_dictionary_json);
ASSERT_TRUE(redirect_val);
- base::string16 error;
+ std::u16string error;
rule.action.redirect = dnr_api::Redirect::FromValue(*redirect_val, &error);
ASSERT_TRUE(rule.action.redirect);
ASSERT_TRUE(error.empty());
diff --git a/extensions/browser/api/declarative_net_request/rules_monitor_service.cc b/extensions/browser/api/declarative_net_request/rules_monitor_service.cc
index 2cf533cd..44fa5601 100644
--- a/extensions/browser/api/declarative_net_request/rules_monitor_service.cc
+++ b/extensions/browser/api/declarative_net_request/rules_monitor_service.cc
@@ -342,7 +342,7 @@
std::vector<api::declarative_net_request::Rule>
RulesMonitorService::GetSessionRules(const ExtensionId& extension_id) const {
std::vector<api::declarative_net_request::Rule> result;
- base::string16 error;
+ std::u16string error;
bool populate_result = json_schema_compiler::util::PopulateArrayFromList(
GetSessionRulesValue(extension_id), &result, &error);
DCHECK(populate_result);
diff --git a/extensions/browser/api/device_permissions_manager.cc b/extensions/browser/api/device_permissions_manager.cc
index 61997ee6..4653ef1c 100644
--- a/extensions/browser/api/device_permissions_manager.cc
+++ b/extensions/browser/api/device_permissions_manager.cc
@@ -118,7 +118,7 @@
product_id != entry->product_id()) {
return false;
}
- base::string16 serial_number;
+ std::u16string serial_number;
if (!value->GetStringWithoutPathExpansion(kDeviceSerialNumber,
&serial_number) ||
serial_number != entry->serial_number()) {
@@ -196,18 +196,18 @@
return nullptr;
}
- base::string16 serial_number;
+ std::u16string serial_number;
if (!entry->GetStringWithoutPathExpansion(kDeviceSerialNumber,
&serial_number)) {
return nullptr;
}
- base::string16 manufacturer_string;
+ std::u16string manufacturer_string;
// Ignore failure as this string is optional.
entry->GetStringWithoutPathExpansion(kDeviceManufacturerString,
&manufacturer_string);
- base::string16 product_string;
+ std::u16string product_string;
// Ignore failure as this string is optional.
entry->GetStringWithoutPathExpansion(kDeviceProductString, &product_string);
@@ -233,7 +233,7 @@
} else if (type == kDeviceTypeHid) {
return base::MakeRefCounted<DevicePermissionEntry>(
DevicePermissionEntry::Type::HID, vendor_id, product_id, serial_number,
- base::string16(), product_string, last_used);
+ std::u16string(), product_string, last_used);
}
return nullptr;
}
@@ -292,9 +292,9 @@
Type type,
uint16_t vendor_id,
uint16_t product_id,
- const base::string16& serial_number,
- const base::string16& manufacturer_string,
- const base::string16& product_string,
+ const std::u16string& serial_number,
+ const std::u16string& manufacturer_string,
+ const std::u16string& product_string,
const base::Time& last_used)
: type_(type),
vendor_id_(vendor_id),
@@ -302,8 +302,7 @@
serial_number_(serial_number),
manufacturer_string_(manufacturer_string),
product_string_(product_string),
- last_used_(last_used) {
-}
+ last_used_(last_used) {}
DevicePermissionEntry::~DevicePermissionEntry() {
}
@@ -342,7 +341,7 @@
return std::move(entry_dict);
}
-base::string16 DevicePermissionEntry::GetPermissionMessageString() const {
+std::u16string DevicePermissionEntry::GetPermissionMessageString() const {
return DevicePermissionsManager::GetPermissionMessage(
vendor_id_, product_id_, manufacturer_string_, product_string_,
serial_number_, type_ == Type::USB);
@@ -383,7 +382,7 @@
return nullptr;
}
- base::string16 serial_number = base::UTF8ToUTF16(device.serial_number);
+ std::u16string serial_number = base::UTF8ToUTF16(device.serial_number);
for (const auto& entry : entries_) {
if (entry->IsPersistent() && entry->vendor_id() == device.vendor_id &&
entry->product_id() == device.product_id &&
@@ -407,14 +406,14 @@
}
// static
-base::string16 DevicePermissionsManager::GetPermissionMessage(
+std::u16string DevicePermissionsManager::GetPermissionMessage(
uint16_t vendor_id,
uint16_t product_id,
- const base::string16& manufacturer_string,
- const base::string16& product_string,
- const base::string16& serial_number,
+ const std::u16string& manufacturer_string,
+ const std::u16string& product_string,
+ const std::u16string& serial_number,
bool always_include_manufacturer) {
- base::string16 product = product_string;
+ std::u16string product = product_string;
if (product.empty()) {
const char* product_name =
device::UsbIds::GetProductName(vendor_id, product_id);
@@ -423,7 +422,7 @@
}
}
- base::string16 manufacturer = manufacturer_string;
+ std::u16string manufacturer = manufacturer_string;
if (manufacturer_string.empty()) {
const char* vendor_name = device::UsbIds::GetVendorName(vendor_id);
if (vendor_name) {
@@ -507,11 +506,11 @@
return device_permissions;
}
-std::vector<base::string16>
+std::vector<std::u16string>
DevicePermissionsManager::GetPermissionMessageStrings(
const std::string& extension_id) const {
DCHECK(thread_checker_.CalledOnValidThread());
- std::vector<base::string16> messages;
+ std::vector<std::u16string> messages;
const DevicePermissions* device_permissions = GetInternal(extension_id);
if (device_permissions) {
for (const scoped_refptr<DevicePermissionEntry>& entry :
diff --git a/extensions/browser/api/device_permissions_manager.h b/extensions/browser/api/device_permissions_manager.h
index 1d7806c..8f08123 100644
--- a/extensions/browser/api/device_permissions_manager.h
+++ b/extensions/browser/api/device_permissions_manager.h
@@ -54,9 +54,9 @@
DevicePermissionEntry(Type type,
uint16_t vendor_id,
uint16_t product_id,
- const base::string16& serial_number,
- const base::string16& manufacturer_string,
- const base::string16& product_string,
+ const std::u16string& serial_number,
+ const std::u16string& manufacturer_string,
+ const std::u16string& product_string,
const base::Time& last_used);
// A persistent device is one that can be recognized when it is reconnected
@@ -68,16 +68,16 @@
// entry is not persistent.
std::unique_ptr<base::Value> ToValue() const;
- base::string16 GetPermissionMessageString() const;
+ std::u16string GetPermissionMessageString() const;
Type type() const { return type_; }
uint16_t vendor_id() const { return vendor_id_; }
uint16_t product_id() const { return product_id_; }
- const base::string16& serial_number() const { return serial_number_; }
+ const std::u16string& serial_number() const { return serial_number_; }
const base::Time& last_used() const { return last_used_; }
- base::string16 GetManufacturer() const;
- base::string16 GetProduct() const;
+ std::u16string GetManufacturer() const;
+ std::u16string GetProduct() const;
private:
friend class base::RefCounted<DevicePermissionEntry>;
@@ -96,11 +96,11 @@
// The product ID of this device.
uint16_t product_id_;
// The serial number (possibly alphanumeric) of this device.
- base::string16 serial_number_;
+ std::u16string serial_number_;
// The manufacturer string read from the device (optional).
- base::string16 manufacturer_string_;
+ std::u16string manufacturer_string_;
// The product string read from the device (optional).
- base::string16 product_string_;
+ std::u16string product_string_;
// The last time this device was used by the extension.
base::Time last_used_;
};
@@ -143,12 +143,12 @@
public:
static DevicePermissionsManager* Get(content::BrowserContext* context);
- static base::string16 GetPermissionMessage(
+ static std::u16string GetPermissionMessage(
uint16_t vendor_id,
uint16_t product_id,
- const base::string16& manufacturer_string,
- const base::string16& product_string,
- const base::string16& serial_number,
+ const std::u16string& manufacturer_string,
+ const std::u16string& product_string,
+ const std::u16string& serial_number,
bool always_include_manufacturer);
// The DevicePermissions object for a given extension.
@@ -156,7 +156,7 @@
// Equivalent to calling GetForExtension and extracting the permission string
// for each entry.
- std::vector<base::string16> GetPermissionMessageStrings(
+ std::vector<std::u16string> GetPermissionMessageStrings(
const std::string& extension_id) const;
void AllowUsbDevice(const std::string& extension_id,
diff --git a/extensions/browser/api/device_permissions_prompt.cc b/extensions/browser/api/device_permissions_prompt.cc
index 480c10e..b40a71c 100644
--- a/extensions/browser/api/device_permissions_prompt.cc
+++ b/extensions/browser/api/device_permissions_prompt.cc
@@ -47,12 +47,12 @@
: device_(std::move(device)) {
name_ = DevicePermissionsManager::GetPermissionMessage(
device_->vendor_id, device_->product_id,
- device_->manufacturer_name.value_or(base::string16()),
- device_->product_name.value_or(base::string16()),
- base::string16(), // Serial number is displayed separately.
+ device_->manufacturer_name.value_or(std::u16string()),
+ device_->product_name.value_or(std::u16string()),
+ std::u16string(), // Serial number is displayed separately.
true);
serial_number_ =
- device_->serial_number ? *(device_->serial_number) : base::string16();
+ device_->serial_number ? *(device_->serial_number) : std::u16string();
}
~UsbDeviceInfo() override {}
@@ -125,7 +125,7 @@
UsbDeviceInfo* entry = static_cast<UsbDeviceInfo*>((*it).get());
if (entry->device()->guid == device.guid) {
size_t index = it - devices_.begin();
- base::string16 device_name = (*it)->name();
+ std::u16string device_name = (*it)->name();
devices_.erase(it);
if (observer())
observer()->OnDeviceRemoved(index, device_name);
@@ -188,9 +188,9 @@
: device_(std::move(device)) {
name_ = DevicePermissionsManager::GetPermissionMessage(
device_->vendor_id, device_->product_id,
- base::string16(), // HID devices include manufacturer in product name.
+ std::u16string(), // HID devices include manufacturer in product name.
base::UTF8ToUTF16(device_->product_name),
- base::string16(), // Serial number is displayed separately.
+ std::u16string(), // Serial number is displayed separately.
false);
serial_number_ = base::UTF8ToUTF16(device_->serial_number);
}
@@ -283,7 +283,7 @@
HidDeviceInfo* entry = static_cast<HidDeviceInfo*>((*it).get());
if (entry->device()->guid == device->guid) {
size_t index = it - devices_.begin();
- base::string16 device_name = (*it)->name();
+ std::u16string device_name = (*it)->name();
devices_.erase(it);
if (observer())
observer()->OnDeviceRemoved(index, device_name);
@@ -372,13 +372,13 @@
observer_ = observer;
}
-base::string16 DevicePermissionsPrompt::Prompt::GetDeviceName(
+std::u16string DevicePermissionsPrompt::Prompt::GetDeviceName(
size_t index) const {
DCHECK_LT(index, devices_.size());
return devices_[index]->name();
}
-base::string16 DevicePermissionsPrompt::Prompt::GetDeviceSerialNumber(
+std::u16string DevicePermissionsPrompt::Prompt::GetDeviceSerialNumber(
size_t index) const {
DCHECK_LT(index, devices_.size());
return devices_[index]->serial_number();
@@ -394,7 +394,7 @@
void DevicePermissionsPrompt::Prompt::AddDevice(
std::unique_ptr<DeviceInfo> device) {
- base::string16 device_name = device->name();
+ std::u16string device_name = device->name();
devices_.push_back(std::move(device));
if (observer_)
observer_->OnDeviceAdded(devices_.size() - 1, device_name);
diff --git a/extensions/browser/api/device_permissions_prompt.h b/extensions/browser/api/device_permissions_prompt.h
index 8960033..b3c3215 100644
--- a/extensions/browser/api/device_permissions_prompt.h
+++ b/extensions/browser/api/device_permissions_prompt.h
@@ -52,14 +52,14 @@
DeviceInfo();
virtual ~DeviceInfo();
- const base::string16& name() const { return name_; }
- const base::string16& serial_number() const { return serial_number_; }
+ const std::u16string& name() const { return name_; }
+ const std::u16string& serial_number() const { return serial_number_; }
bool granted() const { return granted_; }
void set_granted() { granted_ = true; }
protected:
- base::string16 name_;
- base::string16 serial_number_;
+ std::u16string name_;
+ std::u16string serial_number_;
private:
bool granted_ = false;
@@ -73,9 +73,9 @@
// to create the initial set of options.
virtual void OnDevicesInitialized() = 0;
virtual void OnDeviceAdded(size_t index,
- const base::string16& device_name) = 0;
+ const std::u16string& device_name) = 0;
virtual void OnDeviceRemoved(size_t index,
- const base::string16& device_name) = 0;
+ const std::u16string& device_name) = 0;
protected:
virtual ~Observer();
@@ -89,8 +89,8 @@
virtual void SetObserver(Observer* observer);
size_t GetDeviceCount() const { return devices_.size(); }
- base::string16 GetDeviceName(size_t index) const;
- base::string16 GetDeviceSerialNumber(size_t index) const;
+ std::u16string GetDeviceName(size_t index) const;
+ std::u16string GetDeviceSerialNumber(size_t index) const;
// Notifies the DevicePermissionsManager for the current extension that
// access to the device at the given index is now granted.
diff --git a/extensions/browser/api/file_system/file_system_api.cc b/extensions/browser/api/file_system/file_system_api.cc
index 29aaf7b..64e69788 100644
--- a/extensions/browser/api/file_system/file_system_api.cc
+++ b/extensions/browser/api/file_system/file_system_api.cc
@@ -113,7 +113,7 @@
bool GetFileTypesFromAcceptOption(
const file_system::AcceptOption& accept_option,
std::vector<base::FilePath::StringType>* extensions,
- base::string16* description) {
+ std::u16string* description) {
std::set<base::FilePath::StringType> extension_set;
int description_id = 0;
@@ -636,7 +636,7 @@
if (accepts) {
for (const file_system::AcceptOption& option : *accepts) {
- base::string16 description;
+ std::u16string description;
std::vector<base::FilePath::StringType> extensions;
if (!GetFileTypesFromAcceptOption(option, &extensions, &description))
diff --git a/extensions/browser/api/file_system/file_system_delegate.h b/extensions/browser/api/file_system/file_system_delegate.h
index 18ecfa7..0f0a8ae 100644
--- a/extensions/browser/api/file_system/file_system_delegate.h
+++ b/extensions/browser/api/file_system/file_system_delegate.h
@@ -65,7 +65,7 @@
// for a given app.
virtual void ConfirmSensitiveDirectoryAccess(
bool has_write_permission,
- const base::string16& app_name,
+ const std::u16string& app_name,
content::WebContents* web_contents,
base::OnceClosure on_accept,
base::OnceClosure on_cancel) = 0;
diff --git a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
index b8b1ec3..1d68cf0 100644
--- a/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
+++ b/extensions/browser/api/guest_view/web_view/web_view_internal_api.cc
@@ -737,7 +737,7 @@
EXTENSION_FUNCTION_VALIDATE(params.get());
// Convert the std::string search_text to string16.
- base::string16 search_text;
+ std::u16string search_text;
base::UTF8ToUTF16(
params->search_text.c_str(), params->search_text.length(), &search_text);
diff --git a/extensions/browser/api/hid/hid_apitest.cc b/extensions/browser/api/hid/hid_apitest.cc
index d5a76c3..da18d9b 100644
--- a/extensions/browser/api/hid/hid_apitest.cc
+++ b/extensions/browser/api/hid/hid_apitest.cc
@@ -77,11 +77,11 @@
}
}
- void OnDeviceAdded(size_t index, const base::string16& device_name) override {
+ void OnDeviceAdded(size_t index, const std::u16string& device_name) override {
}
void OnDeviceRemoved(size_t index,
- const base::string16& device_name) override {}
+ const std::u16string& device_name) override {}
};
class TestExtensionsAPIClient : public ShellExtensionsAPIClient {
diff --git a/extensions/browser/api/management/management_api.cc b/extensions/browser/api/management/management_api.cc
index 618e3fc..a65da475 100644
--- a/extensions/browser/api/management/management_api.cc
+++ b/extensions/browser/api/management/management_api.cc
@@ -646,7 +646,7 @@
void ManagementUninstallFunctionBase::OnExtensionUninstallDialogClosed(
bool did_start_uninstall,
- const base::string16& error) {
+ const std::u16string& error) {
Finish(did_start_uninstall,
ErrorUtils::FormatErrorMessage(keys::kUninstallCanceledError,
target_extension_id_));
@@ -666,7 +666,7 @@
const ManagementAPIDelegate* delegate = ManagementAPI::GetFactoryInstance()
->Get(browser_context())
->GetDelegate();
- base::string16 utf16_error;
+ std::u16string utf16_error;
success = delegate->UninstallExtension(
browser_context(), target_extension_id_,
extensions::UNINSTALL_REASON_MANAGEMENT_API, &utf16_error);
diff --git a/extensions/browser/api/management/management_api.h b/extensions/browser/api/management/management_api.h
index 89b4205..f403fdd 100644
--- a/extensions/browser/api/management/management_api.h
+++ b/extensions/browser/api/management/management_api.h
@@ -139,7 +139,7 @@
ManagementUninstallFunctionBase();
void OnExtensionUninstallDialogClosed(bool did_start_uninstall,
- const base::string16& error);
+ const std::u16string& error);
protected:
~ManagementUninstallFunctionBase() override;
diff --git a/extensions/browser/api/management/management_api_delegate.h b/extensions/browser/api/management/management_api_delegate.h
index 03ac1f2..5e90d3ce 100644
--- a/extensions/browser/api/management/management_api_delegate.h
+++ b/extensions/browser/api/management/management_api_delegate.h
@@ -113,7 +113,7 @@
virtual bool UninstallExtension(content::BrowserContext* context,
const std::string& transient_extension_id,
UninstallReason reason,
- base::string16* error) const = 0;
+ std::u16string* error) const = 0;
// Creates an app shortcut.
virtual bool CreateAppShortcutFunctionDelegate(
diff --git a/extensions/browser/api/networking_private/networking_private_linux.cc b/extensions/browser/api/networking_private/networking_private_linux.cc
index 5883346..7c2b2ff 100644
--- a/extensions/browser/api/networking_private/networking_private_linux.cc
+++ b/extensions/browser/api/networking_private/networking_private_linux.cc
@@ -835,7 +835,7 @@
}
std::string ssidUTF8(ssid_bytes, ssid_bytes + ssid_length);
- base::string16 ssid = base::UTF8ToUTF16(ssidUTF8);
+ std::u16string ssid = base::UTF8ToUTF16(ssidUTF8);
access_point_info->SetString(kAccessPointInfoName, ssid);
}
@@ -973,7 +973,7 @@
NetworkMap* network_map,
const std::string& network_guid,
std::unique_ptr<base::DictionaryValue>& access_point) {
- base::string16 ssid;
+ std::u16string ssid;
std::string connection_state;
int signal_strength;
diff --git a/extensions/browser/api/networking_private/networking_private_linux.h b/extensions/browser/api/networking_private/networking_private_linux.h
index 81a91bd..3d00482 100644
--- a/extensions/browser/api/networking_private/networking_private_linux.h
+++ b/extensions/browser/api/networking_private/networking_private_linux.h
@@ -29,7 +29,7 @@
class NetworkingPrivateLinux : public NetworkingPrivateDelegate {
public:
using NetworkMap =
- std::map<base::string16, std::unique_ptr<base::DictionaryValue>>;
+ std::map<std::u16string, std::unique_ptr<base::DictionaryValue>>;
typedef std::vector<std::string> GuidList;
diff --git a/extensions/browser/api/printer_provider/printer_provider_api.cc b/extensions/browser/api/printer_provider/printer_provider_api.cc
index bbb26d1..a4a27c4 100644
--- a/extensions/browser/api/printer_provider/printer_provider_api.cc
+++ b/extensions/browser/api/printer_provider/printer_provider_api.cc
@@ -74,13 +74,13 @@
printer->SetString("extensionId", extension->id());
printer->SetString("extensionName", extension->name());
- base::string16 printer_name;
+ std::u16string printer_name;
if (printer->GetString("name", &printer_name) &&
base::i18n::AdjustStringForLocaleDirection(&printer_name)) {
printer->SetString("name", printer_name);
}
- base::string16 printer_description;
+ std::u16string printer_description;
if (printer->GetString("description", &printer_description) &&
base::i18n::AdjustStringForLocaleDirection(&printer_description)) {
printer->SetString("description", printer_description);
diff --git a/extensions/browser/api/printer_provider/printer_provider_print_job.h b/extensions/browser/api/printer_provider/printer_provider_print_job.h
index 490b1bb..40e54ded 100644
--- a/extensions/browser/api/printer_provider/printer_provider_print_job.h
+++ b/extensions/browser/api/printer_provider/printer_provider_print_job.h
@@ -31,7 +31,7 @@
std::string printer_id;
// The print job title.
- base::string16 job_title;
+ std::u16string job_title;
// The print job ticket.
base::Value ticket;
diff --git a/extensions/browser/api/system_info/system_info_api_unittest.cc b/extensions/browser/api/system_info/system_info_api_unittest.cc
index a0889258..51900c8 100644
--- a/extensions/browser/api/system_info/system_info_api_unittest.cc
+++ b/extensions/browser/api/system_info/system_info_api_unittest.cc
@@ -132,8 +132,8 @@
return storage_monitor::StorageInfo(
GetFakeStorageDeviceId(),
base::FilePath::StringType() /* device_location */,
- base::string16() /* label */, base::string16() /* vendor */,
- base::string16() /* model */, 0 /* size_in_bytes */);
+ std::u16string() /* label */, std::u16string() /* vendor */,
+ std::u16string() /* model */, 0 /* size_in_bytes */);
}());
return *info;
}
diff --git a/extensions/browser/api/system_storage/storage_api_test_util.cc b/extensions/browser/api/system_storage/storage_api_test_util.cc
index f06c3570..1b2fa97 100644
--- a/extensions/browser/api/system_storage/storage_api_test_util.cc
+++ b/extensions/browser/api/system_storage/storage_api_test_util.cc
@@ -19,8 +19,8 @@
return storage_monitor::StorageInfo(
unit.device_id, base::FilePath::StringType(), /* no location */
base::UTF8ToUTF16(unit.name), /* storage label */
- base::string16(), /* no storage vendor */
- base::string16(), /* no storage model */
+ std::u16string(), /* no storage vendor */
+ std::u16string(), /* no storage model */
unit.capacity);
}
diff --git a/extensions/browser/api/usb/usb_apitest.cc b/extensions/browser/api/usb/usb_apitest.cc
index f78d9771..6290db8e 100644
--- a/extensions/browser/api/usb/usb_apitest.cc
+++ b/extensions/browser/api/usb/usb_apitest.cc
@@ -98,11 +98,11 @@
prompt()->Dismissed();
}
- void OnDeviceAdded(size_t index, const base::string16& device_name) override {
+ void OnDeviceAdded(size_t index, const std::u16string& device_name) override {
}
void OnDeviceRemoved(size_t index,
- const base::string16& device_name) override {}
+ const std::u16string& device_name) override {}
};
class TestExtensionsAPIClient : public ShellExtensionsAPIClient {
diff --git a/extensions/browser/api/usb/usb_device_manager.cc b/extensions/browser/api/usb/usb_device_manager.cc
index ef01070..5751ff7 100644
--- a/extensions/browser/api/usb/usb_device_manager.cc
+++ b/extensions/browser/api/usb/usb_device_manager.cc
@@ -162,11 +162,11 @@
device_in.device_version_minor << 4 |
device_in.device_version_subminor;
device_out->product_name =
- base::UTF16ToUTF8(device_in.product_name.value_or(base::string16()));
+ base::UTF16ToUTF8(device_in.product_name.value_or(std::u16string()));
device_out->manufacturer_name =
- base::UTF16ToUTF8(device_in.manufacturer_name.value_or(base::string16()));
+ base::UTF16ToUTF8(device_in.manufacturer_name.value_or(std::u16string()));
device_out->serial_number =
- base::UTF16ToUTF8(device_in.serial_number.value_or(base::string16()));
+ base::UTF16ToUTF8(device_in.serial_number.value_or(std::u16string()));
}
void UsbDeviceManager::GetDevices(
diff --git a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h
index 1e82f880..9dd8cff 100644
--- a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h
+++ b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h
@@ -46,7 +46,7 @@
virtual bool HideKeyboard() = 0;
// Insert |text| verbatim into a text area. Returns true if successful.
- virtual bool InsertText(const base::string16& text) = 0;
+ virtual bool InsertText(const std::u16string& text) = 0;
// Notifiy system that keyboard loading is complete. Used in UMA stats to
// track loading performance. Returns true if the notification was handled.
diff --git a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api.cc b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api.cc
index 7566b6e..65f6ce66 100644
--- a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api.cc
+++ b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api.cc
@@ -63,7 +63,7 @@
ExtensionFunction::ResponseAction
VirtualKeyboardPrivateInsertTextFunction::Run() {
- base::string16 text;
+ std::u16string text;
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &text));
if (!delegate()->InsertText(text))
return RespondNow(Error(kUnknownError));
diff --git a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api_unittest.cc b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api_unittest.cc
index 4ab9b270..4aca8313 100644
--- a/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api_unittest.cc
+++ b/extensions/browser/api/virtual_keyboard_private/virtual_keyboard_private_api_unittest.cc
@@ -24,7 +24,7 @@
OnKeyboardSettingsCallback on_settings_callback) override {}
void OnKeyboardConfigChanged() override {}
bool HideKeyboard() override { return false; }
- bool InsertText(const base::string16& text) override { return false; }
+ bool InsertText(const std::u16string& text) override { return false; }
bool OnKeyboardLoaded() override { return false; }
void SetHotrodKeyboard(bool enable) override {}
bool LockKeyboard(bool state) override { return false; }
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index acc0395..710eb2c7 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -2778,8 +2778,8 @@
EXTENSION_FUNCTION_VALIDATE(value->GetDictionary(
keys::kAuthCredentialsKey,
&credentials_value));
- base::string16 username;
- base::string16 password;
+ std::u16string username;
+ std::u16string password;
EXTENSION_FUNCTION_VALIDATE(
credentials_value->GetString(keys::kUsernameKey, &username));
EXTENSION_FUNCTION_VALIDATE(
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc
index 402d92c..ac2f385 100644
--- a/extensions/browser/app_window/app_window.cc
+++ b/extensions/browser/app_window/app_window.cc
@@ -564,15 +564,15 @@
return bounds;
}
-base::string16 AppWindow::GetTitle() const {
+std::u16string AppWindow::GetTitle() const {
const Extension* extension = GetExtension();
if (!extension)
- return base::string16();
+ return std::u16string();
// WebContents::GetTitle() will return the page's URL if there's no <title>
// specified. However, we'd prefer to show the name of the extension in that
// case, so we directly inspect the NavigationEntry's title.
- base::string16 title;
+ std::u16string title;
content::NavigationEntry* entry = web_contents() ?
web_contents()->GetController().GetLastCommittedEntry() : nullptr;
if (!entry || entry->GetTitle().empty()) {
diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h
index ed8aac3..556fdbb 100644
--- a/extensions/browser/app_window/app_window.h
+++ b/extensions/browser/app_window/app_window.h
@@ -253,7 +253,7 @@
// NativeAppWindows should call this to determine what the window's title
// is on startup and from within UpdateWindowTitle().
- base::string16 GetTitle() const;
+ std::u16string GetTitle() const;
// |callback| will be called when the first navigation was completed or window
// is closed before that. |did_finish| argument of the |callback| is set to
diff --git a/extensions/browser/extension_error.cc b/extensions/browser/extension_error.cc
index e7a109d3..73c0a35 100644
--- a/extensions/browser/extension_error.cc
+++ b/extensions/browser/extension_error.cc
@@ -18,8 +18,8 @@
const std::string& extension_id,
bool from_incognito,
logging::LogSeverity level,
- const base::string16& source,
- const base::string16& message)
+ const std::u16string& source,
+ const std::u16string& message)
: type_(type),
extension_id_(extension_id),
id_(0),
@@ -27,8 +27,7 @@
level_(level),
source_(source),
message_(message),
- occurrences_(1u) {
-}
+ occurrences_(1u) {}
ExtensionError::~ExtensionError() {
}
@@ -55,9 +54,9 @@
// ManifestError
ManifestError::ManifestError(const std::string& extension_id,
- const base::string16& message,
- const base::string16& manifest_key,
- const base::string16& manifest_specific)
+ const std::u16string& message,
+ const std::u16string& manifest_key,
+ const std::u16string& manifest_specific)
: ExtensionError(ExtensionError::MANIFEST_ERROR,
extension_id,
false, // extensions can't be installed while incognito.
@@ -65,8 +64,7 @@
base::FilePath(kManifestFilename).AsUTF16Unsafe(),
message),
manifest_key_(manifest_key),
- manifest_specific_(manifest_specific) {
-}
+ manifest_specific_(manifest_specific) {}
ManifestError::~ManifestError() {
}
@@ -87,8 +85,8 @@
RuntimeError::RuntimeError(const std::string& extension_id,
bool from_incognito,
- const base::string16& source,
- const base::string16& message,
+ const std::u16string& source,
+ const std::u16string& message,
const StackTrace& stack_trace,
const GURL& context_url,
logging::LogSeverity level,
@@ -164,15 +162,14 @@
// InternalError
InternalError::InternalError(const std::string& extension_id,
- const base::string16& message,
+ const std::u16string& message,
logging::LogSeverity level)
: ExtensionError(ExtensionError::INTERNAL_ERROR,
extension_id,
false, // not incognito.
level,
- base::string16(),
- message) {
-}
+ std::u16string(),
+ message) {}
InternalError::~InternalError() {
}
diff --git a/extensions/browser/extension_error.h b/extensions/browser/extension_error.h
index bf20c1c..ba5ed3e 100644
--- a/extensions/browser/extension_error.h
+++ b/extensions/browser/extension_error.h
@@ -42,8 +42,8 @@
void set_id(int id) { id_ = id; }
bool from_incognito() const { return from_incognito_; }
logging::LogSeverity level() const { return level_; }
- const base::string16& source() const { return source_; }
- const base::string16& message() const { return message_; }
+ const std::u16string& source() const { return source_; }
+ const std::u16string& message() const { return message_; }
size_t occurrences() const { return occurrences_; }
void set_occurrences(size_t occurrences) { occurrences_ = occurrences; }
@@ -52,8 +52,8 @@
const std::string& extension_id,
bool from_incognito,
logging::LogSeverity level,
- const base::string16& source,
- const base::string16& message);
+ const std::u16string& source,
+ const std::u16string& message);
virtual bool IsEqualImpl(const ExtensionError* rhs) const = 0;
@@ -70,9 +70,9 @@
// The source for the error; this can be a script, web page, or manifest file.
// This is stored as a string (rather than a url) since it can be a Chrome
// script file (e.g., event_bindings.js).
- base::string16 source_;
+ std::u16string source_;
// The error message itself.
- base::string16 message_;
+ std::u16string message_;
// The number of times this error has occurred.
size_t occurrences_;
@@ -83,25 +83,25 @@
class ManifestError : public ExtensionError {
public:
ManifestError(const std::string& extension_id,
- const base::string16& message,
- const base::string16& manifest_key,
- const base::string16& manifest_specific);
+ const std::u16string& message,
+ const std::u16string& manifest_key,
+ const std::u16string& manifest_specific);
~ManifestError() override;
std::string GetDebugString() const override;
- const base::string16& manifest_key() const { return manifest_key_; }
- const base::string16& manifest_specific() const { return manifest_specific_; }
+ const std::u16string& manifest_key() const { return manifest_key_; }
+ const std::u16string& manifest_specific() const { return manifest_specific_; }
private:
bool IsEqualImpl(const ExtensionError* rhs) const override;
// If present, this indicates the feature in the manifest which caused the
// error.
- base::string16 manifest_key_;
+ std::u16string manifest_key_;
// If present, this is a more-specific location of the error - for instance,
// a specific permission which is incorrect, rather than simply "permissions".
- base::string16 manifest_specific_;
+ std::u16string manifest_specific_;
DISALLOW_COPY_AND_ASSIGN(ManifestError);
};
@@ -110,8 +110,8 @@
public:
RuntimeError(const std::string& extension_id, // optional, sometimes unknown.
bool from_incognito,
- const base::string16& source,
- const base::string16& message,
+ const std::u16string& source,
+ const std::u16string& message,
const StackTrace& stack_trace,
const GURL& context_url,
logging::LogSeverity level,
@@ -148,7 +148,7 @@
class InternalError : public ExtensionError {
public:
InternalError(const std::string& extension_id,
- const base::string16& message,
+ const std::u16string& message,
logging::LogSeverity level);
~InternalError() override;
diff --git a/extensions/browser/extension_error_test_util.cc b/extensions/browser/extension_error_test_util.cc
index 583fcc1..8e1af667 100644
--- a/extensions/browser/extension_error_test_util.cc
+++ b/extensions/browser/extension_error_test_util.cc
@@ -30,10 +30,9 @@
CHECK(frame.get());
stack_trace.push_back(*frame);
- base::string16 source =
+ std::u16string source =
base::UTF8ToUTF16(std::string(kExtensionScheme) +
- url::kStandardSchemeSeparator +
- extension_id);
+ url::kStandardSchemeSeparator + extension_id);
return std::unique_ptr<ExtensionError>(
new RuntimeError(extension_id, from_incognito, source,
@@ -55,7 +54,7 @@
const std::string& message) {
return std::unique_ptr<ExtensionError>(
new ManifestError(extension_id, base::UTF8ToUTF16(message),
- base::string16(), base::string16()));
+ std::u16string(), std::u16string()));
}
} // namespace error_test_util
diff --git a/extensions/browser/extension_icon_placeholder.cc b/extensions/browser/extension_icon_placeholder.cc
index 5465183..60b46fb 100644
--- a/extensions/browser/extension_icon_placeholder.cc
+++ b/extensions/browser/extension_icon_placeholder.cc
@@ -75,7 +75,7 @@
base_image_(GetBackgroundImageForIconSize(size)) {
// Remove RTL formatting characters, if any, that may pad the extension name.
// See https://crbug.com/869358
- base::string16 sanitized_name = base::UTF8ToUTF16(std::string(name));
+ std::u16string sanitized_name = base::UTF8ToUTF16(std::string(name));
base::i18n::UnadjustStringForLocaleDirection(&sanitized_name);
letter_ = sanitized_name.substr(0, 1);
diff --git a/extensions/browser/extension_icon_placeholder.h b/extensions/browser/extension_icon_placeholder.h
index 64bef3482..e740849 100644
--- a/extensions/browser/extension_icon_placeholder.h
+++ b/extensions/browser/extension_icon_placeholder.h
@@ -40,7 +40,7 @@
extension_misc::ExtensionIcons icon_size_;
// The first letter of the extension's name.
- base::string16 letter_;
+ std::u16string letter_;
// The gray background image, on top of which the letter is drawn.
gfx::Image base_image_;
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_browsertest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_browsertest.cc
index fbc9723..9c29613 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_browsertest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_browsertest.cc
@@ -421,7 +421,7 @@
ui_test_utils::WaitForAppModalDialog();
EXPECT_TRUE(before_unload_dialog->is_before_unload_dialog());
EXPECT_FALSE(before_unload_dialog->is_reload());
- before_unload_dialog->OnAccept(base::string16(), false);
+ before_unload_dialog->OnAccept(std::u16string(), false);
}
IN_PROC_BROWSER_TEST_F(MimeHandlerViewTest,
@@ -466,7 +466,7 @@
ui_test_utils::WaitForAppModalDialog();
EXPECT_TRUE(before_unload_dialog->is_before_unload_dialog());
EXPECT_FALSE(before_unload_dialog->is_reload());
- before_unload_dialog->OnAccept(base::string16(), false);
+ before_unload_dialog->OnAccept(std::u16string(), false);
}
// Helper class to wait for document load event in the main frame.
diff --git a/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc b/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
index c7236dd..2e9c330 100644
--- a/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
+++ b/extensions/browser/guest_view/web_view/javascript_dialog_helper.cc
@@ -47,8 +47,8 @@
content::WebContents* web_contents,
content::RenderFrameHost* render_frame_host,
content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
DialogClosedCallback callback,
bool* did_suppress_message) {
base::DictionaryValue request_info;
@@ -77,13 +77,13 @@
DialogClosedCallback callback) {
// This is called if the guest has a beforeunload event handler.
// This callback allows navigation to proceed.
- std::move(callback).Run(true, base::string16());
+ std::move(callback).Run(true, std::u16string());
}
bool JavaScriptDialogHelper::HandleJavaScriptDialog(
content::WebContents* web_contents,
bool accept,
- const base::string16* prompt_override) {
+ const std::u16string* prompt_override) {
return false;
}
diff --git a/extensions/browser/guest_view/web_view/javascript_dialog_helper.h b/extensions/browser/guest_view/web_view/javascript_dialog_helper.h
index 7f42b61..ae759a1 100644
--- a/extensions/browser/guest_view/web_view/javascript_dialog_helper.h
+++ b/extensions/browser/guest_view/web_view/javascript_dialog_helper.h
@@ -21,8 +21,8 @@
void RunJavaScriptDialog(content::WebContents* web_contents,
content::RenderFrameHost* render_frame_host,
content::JavaScriptDialogType dialog_type,
- const base::string16& message_text,
- const base::string16& default_prompt_text,
+ const std::u16string& message_text,
+ const std::u16string& default_prompt_text,
DialogClosedCallback callback,
bool* did_suppress_message) override;
void RunBeforeUnloadDialog(content::WebContents* web_contents,
@@ -31,7 +31,7 @@
DialogClosedCallback callback) override;
bool HandleJavaScriptDialog(content::WebContents* web_contents,
bool accept,
- const base::string16* prompt_override) override;
+ const std::u16string* prompt_override) override;
void CancelDialogs(content::WebContents* web_contents,
bool reset_state) override;
diff --git a/extensions/browser/guest_view/web_view/web_view_find_helper.cc b/extensions/browser/guest_view/web_view/web_view_find_helper.cc
index 95cb7df..f0573c81 100644
--- a/extensions/browser/guest_view/web_view/web_view_find_helper.cc
+++ b/extensions/browser/guest_view/web_view/web_view_find_helper.cc
@@ -87,7 +87,7 @@
void WebViewFindHelper::Find(
content::WebContents* guest_web_contents,
- const base::string16& search_text,
+ const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function) {
// Need a new request_id for each new find request.
@@ -107,7 +107,7 @@
insert_result.first->second->options().Clone();
if (current_find_session_) {
- const base::string16& current_search_text =
+ const std::u16string& current_search_text =
current_find_session_->search_text();
bool current_match_case = current_find_session_->options()->match_case;
full_options->new_session = current_search_text.empty() ||
@@ -223,9 +223,8 @@
}
WebViewFindHelper::FindUpdateEvent::FindUpdateEvent(
- const base::string16& search_text)
- : search_text_(search_text) {
-}
+ const std::u16string& search_text)
+ : search_text_(search_text) {}
WebViewFindHelper::FindUpdateEvent::~FindUpdateEvent() {
}
@@ -247,7 +246,7 @@
WebViewFindHelper::FindInfo::FindInfo(
int request_id,
- const base::string16& search_text,
+ const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function)
: request_id_(request_id),
diff --git a/extensions/browser/guest_view/web_view/web_view_find_helper.h b/extensions/browser/guest_view/web_view/web_view_find_helper.h
index 4ad85ee..4859270 100644
--- a/extensions/browser/guest_view/web_view/web_view_find_helper.h
+++ b/extensions/browser/guest_view/web_view/web_view_find_helper.h
@@ -40,7 +40,7 @@
// Helper function for WebViewGuest::Find().
void Find(content::WebContents* guest_web_contents,
- const base::string16& search_text,
+ const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function);
@@ -81,7 +81,7 @@
// Stores and processes the results for the |findupdate| event.
class FindUpdateEvent {
public:
- explicit FindUpdateEvent(const base::string16& search_text);
+ explicit FindUpdateEvent(const std::u16string& search_text);
~FindUpdateEvent();
// Aggregate the find results.
@@ -94,7 +94,7 @@
void PrepareResults(base::DictionaryValue* results);
private:
- const base::string16 search_text_;
+ const std::u16string search_text_;
FindResults find_results_;
DISALLOW_COPY_AND_ASSIGN(FindUpdateEvent);
@@ -104,7 +104,7 @@
class FindInfo : public base::RefCounted<FindInfo> {
public:
FindInfo(int request_id,
- const base::string16& search_text,
+ const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function);
@@ -131,9 +131,7 @@
return request_id_;
}
- const base::string16& search_text() {
- return search_text_;
- }
+ const std::u16string& search_text() { return search_text_; }
// Calls the callback function within |find_function_| with the find results
// from within |find_results_|.
@@ -145,7 +143,7 @@
~FindInfo();
const int request_id_;
- const base::string16 search_text_;
+ const std::u16string search_text_;
blink::mojom::FindOptionsPtr options_;
scoped_refptr<WebViewInternalFindFunction> find_function_;
FindResults find_results_;
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 0afb0ced..d781a28 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -752,7 +752,7 @@
}
void WebViewGuest::StartFind(
- const base::string16& search_text,
+ const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function) {
find_helper_.Find(web_contents(), search_text, std::move(options),
@@ -1043,10 +1043,10 @@
void WebViewGuest::OnDidAddMessageToConsole(
content::RenderFrameHost* source_frame,
blink::mojom::ConsoleMessageLevel log_level,
- const base::string16& message,
+ const std::u16string& message,
int32_t line_no,
- const base::string16& source_id,
- const base::Optional<base::string16>& untrusted_stack_trace) {
+ const std::u16string& source_id,
+ const base::Optional<std::u16string>& untrusted_stack_trace) {
auto args = std::make_unique<base::DictionaryValue>();
// Log levels are from base/logging.h: LogSeverity.
args->SetInteger(webview::kLevel,
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.h b/extensions/browser/guest_view/web_view/web_view_guest.h
index f842b97..5383f32 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.h
+++ b/extensions/browser/guest_view/web_view/web_view_guest.h
@@ -118,7 +118,7 @@
std::string* error);
// Begin or continue a find request.
- void StartFind(const base::string16& search_text,
+ void StartFind(const std::u16string& search_text,
blink::mojom::FindOptionsPtr options,
scoped_refptr<WebViewInternalFindFunction> find_function);
@@ -282,10 +282,10 @@
void OnDidAddMessageToConsole(
content::RenderFrameHost* source_frame,
blink::mojom::ConsoleMessageLevel log_level,
- const base::string16& message,
+ const std::u16string& message,
int32_t line_no,
- const base::string16& source_id,
- const base::Optional<base::string16>& untrusted_stack_trace) final;
+ const std::u16string& source_id,
+ const base::Optional<std::u16string>& untrusted_stack_trace) final;
// Informs the embedder of a frame name change.
void ReportFrameNameChange(const std::string& name);
diff --git a/extensions/browser/install/crx_install_error.cc b/extensions/browser/install/crx_install_error.cc
index d61f059..487f4479 100644
--- a/extensions/browser/install/crx_install_error.cc
+++ b/extensions/browser/install/crx_install_error.cc
@@ -13,7 +13,7 @@
CrxInstallError::CrxInstallError(CrxInstallErrorType type,
CrxInstallErrorDetail detail,
- const base::string16& message)
+ const std::u16string& message)
: type_(type), detail_(detail), message_(message) {
DCHECK_NE(CrxInstallErrorType::NONE, type);
DCHECK_NE(CrxInstallErrorType::SANDBOXED_UNPACKER_FAILURE, type);
@@ -21,10 +21,10 @@
CrxInstallError::CrxInstallError(CrxInstallErrorType type,
CrxInstallErrorDetail detail)
- : CrxInstallError(type, detail, base::string16()) {}
+ : CrxInstallError(type, detail, std::u16string()) {}
CrxInstallError::CrxInstallError(SandboxedUnpackerFailureReason reason,
- const base::string16& message)
+ const std::u16string& message)
: type_(CrxInstallErrorType::SANDBOXED_UNPACKER_FAILURE),
detail_(CrxInstallErrorDetail::NONE),
sandbox_failure_detail_(reason),
diff --git a/extensions/browser/install/crx_install_error.h b/extensions/browser/install/crx_install_error.h
index 032fdfc..7bfaa63 100644
--- a/extensions/browser/install/crx_install_error.h
+++ b/extensions/browser/install/crx_install_error.h
@@ -73,10 +73,10 @@
public:
CrxInstallError(CrxInstallErrorType type,
CrxInstallErrorDetail detail,
- const base::string16& message);
+ const std::u16string& message);
CrxInstallError(CrxInstallErrorType type, CrxInstallErrorDetail detail);
CrxInstallError(SandboxedUnpackerFailureReason reason,
- const base::string16& message);
+ const std::u16string& message);
~CrxInstallError();
CrxInstallError(const CrxInstallError& other);
@@ -85,7 +85,7 @@
CrxInstallError& operator=(CrxInstallError&& other);
CrxInstallErrorType type() const { return type_; }
- const base::string16& message() const { return message_; }
+ const std::u16string& message() const { return message_; }
CrxInstallErrorDetail detail() const;
SandboxedUnpackerFailureReason sandbox_failure_detail() const;
bool IsCrxVerificationFailedError() const;
@@ -95,7 +95,7 @@
CrxInstallErrorType type_;
CrxInstallErrorDetail detail_;
base::Optional<SandboxedUnpackerFailureReason> sandbox_failure_detail_;
- base::string16 message_;
+ std::u16string message_;
};
} // namespace extensions
diff --git a/extensions/browser/management_policy.cc b/extensions/browser/management_policy.cc
index 0a8d0a6..a1767b3 100644
--- a/extensions/browser/management_policy.cc
+++ b/extensions/browser/management_policy.cc
@@ -26,49 +26,50 @@
}
bool ManagementPolicy::Provider::UserMayLoad(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return true;
}
bool ManagementPolicy::Provider::UserMayInstall(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return UserMayLoad(extension, error);
}
bool ManagementPolicy::Provider::UserMayModifySettings(
- const Extension* extension, base::string16* error) const {
+ const Extension* extension,
+ std::u16string* error) const {
return true;
}
bool ManagementPolicy::Provider::ExtensionMayModifySettings(
const Extension* source_extension,
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return true;
}
-bool ManagementPolicy::Provider::MustRemainEnabled(const Extension* extension,
- base::string16* error)
- const {
+bool ManagementPolicy::Provider::MustRemainEnabled(
+ const Extension* extension,
+ std::u16string* error) const {
return false;
}
bool ManagementPolicy::Provider::MustRemainDisabled(
const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const {
+ std::u16string* error) const {
return false;
}
bool ManagementPolicy::Provider::MustRemainInstalled(
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return false;
}
bool ManagementPolicy::Provider::ShouldForceUninstall(
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return false;
}
@@ -87,19 +88,19 @@
}
bool ManagementPolicy::UserMayLoad(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(
&Provider::UserMayLoad, "Installation", true, extension, error);
}
bool ManagementPolicy::UserMayInstall(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(&Provider::UserMayInstall, "Installation", true,
extension, error);
}
bool ManagementPolicy::UserMayModifySettings(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(
&Provider::UserMayModifySettings, "Modification", true, extension, error);
}
@@ -107,7 +108,7 @@
bool ManagementPolicy::ExtensionMayModifySettings(
const Extension* source_extension,
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
for (const Provider* provider : providers_) {
if (!provider->ExtensionMayModifySettings(source_extension, extension,
error)) {
@@ -123,14 +124,14 @@
}
bool ManagementPolicy::MustRemainEnabled(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(
&Provider::MustRemainEnabled, "Disabling", false, extension, error);
}
bool ManagementPolicy::MustRemainDisabled(const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const {
+ std::u16string* error) const {
if (!UserMayLoad(extension, error)) {
if (reason)
*reason = disable_reason::DISABLE_BLOCKED_BY_POLICY;
@@ -145,13 +146,13 @@
}
bool ManagementPolicy::MustRemainInstalled(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(
&Provider::MustRemainInstalled, "Removing", false, extension, error);
}
bool ManagementPolicy::ShouldForceUninstall(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
return ApplyToProviderList(&Provider::ShouldForceUninstall, "Uninstalling",
false, extension, error);
}
@@ -173,7 +174,7 @@
const char* debug_operation_name,
bool normal_result,
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
for (const Provider* provider : providers_) {
bool result = (provider->*function)(extension, error);
if (result != normal_result) {
diff --git a/extensions/browser/management_policy.h b/extensions/browser/management_policy.h
index 9335f6a9..8909d45 100644
--- a/extensions/browser/management_policy.h
+++ b/extensions/browser/management_policy.h
@@ -59,13 +59,13 @@
// to all extension installations, not just user-initiated ones. Fix either
// the name or the semantics.
virtual bool UserMayLoad(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns false if the user should not be allowed to install the given
// |extension|. By default, this forwards to UserMayLoad() (since a user
// should not be able to install an extension they cannot load).
virtual bool UserMayInstall(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Providers should return false if a user may not enable, disable, or
// uninstall the |extension|, or change its usage options (incognito
@@ -74,13 +74,13 @@
// to all setting modifications, not just user-initiated ones. Fix either
// the name or the semantics.
virtual bool UserMayModifySettings(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Providers should return false if the originating extension
// |source_extension| cannot disable the |extension|.
virtual bool ExtensionMayModifySettings(const Extension* source_extension,
const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Providers should return true if the |extension| must always remain
// enabled. This is distinct from UserMayModifySettings() in that the latter
@@ -88,23 +88,23 @@
// Providers implementing this method should also implement the others
// above, if they wish to completely lock in an extension.
virtual bool MustRemainEnabled(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Similar to MustRemainEnabled, but for whether an extension must remain
// disabled, and returns an error and/or reason if the caller needs it.
virtual bool MustRemainDisabled(const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const;
+ std::u16string* error) const;
// Similar to MustRemainEnabled, but for whether an extension must remain
// installed, and returns an error and/or reason if the caller needs it.
virtual bool MustRemainInstalled(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Providers should return true for extensions that should be force
// uninstalled.
virtual bool ShouldForceUninstall(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
private:
DISALLOW_COPY_AND_ASSIGN(Provider);
@@ -128,46 +128,46 @@
// Installed extensions failing this check are disabled with the reason
// DISABLE_BLOCKED_BY_POLICY.
// TODO(crbug.com/461747): Misleading name; see comment in Provider.
- bool UserMayLoad(const Extension* extension, base::string16* error) const;
+ bool UserMayLoad(const Extension* extension, std::u16string* error) const;
// Returns false if the user should not be allowed to install the given
// |extension|. By default, this forwards to UserMayLoad() (since a user
// should not be able to install an extension they cannot load).
- bool UserMayInstall(const Extension* extension, base::string16* error) const;
+ bool UserMayInstall(const Extension* extension, std::u16string* error) const;
// Returns true if the user is permitted to enable, disable, or uninstall the
// given extension, or change the extension's usage options (incognito mode,
// file access, etc.). If not, |error| may be set to an appropriate message.
// TODO(crbug.com/461747): Misleading name; see comment in Provider.
bool UserMayModifySettings(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true if the originating extension is permitted to disable the
// given extension. If not, |error| may be set to an appropriate message.
bool ExtensionMayModifySettings(const Extension* source_extension,
const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true if the extension must remain enabled at all times (e.g. a
// component extension). In that case, |error| may be set to an appropriate
// message.
bool MustRemainEnabled(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true immediately if any registered provider's UserMayLoad() returns
// false or MustRemainDisabled() returns true.
bool MustRemainDisabled(const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true immediately if any registered provider's MustRemainInstalled
// function returns true.
bool MustRemainInstalled(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true for extensions that should be force uninstalled.
bool ShouldForceUninstall(const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// Returns true if the |extension| should be repaired upon corruption.
// Note that this method doesn't check whether extension is corrupted or not
@@ -182,7 +182,7 @@
// This is a pointer to a function in the Provider interface, used in
// ApplyToProviderList.
typedef bool (Provider::*ProviderFunction)(const Extension*,
- base::string16*) const;
+ std::u16string*) const;
typedef std::set<Provider*> ProviderList;
@@ -195,7 +195,7 @@
const char* debug_operation_name,
bool normal_result,
const Extension* extension,
- base::string16* error) const;
+ std::u16string* error) const;
// This stores raw pointers to Provider.
// TODO(lazyboy): Consider making ManagementPolicy own these providers.
diff --git a/extensions/browser/management_policy_unittest.cc b/extensions/browser/management_policy_unittest.cc
index c50710aa2..c057dd0 100644
--- a/extensions/browser/management_policy_unittest.cc
+++ b/extensions/browser/management_policy_unittest.cc
@@ -67,7 +67,7 @@
TEST_F(ManagementPolicyTest, UserMayLoad) {
// No providers registered.
- base::string16 error;
+ std::u16string error;
// The extension and location are irrelevant to the
// TestManagementPolicyProviders.
EXPECT_TRUE(policy_.UserMayLoad(NULL, &error));
@@ -96,7 +96,7 @@
}
TEST_F(ManagementPolicyTest, UserMayModifySettings) {
// No providers registered.
- base::string16 error;
+ std::u16string error;
EXPECT_TRUE(policy_.UserMayModifySettings(NULL, &error));
EXPECT_TRUE(error.empty());
@@ -124,7 +124,7 @@
TEST_F(ManagementPolicyTest, MustRemainEnabled) {
// No providers registered.
- base::string16 error;
+ std::u16string error;
EXPECT_FALSE(policy_.MustRemainEnabled(NULL, &error));
EXPECT_TRUE(error.empty());
@@ -152,7 +152,7 @@
TEST_F(ManagementPolicyTest, MustRemainDisabled) {
// No providers registered.
- base::string16 error;
+ std::u16string error;
EXPECT_FALSE(policy_.MustRemainDisabled(NULL, NULL, &error));
EXPECT_TRUE(error.empty());
@@ -183,7 +183,7 @@
TEST_F(ManagementPolicyTest, MustRemainInstalled) {
// No providers registered.
- base::string16 error;
+ std::u16string error;
EXPECT_FALSE(policy_.MustRemainInstalled(NULL, &error));
EXPECT_TRUE(error.empty());
@@ -213,8 +213,8 @@
TEST_F(ManagementPolicyTest, ErrorHandling) {
// The error parameter should be unchanged if no restriction was found.
std::string original_error = "Ceci est en effet une erreur.";
- base::string16 original_error16 = base::UTF8ToUTF16(original_error);
- base::string16 error = original_error16;
+ std::u16string original_error16 = base::UTF8ToUTF16(original_error);
+ std::u16string error = original_error16;
EXPECT_TRUE(policy_.UserMayLoad(NULL, &error));
EXPECT_EQ(original_error, base::UTF16ToUTF8(error));
EXPECT_TRUE(policy_.UserMayModifySettings(NULL, &error));
diff --git a/extensions/browser/path_util.cc b/extensions/browser/path_util.cc
index 6112a3a..7f612c35 100644
--- a/extensions/browser/path_util.cc
+++ b/extensions/browser/path_util.cc
@@ -49,10 +49,10 @@
void OnDirectorySizeCalculated(
int message_id,
- base::OnceCallback<void(const base::string16&)> callback,
+ base::OnceCallback<void(const std::u16string&)> callback,
int64_t size_in_bytes) {
const int one_mebibyte_in_bytes = 1024 * 1024;
- base::string16 response =
+ std::u16string response =
size_in_bytes < one_mebibyte_in_bytes
? l10n_util::GetStringUTF16(message_id)
: ui::FormatBytesWithUnits(size_in_bytes, ui::DATA_UNITS_MEBIBYTE,
@@ -109,7 +109,7 @@
void CalculateAndFormatExtensionDirectorySize(
const base::FilePath& extension_path,
int message_id,
- base::OnceCallback<void(const base::string16&)> callback) {
+ base::OnceCallback<void(const std::u16string&)> callback) {
base::PostTaskAndReplyWithResult(
GetExtensionFileTaskRunner().get(), FROM_HERE,
base::BindOnce(&base::ComputeDirectorySize, extension_path),
diff --git a/extensions/browser/path_util.h b/extensions/browser/path_util.h
index ebc1dba..4d0bf9d2 100644
--- a/extensions/browser/path_util.h
+++ b/extensions/browser/path_util.h
@@ -25,7 +25,7 @@
void CalculateAndFormatExtensionDirectorySize(
const base::FilePath& extension_path,
int message_id,
- base::OnceCallback<void(const base::string16&)> callback);
+ base::OnceCallback<void(const std::u16string&)> callback);
// Returns a new FilePath with the '~' resolved to the home directory, if
// appropriate. Otherwise, returns the original path.
diff --git a/extensions/browser/policy_check.cc b/extensions/browser/policy_check.cc
index 0cba14e..5be0020 100644
--- a/extensions/browser/policy_check.cc
+++ b/extensions/browser/policy_check.cc
@@ -26,7 +26,7 @@
std::move(callback).Run(errors);
}
-base::string16 PolicyCheck::GetErrorMessage() const {
+std::u16string PolicyCheck::GetErrorMessage() const {
return error_;
}
diff --git a/extensions/browser/policy_check.h b/extensions/browser/policy_check.h
index 378ea51..c60cfdde 100644
--- a/extensions/browser/policy_check.h
+++ b/extensions/browser/policy_check.h
@@ -29,11 +29,11 @@
// PreloadCheck:
void Start(ResultCallback callback) override;
- base::string16 GetErrorMessage() const override;
+ std::u16string GetErrorMessage() const override;
private:
content::BrowserContext* context_;
- base::string16 error_;
+ std::u16string error_;
DISALLOW_COPY_AND_ASSIGN(PolicyCheck);
};
diff --git a/extensions/browser/policy_check_unittest.cc b/extensions/browser/policy_check_unittest.cc
index 956e10e..1cd6d38 100644
--- a/extensions/browser/policy_check_unittest.cc
+++ b/extensions/browser/policy_check_unittest.cc
@@ -40,7 +40,7 @@
}
bool UserMayLoad(const Extension* extension,
- base::string16* error) const override {
+ std::u16string* error) const override {
EXPECT_EQ(extension_, extension);
if (!may_load_)
*error = base::ASCIIToUTF16(kDummyPolicyError);
diff --git a/extensions/browser/preload_check.cc b/extensions/browser/preload_check.cc
index 3e63cf4..9f60ca4 100644
--- a/extensions/browser/preload_check.cc
+++ b/extensions/browser/preload_check.cc
@@ -13,8 +13,8 @@
PreloadCheck::~PreloadCheck() {}
-base::string16 PreloadCheck::GetErrorMessage() const {
- return base::string16();
+std::u16string PreloadCheck::GetErrorMessage() const {
+ return std::u16string();
}
} // namespace extensions
diff --git a/extensions/browser/preload_check.h b/extensions/browser/preload_check.h
index 45a9fac..8b3f967 100644
--- a/extensions/browser/preload_check.h
+++ b/extensions/browser/preload_check.h
@@ -43,7 +43,7 @@
virtual void Start(ResultCallback callback) = 0;
// Subclasses may provide an error message.
- virtual base::string16 GetErrorMessage() const;
+ virtual std::u16string GetErrorMessage() const;
const Extension* extension() { return extension_.get(); }
diff --git a/extensions/browser/requirements_checker.cc b/extensions/browser/requirements_checker.cc
index d2f307d..4003c65 100644
--- a/extensions/browser/requirements_checker.cc
+++ b/extensions/browser/requirements_checker.cc
@@ -49,7 +49,7 @@
}
}
-base::string16 RequirementsChecker::GetErrorMessage() const {
+std::u16string RequirementsChecker::GetErrorMessage() const {
// Join the error messages into one string.
std::vector<std::string> messages;
if (errors_.count(WEBGL_NOT_SUPPORTED)) {
diff --git a/extensions/browser/requirements_checker.h b/extensions/browser/requirements_checker.h
index 8127e22..fcea7f8 100644
--- a/extensions/browser/requirements_checker.h
+++ b/extensions/browser/requirements_checker.h
@@ -29,7 +29,7 @@
// PreloadCheck:
void Start(ResultCallback callback) override;
// Joins multiple errors into a space-separated string.
- base::string16 GetErrorMessage() const override;
+ std::u16string GetErrorMessage() const override;
private:
// Callback for the GpuFeatureChecker.
diff --git a/extensions/browser/sandboxed_unpacker.cc b/extensions/browser/sandboxed_unpacker.cc
index 948184dd..5b7be8bf 100644
--- a/extensions/browser/sandboxed_unpacker.cc
+++ b/extensions/browser/sandboxed_unpacker.cc
@@ -498,7 +498,7 @@
// Localize manifest now, so confirm UI gets correct extension name.
// TODO(rdevlin.cronin): Continue removing std::string errors and replacing
- // with base::string16
+ // with std::u16string
std::string utf8_error;
if (!extension_l10n_util::LocalizeExtension(
extension_root_, final_manifest_dict.get(),
@@ -569,7 +569,7 @@
SandboxedUnpackerFailureReason failure_reason =
SandboxedUnpackerFailureReason::UNPACKER_CLIENT_FAILED;
- base::string16 error;
+ std::u16string error;
switch (status) {
case ImageSanitizer::Status::kImagePathError:
failure_reason =
@@ -658,7 +658,7 @@
SandboxedUnpackerFailureReason failure_reason =
SandboxedUnpackerFailureReason::UNPACKER_CLIENT_FAILED;
- base::string16 error;
+ std::u16string error;
switch (status) {
case JsonFileSanitizer::Status::kFileReadError:
case JsonFileSanitizer::Status::kDecodingError:
@@ -778,7 +778,7 @@
base::UTF8ToUTF16(error)));
}
-base::string16 SandboxedUnpacker::FailureReasonToString16(
+std::u16string SandboxedUnpacker::FailureReasonToString16(
const SandboxedUnpackerFailureReason reason) {
switch (reason) {
case SandboxedUnpackerFailureReason::COULD_NOT_GET_TEMP_DIRECTORY:
@@ -870,7 +870,7 @@
case SandboxedUnpackerFailureReason::NUM_FAILURE_REASONS:
default:
NOTREACHED();
- return base::string16();
+ return std::u16string();
}
}
@@ -947,7 +947,7 @@
void SandboxedUnpacker::ReportFailure(
const SandboxedUnpackerFailureReason reason,
- const base::string16& error) {
+ const std::u16string& error) {
DCHECK(unpacker_io_task_runner_->RunsTasksInCurrentSequence());
UMA_HISTOGRAM_ENUMERATION(
diff --git a/extensions/browser/sandboxed_unpacker.h b/extensions/browser/sandboxed_unpacker.h
index f0a422f..7cb9381 100644
--- a/extensions/browser/sandboxed_unpacker.h
+++ b/extensions/browser/sandboxed_unpacker.h
@@ -166,7 +166,7 @@
bool CreateTempDirectory();
// Helper functions to simplify calling ReportFailure.
- base::string16 FailureReasonToString16(
+ std::u16string FailureReasonToString16(
const SandboxedUnpackerFailureReason reason);
void FailWithPackageError(const SandboxedUnpackerFailureReason reason);
@@ -220,7 +220,7 @@
// Puts a sanboxed unpacker failure in histogram
// Extensions.SandboxUnpackFailureReason.
void ReportFailure(const SandboxedUnpackerFailureReason reason,
- const base::string16& error);
+ const std::u16string& error);
// Overwrites original manifest with safe result from utility process.
// Returns nullopt on error.
diff --git a/extensions/browser/sandboxed_unpacker_unittest.cc b/extensions/browser/sandboxed_unpacker_unittest.cc
index 8196752..4aae934f 100644
--- a/extensions/browser/sandboxed_unpacker_unittest.cc
+++ b/extensions/browser/sandboxed_unpacker_unittest.cc
@@ -85,10 +85,10 @@
}
base::FilePath temp_dir() const { return temp_dir_; }
- base::string16 unpack_error_message() const {
+ std::u16string unpack_error_message() const {
if (error_)
return error_->message();
- return base::string16();
+ return std::u16string();
}
CrxInstallErrorType unpack_error_type() const {
if (error_)
@@ -226,7 +226,7 @@
return client_->temp_dir().AppendASCII(kTempExtensionName);
}
- base::string16 GetInstallErrorMessage() const {
+ std::u16string GetInstallErrorMessage() const {
return client_->unpack_error_message();
}
diff --git a/extensions/browser/test_management_policy.cc b/extensions/browser/test_management_policy.cc
index 76b870b..9c0b83d 100644
--- a/extensions/browser/test_management_policy.cc
+++ b/extensions/browser/test_management_policy.cc
@@ -43,14 +43,15 @@
}
bool TestManagementPolicyProvider::UserMayLoad(const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
if (error && !may_load_)
*error = error_message_;
return may_load_;
}
bool TestManagementPolicyProvider::UserMayModifySettings(
- const Extension* extension, base::string16* error) const {
+ const Extension* extension,
+ std::u16string* error) const {
if (error && !may_modify_status_)
*error = error_message_;
return may_modify_status_;
@@ -59,15 +60,15 @@
bool TestManagementPolicyProvider::ExtensionMayModifySettings(
const Extension* source_extension,
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
if (error && !may_modify_status_)
*error = error_message_;
return may_modify_status_;
}
-bool TestManagementPolicyProvider::MustRemainEnabled(const Extension* extension,
- base::string16* error)
- const {
+bool TestManagementPolicyProvider::MustRemainEnabled(
+ const Extension* extension,
+ std::u16string* error) const {
if (error && must_remain_enabled_)
*error = error_message_;
return must_remain_enabled_;
@@ -76,7 +77,7 @@
bool TestManagementPolicyProvider::MustRemainDisabled(
const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const {
+ std::u16string* error) const {
if (must_remain_disabled_) {
if (error)
*error = error_message_;
@@ -88,7 +89,7 @@
bool TestManagementPolicyProvider::MustRemainInstalled(
const Extension* extension,
- base::string16* error) const {
+ std::u16string* error) const {
if (error && must_remain_installed_)
*error = error_message_;
return must_remain_installed_;
diff --git a/extensions/browser/test_management_policy.h b/extensions/browser/test_management_policy.h
index 9f051cb..5ad94794 100644
--- a/extensions/browser/test_management_policy.h
+++ b/extensions/browser/test_management_policy.h
@@ -38,24 +38,24 @@
std::string GetDebugPolicyProviderName() const override;
bool UserMayLoad(const Extension* extension,
- base::string16* error) const override;
+ std::u16string* error) const override;
bool UserMayModifySettings(const Extension* extension,
- base::string16* error) const override;
+ std::u16string* error) const override;
bool ExtensionMayModifySettings(const Extension* source_extension,
const Extension* extension,
- base::string16* error) const override;
+ std::u16string* error) const override;
bool MustRemainEnabled(const Extension* extension,
- base::string16* error) const override;
+ std::u16string* error) const override;
bool MustRemainDisabled(const Extension* extension,
disable_reason::DisableReason* reason,
- base::string16* error) const override;
+ std::u16string* error) const override;
bool MustRemainInstalled(const Extension* extension,
- base::string16* error) const override;
+ std::u16string* error) const override;
private:
bool may_load_;
@@ -65,7 +65,7 @@
bool must_remain_installed_;
disable_reason::DisableReason disable_reason_;
- base::string16 error_message_;
+ std::u16string error_message_;
};
} // namespace extensions
diff --git a/extensions/browser/warning_set.cc b/extensions/browser/warning_set.cc
index d5a19fb..2ab0e5a8 100644
--- a/extensions/browser/warning_set.cc
+++ b/extensions/browser/warning_set.cc
@@ -147,7 +147,7 @@
// These parameters may be unsafe (URLs and Extension names) and need
// to be HTML-escaped before being embedded in the UI. Also extension IDs
// are translated to full extension names.
- std::vector<base::string16> final_parameters;
+ std::vector<std::u16string> final_parameters;
for (size_t i = 0; i < message_parameters_.size(); ++i) {
std::string message = message_parameters_[i];
if (base::StartsWith(message, kTranslate, base::CompareCase::SENSITIVE)) {
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_data.cc b/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
index c5d84205..7cc134da9 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_data.cc
@@ -58,7 +58,7 @@
// static
std::unique_ptr<BluetoothManifestData> BluetoothManifestData::FromValue(
const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<BluetoothManifestPermission> permission =
BluetoothManifestPermission::FromValue(value, error);
if (!permission)
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_data.h b/extensions/common/api/bluetooth/bluetooth_manifest_data.h
index ef179ddc..f438571b 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_data.h
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_data.h
@@ -41,7 +41,7 @@
// the manifest. Sets |error| and returns an empty scoped_ptr on failure.
static std::unique_ptr<BluetoothManifestData> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
const BluetoothManifestPermission* permission() const {
return permission_.get();
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_handler.cc b/extensions/common/api/bluetooth/bluetooth_manifest_handler.cc
index 07c85a1..868c880e 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_handler.cc
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_handler.cc
@@ -16,7 +16,7 @@
BluetoothManifestHandler::~BluetoothManifestHandler() {}
bool BluetoothManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* bluetooth = NULL;
CHECK(extension->manifest()->Get(manifest_keys::kBluetooth, &bluetooth));
std::unique_ptr<BluetoothManifestData> data =
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_handler.h b/extensions/common/api/bluetooth/bluetooth_manifest_handler.h
index 280f0d8..d71cea8c 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_handler.h
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_handler.h
@@ -25,7 +25,7 @@
~BluetoothManifestHandler() override;
// ManifestHandler overrides.
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
ManifestPermission* CreatePermission() override;
ManifestPermission* CreateInitialRequiredPermission(
const Extension* extension) override;
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc b/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc
index f148396..6564e6d 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_permission.cc
@@ -30,7 +30,7 @@
bool ParseUuid(BluetoothManifestPermission* permission,
const std::string& uuid,
- base::string16* error) {
+ std::u16string* error) {
device::BluetoothUUID bt_uuid(uuid);
if (!bt_uuid.IsValid()) {
*error = ErrorUtils::FormatErrorMessageUTF16(
@@ -43,7 +43,7 @@
bool ParseUuidArray(BluetoothManifestPermission* permission,
const std::unique_ptr<std::vector<std::string>>& uuids,
- base::string16* error) {
+ std::u16string* error) {
for (std::vector<std::string>::const_iterator it = uuids->begin();
it != uuids->end();
++it) {
@@ -65,7 +65,7 @@
// static
std::unique_ptr<BluetoothManifestPermission>
BluetoothManifestPermission::FromValue(const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<api::extensions_manifest_types::Bluetooth> bluetooth =
api::extensions_manifest_types::Bluetooth::FromValue(value, error);
if (!bluetooth)
@@ -136,7 +136,7 @@
bool BluetoothManifestPermission::FromValue(const base::Value* value) {
if (!value)
return false;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<BluetoothManifestPermission> manifest_permission(
BluetoothManifestPermission::FromValue(*value, &error));
diff --git a/extensions/common/api/bluetooth/bluetooth_manifest_permission.h b/extensions/common/api/bluetooth/bluetooth_manifest_permission.h
index 48583706..536d21f5 100644
--- a/extensions/common/api/bluetooth/bluetooth_manifest_permission.h
+++ b/extensions/common/api/bluetooth/bluetooth_manifest_permission.h
@@ -31,7 +31,7 @@
// the manifest. Sets |error| and returns an empty scoped_ptr on failure.
static std::unique_ptr<BluetoothManifestPermission> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
bool CheckRequest(const Extension* extension,
const BluetoothPermissionRequest& request) const;
diff --git a/extensions/common/api/declarative/declarative_manifest_data.cc b/extensions/common/api/declarative/declarative_manifest_data.cc
index ce4c9c7e..dcddddd 100644
--- a/extensions/common/api/declarative/declarative_manifest_data.cc
+++ b/extensions/common/api/declarative/declarative_manifest_data.cc
@@ -19,7 +19,7 @@
class ErrorBuilder {
public:
- explicit ErrorBuilder(base::string16* error) : error_(error) {}
+ explicit ErrorBuilder(std::u16string* error) : error_(error) {}
// Appends a literal string |error|.
void Append(base::StringPiece error) {
@@ -34,7 +34,7 @@
}
private:
- base::string16* const error_;
+ std::u16string* const error_;
DISALLOW_COPY_AND_ASSIGN(ErrorBuilder);
};
@@ -87,7 +87,7 @@
// static
std::unique_ptr<DeclarativeManifestData> DeclarativeManifestData::FromValue(
const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
// The following is an example of how an event programmatic rule definition
// translates to a manifest definition.
//
diff --git a/extensions/common/api/declarative/declarative_manifest_data.h b/extensions/common/api/declarative/declarative_manifest_data.h
index 011ef4eb1..29a2ac18 100644
--- a/extensions/common/api/declarative/declarative_manifest_data.h
+++ b/extensions/common/api/declarative/declarative_manifest_data.h
@@ -32,7 +32,7 @@
// the manifest. Sets |error| and returns an empty scoped_ptr on failure.
static std::unique_ptr<DeclarativeManifestData> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
std::vector<Rule> RulesForEvent(const std::string& event);
diff --git a/extensions/common/api/declarative/declarative_manifest_handler.cc b/extensions/common/api/declarative/declarative_manifest_handler.cc
index 6292a63..f64a6194 100644
--- a/extensions/common/api/declarative/declarative_manifest_handler.cc
+++ b/extensions/common/api/declarative/declarative_manifest_handler.cc
@@ -17,7 +17,7 @@
}
bool DeclarativeManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* event_rules = NULL;
CHECK(extension->manifest()->Get(manifest_keys::kEventRules, &event_rules));
std::unique_ptr<DeclarativeManifestData> data =
diff --git a/extensions/common/api/declarative/declarative_manifest_handler.h b/extensions/common/api/declarative/declarative_manifest_handler.h
index f63f5b79..cbee3cb 100644
--- a/extensions/common/api/declarative/declarative_manifest_handler.h
+++ b/extensions/common/api/declarative/declarative_manifest_handler.h
@@ -24,7 +24,7 @@
~DeclarativeManifestHandler() override;
// ManifestHandler overrides.
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
// ManifestHandler overrides.
diff --git a/extensions/common/api/declarative_net_request/dnr_manifest_handler.cc b/extensions/common/api/declarative_net_request/dnr_manifest_handler.cc
index 664ab495..8a79833 100644
--- a/extensions/common/api/declarative_net_request/dnr_manifest_handler.cc
+++ b/extensions/common/api/declarative_net_request/dnr_manifest_handler.cc
@@ -30,7 +30,7 @@
DNRManifestHandler::DNRManifestHandler() = default;
DNRManifestHandler::~DNRManifestHandler() = default;
-bool DNRManifestHandler::Parse(Extension* extension, base::string16* error) {
+bool DNRManifestHandler::Parse(Extension* extension, std::u16string* error) {
DCHECK(extension->manifest()->HasKey(
dnr_api::ManifestKeys::kDeclarativeNetRequest));
diff --git a/extensions/common/api/declarative_net_request/dnr_manifest_handler.h b/extensions/common/api/declarative_net_request/dnr_manifest_handler.h
index b29bf2e..a818af3 100644
--- a/extensions/common/api/declarative_net_request/dnr_manifest_handler.h
+++ b/extensions/common/api/declarative_net_request/dnr_manifest_handler.h
@@ -17,7 +17,7 @@
~DNRManifestHandler() override;
private:
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/api/extension_action/action_info.cc b/extensions/common/api/extension_action/action_info.cc
index 41762c9..e08bf95 100644
--- a/extensions/common/api/extension_action/action_info.cc
+++ b/extensions/common/api/extension_action/action_info.cc
@@ -60,7 +60,7 @@
std::unique_ptr<ActionInfo> ActionInfo::Load(const Extension* extension,
Type type,
const base::DictionaryValue* dict,
- base::string16* error) {
+ std::u16string* error) {
auto result = std::make_unique<ActionInfo>(type);
// Read the page action |default_icon| (optional).
diff --git a/extensions/common/api/extension_action/action_info.h b/extensions/common/api/extension_action/action_info.h
index 0d4bcce..180c1c3 100644
--- a/extensions/common/api/extension_action/action_info.h
+++ b/extensions/common/api/extension_action/action_info.h
@@ -42,7 +42,7 @@
static std::unique_ptr<ActionInfo> Load(const Extension* extension,
Type type,
const base::DictionaryValue* dict,
- base::string16* error);
+ std::u16string* error);
// Returns any action associated with the extension, whether it's specified
// under the "page_action", "browser_action", or "action" key.
diff --git a/extensions/common/api/printer_provider/usb_printer_manifest_data.cc b/extensions/common/api/printer_provider/usb_printer_manifest_data.cc
index bca900e..c687f2f 100644
--- a/extensions/common/api/printer_provider/usb_printer_manifest_data.cc
+++ b/extensions/common/api/printer_provider/usb_printer_manifest_data.cc
@@ -30,7 +30,7 @@
// static
std::unique_ptr<UsbPrinterManifestData> UsbPrinterManifestData::FromValue(
const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<api::extensions_manifest_types::UsbPrinters> usb_printers =
api::extensions_manifest_types::UsbPrinters::FromValue(value, error);
if (!usb_printers) {
diff --git a/extensions/common/api/printer_provider/usb_printer_manifest_data.h b/extensions/common/api/printer_provider/usb_printer_manifest_data.h
index d918dba..ac6b13e 100644
--- a/extensions/common/api/printer_provider/usb_printer_manifest_data.h
+++ b/extensions/common/api/printer_provider/usb_printer_manifest_data.h
@@ -28,7 +28,7 @@
// scoped_ptr on failure.
static std::unique_ptr<UsbPrinterManifestData> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
bool SupportsDevice(const device::mojom::UsbDeviceInfo& device) const;
diff --git a/extensions/common/api/printer_provider/usb_printer_manifest_handler.cc b/extensions/common/api/printer_provider/usb_printer_manifest_handler.cc
index c6c9088..189c7eb 100644
--- a/extensions/common/api/printer_provider/usb_printer_manifest_handler.cc
+++ b/extensions/common/api/printer_provider/usb_printer_manifest_handler.cc
@@ -17,7 +17,7 @@
}
bool UsbPrinterManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* usb_printers = nullptr;
CHECK(extension->manifest()->Get(manifest_keys::kUsbPrinters, &usb_printers));
std::unique_ptr<UsbPrinterManifestData> data =
diff --git a/extensions/common/api/printer_provider/usb_printer_manifest_handler.h b/extensions/common/api/printer_provider/usb_printer_manifest_handler.h
index dbef2ed..25ebaba 100644
--- a/extensions/common/api/printer_provider/usb_printer_manifest_handler.h
+++ b/extensions/common/api/printer_provider/usb_printer_manifest_handler.h
@@ -17,7 +17,7 @@
private:
// ManifestHandler overrides.
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
base::span<const char* const> Keys() const override;
};
diff --git a/extensions/common/api/sockets/sockets_manifest_data.cc b/extensions/common/api/sockets/sockets_manifest_data.cc
index 1b877bb8..a485e6a 100644
--- a/extensions/common/api/sockets/sockets_manifest_data.cc
+++ b/extensions/common/api/sockets/sockets_manifest_data.cc
@@ -39,7 +39,7 @@
// static
std::unique_ptr<SocketsManifestData> SocketsManifestData::FromValue(
const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<SocketsManifestPermission> permission =
SocketsManifestPermission::FromValue(value, error);
if (!permission)
diff --git a/extensions/common/api/sockets/sockets_manifest_data.h b/extensions/common/api/sockets/sockets_manifest_data.h
index 5e8d5e0b..ab7207f 100644
--- a/extensions/common/api/sockets/sockets_manifest_data.h
+++ b/extensions/common/api/sockets/sockets_manifest_data.h
@@ -40,7 +40,7 @@
// the manifest. Sets |error| and returns an empty scoped_ptr on failure.
static std::unique_ptr<SocketsManifestData> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
const SocketsManifestPermission* permission() const {
return permission_.get();
diff --git a/extensions/common/api/sockets/sockets_manifest_handler.cc b/extensions/common/api/sockets/sockets_manifest_handler.cc
index afdd62ba..bfb6426 100644
--- a/extensions/common/api/sockets/sockets_manifest_handler.cc
+++ b/extensions/common/api/sockets/sockets_manifest_handler.cc
@@ -16,7 +16,7 @@
SocketsManifestHandler::~SocketsManifestHandler() {}
bool SocketsManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* sockets = NULL;
CHECK(extension->manifest()->Get(manifest_keys::kSockets, &sockets));
std::unique_ptr<SocketsManifestData> data =
diff --git a/extensions/common/api/sockets/sockets_manifest_handler.h b/extensions/common/api/sockets/sockets_manifest_handler.h
index b3b32602..f878c962 100644
--- a/extensions/common/api/sockets/sockets_manifest_handler.h
+++ b/extensions/common/api/sockets/sockets_manifest_handler.h
@@ -25,7 +25,7 @@
~SocketsManifestHandler() override;
// ManifestHandler overrides.
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
ManifestPermission* CreatePermission() override;
ManifestPermission* CreateInitialRequiredPermission(
const Extension* extension) override;
diff --git a/extensions/common/api/sockets/sockets_manifest_permission.cc b/extensions/common/api/sockets/sockets_manifest_permission.cc
index 9542f91..2649a8eb 100644
--- a/extensions/common/api/sockets/sockets_manifest_permission.cc
+++ b/extensions/common/api/sockets/sockets_manifest_permission.cc
@@ -34,7 +34,7 @@
SocketsManifestPermission* permission,
content::SocketPermissionRequest::OperationType operation_type,
const std::string& host_pattern,
- base::string16* error) {
+ std::u16string* error) {
SocketPermissionEntry entry;
if (!SocketPermissionEntry::ParseHostPattern(
operation_type, host_pattern, &entry)) {
@@ -50,7 +50,7 @@
SocketsManifestPermission* permission,
content::SocketPermissionRequest::OperationType operation_type,
const std::unique_ptr<SocketHostPatterns>& host_patterns,
- base::string16* error) {
+ std::u16string* error) {
if (!host_patterns)
return true;
@@ -104,7 +104,7 @@
// messages are needed from |sockets|, and adds permissions to |ids|.
void AddSubdomainHostMessage(const SocketPermissionEntrySet& sockets,
PermissionIDSet* ids) {
- std::set<base::string16> domains;
+ std::set<std::u16string> domains;
for (const auto& socket : sockets) {
if (socket.GetHostType() == SocketPermissionEntry::HOSTS_IN_DOMAINS)
domains.insert(base::UTF8ToUTF16(socket.pattern().host));
@@ -119,7 +119,7 @@
// messages are needed from |sockets|, and adds permissions to |ids|.
void AddSpecificHostMessage(const SocketPermissionEntrySet& sockets,
PermissionIDSet* ids) {
- std::set<base::string16> hostnames;
+ std::set<std::u16string> hostnames;
for (const auto& socket : sockets) {
if (socket.GetHostType() == SocketPermissionEntry::SPECIFIC_HOSTS)
hostnames.insert(base::UTF8ToUTF16(socket.pattern().host));
@@ -150,7 +150,7 @@
// static
std::unique_ptr<SocketsManifestPermission> SocketsManifestPermission::FromValue(
const base::Value& value,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<Sockets> sockets = Sockets::FromValue(value, error);
if (!sockets)
return std::unique_ptr<SocketsManifestPermission>();
@@ -221,7 +221,7 @@
bool SocketsManifestPermission::FromValue(const base::Value* value) {
if (!value)
return false;
- base::string16 error;
+ std::u16string error;
std::unique_ptr<SocketsManifestPermission> manifest_permission(
SocketsManifestPermission::FromValue(*value, &error));
diff --git a/extensions/common/api/sockets/sockets_manifest_permission.h b/extensions/common/api/sockets/sockets_manifest_permission.h
index f1e2bed..55d371f 100644
--- a/extensions/common/api/sockets/sockets_manifest_permission.h
+++ b/extensions/common/api/sockets/sockets_manifest_permission.h
@@ -33,7 +33,7 @@
// the manifest. Sets |error| and returns an empty scoped_ptr on failure.
static std::unique_ptr<SocketsManifestPermission> FromValue(
const base::Value& value,
- base::string16* error);
+ std::u16string* error);
bool CheckRequest(const Extension* extension,
const content::SocketPermissionRequest& request) const;
diff --git a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc
index 817980bc..d4e39867 100644
--- a/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc
+++ b/extensions/common/api/sockets/sockets_manifest_permission_unittest.cc
@@ -50,7 +50,7 @@
static std::unique_ptr<SocketsManifestPermission> PermissionFromValue(
const base::Value& value) {
- base::string16 error16;
+ std::u16string error16;
std::unique_ptr<SocketsManifestPermission> permission(
SocketsManifestPermission::FromValue(value, &error16));
EXPECT_TRUE(permission) << "Error parsing Value into permission: " << error16;
diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc
index 3ddf1bf..b54e1b7c 100644
--- a/extensions/common/csp_validator.cc
+++ b/extensions/common/csp_validator.cc
@@ -622,7 +622,7 @@
bool DoesCSPDisallowRemoteCode(const std::string& content_security_policy,
base::StringPiece manifest_key,
- base::string16* error) {
+ std::u16string* error) {
DCHECK(error);
struct DirectiveMapping {
@@ -682,7 +682,7 @@
fallback_if_necessary(&worker_src_mapping, script_src_mapping);
auto is_secure_directive = [manifest_key](const DirectiveMapping& mapping,
- base::string16* error) {
+ std::u16string* error) {
if (!mapping.directive) {
*error = ErrorUtils::FormatErrorMessageUTF16(
manifest_errors::kInvalidCSPMissingSecureSrc, manifest_key,
diff --git a/extensions/common/csp_validator.h b/extensions/common/csp_validator.h
index 1c2b442..b323392d 100644
--- a/extensions/common/csp_validator.h
+++ b/extensions/common/csp_validator.h
@@ -134,7 +134,7 @@
// If not, populates |error|.
bool DoesCSPDisallowRemoteCode(const std::string& content_security_policy,
base::StringPiece manifest_key,
- base::string16* error);
+ std::u16string* error);
} // namespace csp_validator
diff --git a/extensions/common/csp_validator_unittest.cc b/extensions/common/csp_validator_unittest.cc
index 7e163d3..5646f5be 100644
--- a/extensions/common/csp_validator_unittest.cc
+++ b/extensions/common/csp_validator_unittest.cc
@@ -633,7 +633,7 @@
for (const auto& test_case : test_cases) {
SCOPED_TRACE(test_case.policy);
- base::string16 error;
+ std::u16string error;
bool result = extensions::csp_validator::DoesCSPDisallowRemoteCode(
test_case.policy, kManifestKey, &error);
EXPECT_EQ(test_case.expected_error.empty(), result);
diff --git a/extensions/common/error_utils.cc b/extensions/common/error_utils.cc
index 51246c69..47e08ac 100644
--- a/extensions/common/error_utils.cc
+++ b/extensions/common/error_utils.cc
@@ -64,18 +64,18 @@
return FormatErrorMessageInternal(format, {s1, s2, s3});
}
-base::string16 ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
+std::u16string ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1) {
return base::UTF8ToUTF16(FormatErrorMessageInternal(format, {s1}));
}
-base::string16 ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
+std::u16string ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2) {
return base::UTF8ToUTF16(FormatErrorMessageInternal(format, {s1, s2}));
}
-base::string16 ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
+std::u16string ErrorUtils::FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2,
base::StringPiece s3) {
diff --git a/extensions/common/error_utils.h b/extensions/common/error_utils.h
index 5f86ee0b..a7cad8a1 100644
--- a/extensions/common/error_utils.h
+++ b/extensions/common/error_utils.h
@@ -27,14 +27,14 @@
base::StringPiece s2,
base::StringPiece s3);
- static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1);
- static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2);
- static base::string16 FormatErrorMessageUTF16(base::StringPiece format,
+ static std::u16string FormatErrorMessageUTF16(base::StringPiece format,
base::StringPiece s1,
base::StringPiece s2,
base::StringPiece s3);
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index 7ce8eea..4fd8599 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -147,7 +147,7 @@
bool ComputeExtensionID(const base::DictionaryValue& manifest,
const base::FilePath& path,
int creation_flags,
- base::string16* error,
+ std::u16string* error,
ExtensionId* extension_id) {
if (manifest.HasKey(keys::kPublicKey)) {
std::string public_key;
@@ -215,7 +215,7 @@
}
// TODO(sungguk): Continue removing std::string errors and replacing
-// with base::string16. See http://crbug.com/71980.
+// with std::u16string. See http://crbug.com/71980.
scoped_refptr<Extension> Extension::Create(const base::FilePath& path,
Manifest::Location location,
const base::DictionaryValue& value,
@@ -224,7 +224,7 @@
std::string* utf8_error) {
base::ElapsedTimer timer;
DCHECK(utf8_error);
- base::string16 error;
+ std::u16string error;
ExtensionId extension_id;
if (!explicit_id.empty()) {
@@ -554,7 +554,7 @@
Extension::~Extension() {
}
-bool Extension::InitFromValue(int flags, base::string16* error) {
+bool Extension::InitFromValue(int flags, std::u16string* error) {
DCHECK(error);
creation_flags_ = flags;
@@ -605,29 +605,29 @@
return true;
}
-bool Extension::LoadRequiredFeatures(base::string16* error) {
+bool Extension::LoadRequiredFeatures(std::u16string* error) {
if (!LoadName(error) ||
!LoadVersion(error))
return false;
return true;
}
-bool Extension::LoadName(base::string16* error) {
- base::string16 localized_name;
+bool Extension::LoadName(std::u16string* error) {
+ std::u16string localized_name;
if (!manifest_->GetString(keys::kName, &localized_name)) {
*error = base::ASCIIToUTF16(errors::kInvalidName);
return false;
}
non_localized_name_ = base::UTF16ToUTF8(localized_name);
- base::string16 sanitized_name =
+ std::u16string sanitized_name =
base::CollapseWhitespace(localized_name, true);
base::i18n::SanitizeUserSuppliedString(&sanitized_name);
display_name_ = base::UTF16ToUTF8(sanitized_name);
return true;
}
-bool Extension::LoadVersion(base::string16* error) {
+bool Extension::LoadVersion(std::u16string* error) {
std::string version_str;
if (!manifest_->GetString(keys::kVersion, &version_str)) {
*error = base::ASCIIToUTF16(errors::kInvalidVersion);
@@ -647,7 +647,7 @@
return true;
}
-bool Extension::LoadAppFeatures(base::string16* error) {
+bool Extension::LoadAppFeatures(std::u16string* error) {
if (!LoadExtent(keys::kWebURLs, &extent_,
errors::kInvalidWebURLs, errors::kInvalidWebURL, error)) {
return false;
@@ -674,7 +674,7 @@
URLPatternSet* extent,
const char* list_error,
const char* value_error,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* temp_pattern_value = nullptr;
if (!manifest_->Get(key, &temp_pattern_value))
return true;
@@ -738,7 +738,7 @@
return true;
}
-bool Extension::LoadSharedFeatures(base::string16* error) {
+bool Extension::LoadSharedFeatures(std::u16string* error) {
if (!LoadDescription(error) ||
!ManifestHandler::ParseExtension(this, error) ||
!LoadShortName(error))
@@ -747,7 +747,7 @@
return true;
}
-bool Extension::LoadDescription(base::string16* error) {
+bool Extension::LoadDescription(std::u16string* error) {
if (manifest_->HasKey(keys::kDescription) &&
!manifest_->GetString(keys::kDescription, &description_)) {
*error = base::ASCIIToUTF16(errors::kInvalidDescription);
@@ -756,7 +756,7 @@
return true;
}
-bool Extension::LoadManifestVersion(base::string16* error) {
+bool Extension::LoadManifestVersion(std::u16string* error) {
// Get the original value out of the dictionary so that we can validate it
// more strictly.
if (manifest_->available_values().HasKey(keys::kManifestVersion)) {
@@ -788,9 +788,9 @@
return true;
}
-bool Extension::LoadShortName(base::string16* error) {
+bool Extension::LoadShortName(std::u16string* error) {
if (manifest_->HasKey(keys::kShortName)) {
- base::string16 localized_short_name;
+ std::u16string localized_short_name;
if (!manifest_->GetString(keys::kShortName, &localized_short_name) ||
localized_short_name.empty()) {
*error = base::ASCIIToUTF16(errors::kInvalidShortName);
diff --git a/extensions/common/extension.h b/extensions/common/extension.h
index 108a364..505e7c9b 100644
--- a/extensions/common/extension.h
+++ b/extensions/common/extension.h
@@ -356,26 +356,26 @@
// of the underlying DictionaryValue in its members. We should decide to
// either wrap the DictionaryValue and go with that only, or we should parse
// into strong types and discard the value. But doing both is bad.
- bool InitFromValue(int flags, base::string16* error);
+ bool InitFromValue(int flags, std::u16string* error);
// The following are helpers for InitFromValue to load various features of the
// extension from the manifest.
- bool LoadRequiredFeatures(base::string16* error);
- bool LoadName(base::string16* error);
- bool LoadVersion(base::string16* error);
+ bool LoadRequiredFeatures(std::u16string* error);
+ bool LoadName(std::u16string* error);
+ bool LoadVersion(std::u16string* error);
- bool LoadAppFeatures(base::string16* error);
+ bool LoadAppFeatures(std::u16string* error);
bool LoadExtent(const char* key,
URLPatternSet* extent,
const char* list_error,
const char* value_error,
- base::string16* error);
+ std::u16string* error);
- bool LoadSharedFeatures(base::string16* error);
- bool LoadDescription(base::string16* error);
- bool LoadManifestVersion(base::string16* error);
- bool LoadShortName(base::string16* error);
+ bool LoadSharedFeatures(std::u16string* error);
+ bool LoadDescription(std::u16string* error);
+ bool LoadManifestVersion(std::u16string* error);
+ bool LoadShortName(std::u16string* error);
// The extension's human-readable name. Name is used for display purpose. It
// might be wrapped with unicode bidi control characters so that it is
diff --git a/extensions/common/extension_messages.h b/extensions/common/extension_messages.h
index b1cd5bd..da4d302 100644
--- a/extensions/common/extension_messages.h
+++ b/extensions/common/extension_messages.h
@@ -95,7 +95,7 @@
IPC_STRUCT_MEMBER(GURL, url)
// Title of the page.
- IPC_STRUCT_MEMBER(base::string16, url_title)
+ IPC_STRUCT_MEMBER(std::u16string, url_title)
// API name.
IPC_STRUCT_MEMBER(std::string, api_call)
@@ -852,8 +852,8 @@
// Tells listeners that a detailed message was reported to the console by
// WebKit.
IPC_MESSAGE_ROUTED4(ExtensionHostMsg_DetailedConsoleMessageAdded,
- base::string16 /* message */,
- base::string16 /* source */,
+ std::u16string /* message */,
+ std::u16string /* source */,
extensions::StackTrace /* stack trace */,
int32_t /* severity level */)
@@ -862,7 +862,7 @@
IPC_MESSAGE_ROUTED3(ExtensionMsg_AutomationQuerySelector,
int /* request_id */,
int /* acc_obj_id */,
- base::string16 /* selector */)
+ std::u16string /* selector */)
// Result of a query selector request.
// result_acc_obj_id is the accessibility tree ID of the result element; 0
diff --git a/extensions/common/extension_urls.cc b/extensions/common/extension_urls.cc
index 51d2e3c4..e124981 100644
--- a/extensions/common/extension_urls.cc
+++ b/extensions/common/extension_urls.cc
@@ -16,7 +16,7 @@
namespace extensions {
-bool IsSourceFromAnExtension(const base::string16& source) {
+bool IsSourceFromAnExtension(const std::u16string& source) {
return GURL(source).SchemeIs(kExtensionScheme) ||
base::StartsWith(source, base::ASCIIToUTF16("extensions::"),
base::CompareCase::SENSITIVE);
diff --git a/extensions/common/extension_urls.h b/extensions/common/extension_urls.h
index 83ca9f1..0f6d316 100644
--- a/extensions/common/extension_urls.h
+++ b/extensions/common/extension_urls.h
@@ -21,7 +21,7 @@
// to a page or a script, and can be external (e.g., "http://www.google.com"),
// extension-related (e.g., "chrome-extension://<extension_id>/background.js"),
// or internal (e.g., "event_bindings" or "schemaUtils").
-bool IsSourceFromAnExtension(const base::string16& source);
+bool IsSourceFromAnExtension(const std::u16string& source);
} // namespace extensions
diff --git a/extensions/common/manifest.cc b/extensions/common/manifest.cc
index 828f439..65abb4a 100644
--- a/extensions/common/manifest.cc
+++ b/extensions/common/manifest.cc
@@ -346,8 +346,8 @@
return available_values_->GetString(path, out_value);
}
-bool Manifest::GetString(
- const std::string& path, base::string16* out_value) const {
+bool Manifest::GetString(const std::string& path,
+ std::u16string* out_value) const {
return available_values_->GetString(path, out_value);
}
diff --git a/extensions/common/manifest.h b/extensions/common/manifest.h
index 5005fe3..8a70f37b 100644
--- a/extensions/common/manifest.h
+++ b/extensions/common/manifest.h
@@ -200,7 +200,7 @@
bool GetBoolean(const std::string& path, bool* out_value) const;
bool GetInteger(const std::string& path, int* out_value) const;
bool GetString(const std::string& path, std::string* out_value) const;
- bool GetString(const std::string& path, base::string16* out_value) const;
+ bool GetString(const std::string& path, std::u16string* out_value) const;
// Deprecated: Use the GetDictionary() overload that accepts a base::Value
// output parameter instead.
bool GetDictionary(const std::string& path,
diff --git a/extensions/common/manifest_handler.cc b/extensions/common/manifest_handler.cc
index 02d8008b..bbba247 100644
--- a/extensions/common/manifest_handler.cc
+++ b/extensions/common/manifest_handler.cc
@@ -70,7 +70,7 @@
// static
bool ManifestHandler::ParseExtension(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
return ManifestHandlerRegistry::Get()->ParseExtension(extension, error);
}
@@ -130,7 +130,7 @@
}
bool ManifestHandlerRegistry::ParseExtension(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
std::map<int, ManifestHandler*> handlers_by_priority;
for (ManifestHandlerMap::iterator iter = handlers_.begin();
iter != handlers_.end(); ++iter) {
diff --git a/extensions/common/manifest_handler.h b/extensions/common/manifest_handler.h
index 81ca0ce8..3ee36543 100644
--- a/extensions/common/manifest_handler.h
+++ b/extensions/common/manifest_handler.h
@@ -34,7 +34,7 @@
// Returns true on success or false on failure; if false, |error| will
// be set to a failure message.
// This does not perform any IO operations.
- virtual bool Parse(Extension* extension, base::string16* error) = 0;
+ virtual bool Parse(Extension* extension, std::u16string* error) = 0;
// Validate that files associated with this manifest key exist.
// Validation takes place after parsing. May also append a series of
@@ -43,7 +43,7 @@
//
// Otherwise, returns false, and a description of the error is
// returned in |error|.
- // TODO(yoz): Change error to base::string16. See crbug.com/71980.
+ // TODO(yoz): Change error to std::u16string. See crbug.com/71980.
virtual bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const;
@@ -88,7 +88,7 @@
// Call Parse on all registered manifest handlers that should parse
// this extension.
- static bool ParseExtension(Extension* extension, base::string16* error);
+ static bool ParseExtension(Extension* extension, std::u16string* error);
// Call Validate on all registered manifest handlers for this extension. This
// may perform IO operations.
@@ -146,7 +146,7 @@
void Finalize();
- bool ParseExtension(Extension* extension, base::string16* error);
+ bool ParseExtension(Extension* extension, std::u16string* error);
bool ValidateExtension(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings);
diff --git a/extensions/common/manifest_handler_helpers.cc b/extensions/common/manifest_handler_helpers.cc
index 5a4b4e2..b6e7340 100644
--- a/extensions/common/manifest_handler_helpers.cc
+++ b/extensions/common/manifest_handler_helpers.cc
@@ -46,7 +46,7 @@
bool LoadIconsFromDictionary(const base::Value* icons_value,
ExtensionIconSet* icons,
- base::string16* error) {
+ std::u16string* error) {
DCHECK(icons);
DCHECK(error);
for (const auto& entry : icons_value->DictItems()) {
diff --git a/extensions/common/manifest_handler_helpers.h b/extensions/common/manifest_handler_helpers.h
index 4cf060a..7a58a7cf 100644
--- a/extensions/common/manifest_handler_helpers.h
+++ b/extensions/common/manifest_handler_helpers.h
@@ -35,7 +35,7 @@
// Returns success. If load fails, |error| will be set.
bool LoadIconsFromDictionary(const base::Value* icons_value,
ExtensionIconSet* icons,
- base::string16* error);
+ std::u16string* error);
} // namespace manifest_handler_helpers
} // namespace extensions
diff --git a/extensions/common/manifest_handler_unittest.cc b/extensions/common/manifest_handler_unittest.cc
index 74de7d2d..20a7aaa 100644
--- a/extensions/common/manifest_handler_unittest.cc
+++ b/extensions/common/manifest_handler_unittest.cc
@@ -76,7 +76,7 @@
[](const std::string& s) { return s.c_str(); });
}
- bool Parse(Extension* extension, base::string16* error) override {
+ bool Parse(Extension* extension, std::u16string* error) override {
watcher_->Record(name_);
return true;
}
@@ -103,7 +103,7 @@
ParsingWatcher* watcher)
: TestManifestHandler(name, keys, prereqs, watcher) {
}
- bool Parse(Extension* extension, base::string16* error) override {
+ bool Parse(Extension* extension, std::u16string* error) override {
*error = base::ASCIIToUTF16(name_);
return false;
}
@@ -134,7 +134,7 @@
[](const std::string& s) { return s.c_str(); });
}
- bool Parse(Extension* extension, base::string16* error) override {
+ bool Parse(Extension* extension, std::u16string* error) override {
return true;
}
diff --git a/extensions/common/manifest_handlers/action_handlers_handler.cc b/extensions/common/manifest_handlers/action_handlers_handler.cc
index 0aa0b30..ad2371c6 100644
--- a/extensions/common/manifest_handlers/action_handlers_handler.cc
+++ b/extensions/common/manifest_handlers/action_handlers_handler.cc
@@ -42,7 +42,7 @@
ActionHandlersHandler::~ActionHandlersHandler() = default;
-bool ActionHandlersHandler::Parse(Extension* extension, base::string16* error) {
+bool ActionHandlersHandler::Parse(Extension* extension, std::u16string* error) {
const base::Value* entries = nullptr;
if (!extension->manifest()->GetList(keys::kActionHandlers, &entries)) {
*error = base::ASCIIToUTF16(errors::kInvalidActionHandlersType);
diff --git a/extensions/common/manifest_handlers/action_handlers_handler.h b/extensions/common/manifest_handlers/action_handlers_handler.h
index 1b239d72..80c6249 100644
--- a/extensions/common/manifest_handlers/action_handlers_handler.h
+++ b/extensions/common/manifest_handlers/action_handlers_handler.h
@@ -38,7 +38,7 @@
ActionHandlersHandler();
~ActionHandlersHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/app_isolation_info.cc b/extensions/common/manifest_handlers/app_isolation_info.cc
index 230551c..1948d6d 100644
--- a/extensions/common/manifest_handlers/app_isolation_info.cc
+++ b/extensions/common/manifest_handlers/app_isolation_info.cc
@@ -43,7 +43,7 @@
AppIsolationHandler::~AppIsolationHandler() {
}
-bool AppIsolationHandler::Parse(Extension* extension, base::string16* error) {
+bool AppIsolationHandler::Parse(Extension* extension, std::u16string* error) {
// Platform apps always get isolated storage.
if (extension->is_platform_app()) {
extension->SetManifestData(keys::kIsolation,
diff --git a/extensions/common/manifest_handlers/app_isolation_info.h b/extensions/common/manifest_handlers/app_isolation_info.h
index 6efe133..bba7183 100644
--- a/extensions/common/manifest_handlers/app_isolation_info.h
+++ b/extensions/common/manifest_handlers/app_isolation_info.h
@@ -31,7 +31,7 @@
AppIsolationHandler();
~AppIsolationHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool AlwaysParseForType(Manifest::Type type) const override;
private:
diff --git a/extensions/common/manifest_handlers/automation.cc b/extensions/common/manifest_handlers/automation.cc
index 68bcdda..a877714 100644
--- a/extensions/common/manifest_handlers/automation.cc
+++ b/extensions/common/manifest_handlers/automation.cc
@@ -106,7 +106,7 @@
}
bool AutomationManifestPermission::FromValue(const base::Value* value) {
- base::string16 error;
+ std::u16string error;
automation_info_.reset(
AutomationInfo::FromValue(*value, NULL /* install_warnings */, &error)
.release());
@@ -168,7 +168,7 @@
AutomationHandler::~AutomationHandler() = default;
-bool AutomationHandler::Parse(Extension* extension, base::string16* error) {
+bool AutomationHandler::Parse(Extension* extension, std::u16string* error) {
const base::Value* automation = nullptr;
CHECK(extension->manifest()->Get(keys::kAutomation, &automation));
std::vector<InstallWarning> install_warnings;
@@ -217,7 +217,7 @@
std::unique_ptr<AutomationInfo> AutomationInfo::FromValue(
const base::Value& value,
std::vector<InstallWarning>* install_warnings,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<Automation> automation = Automation::FromValue(value, error);
if (!automation)
return nullptr;
diff --git a/extensions/common/manifest_handlers/automation.h b/extensions/common/manifest_handlers/automation.h
index 45a8f9e..843d5b1 100644
--- a/extensions/common/manifest_handlers/automation.h
+++ b/extensions/common/manifest_handlers/automation.h
@@ -41,7 +41,7 @@
static std::unique_ptr<AutomationInfo> FromValue(
const base::Value& value,
std::vector<InstallWarning>* install_warnings,
- base::string16* error);
+ std::u16string* error);
static std::unique_ptr<base::Value> ToValue(const AutomationInfo& info);
~AutomationInfo() override;
@@ -77,7 +77,7 @@
private:
// ManifestHandler implementation.
- bool Parse(Extension* extensions, base::string16* error) override;
+ bool Parse(Extension* extensions, std::u16string* error) override;
ManifestPermission* CreatePermission() override;
ManifestPermission* CreateInitialRequiredPermission(
diff --git a/extensions/common/manifest_handlers/background_info.cc b/extensions/common/manifest_handlers/background_info.cc
index 3d938826..246f11f 100644
--- a/extensions/common/manifest_handlers/background_info.cc
+++ b/extensions/common/manifest_handlers/background_info.cc
@@ -53,7 +53,7 @@
// automatically, but it only adds a warning (rather than an error). Depending
// on how many keys we want to error on, it may make sense to change that.
bool CheckManifestV2RestrictedFeatures(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
if (extension->manifest_version() < 3) {
// No special restrictions for manifest v2 extensions (or v1, if the legacy
// commandline flag is being used).
@@ -142,7 +142,7 @@
.background_service_worker_script_.has_value();
}
-bool BackgroundInfo::Parse(const Extension* extension, base::string16* error) {
+bool BackgroundInfo::Parse(const Extension* extension, std::u16string* error) {
const std::string& bg_scripts_key = extension->is_platform_app() ?
keys::kPlatformAppBackgroundScripts : keys::kBackgroundScripts;
if (!CheckManifestV2RestrictedFeatures(extension, error) ||
@@ -168,7 +168,7 @@
bool BackgroundInfo::LoadBackgroundScripts(const Extension* extension,
const std::string& key,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* background_scripts_value = nullptr;
if (!extension->manifest()->Get(key, &background_scripts_value))
return true;
@@ -195,7 +195,7 @@
bool BackgroundInfo::LoadBackgroundPage(const Extension* extension,
const std::string& key,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* background_page_value = nullptr;
if (!extension->manifest()->Get(key, &background_page_value))
return true;
@@ -236,7 +236,7 @@
bool BackgroundInfo::LoadBackgroundServiceWorkerScript(
const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* scripts_value = nullptr;
if (!extension->manifest()->Get(keys::kBackgroundServiceWorkerScript,
&scripts_value)) {
@@ -255,7 +255,7 @@
}
bool BackgroundInfo::LoadBackgroundPage(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const char* key = extension->is_platform_app()
? keys::kPlatformAppBackgroundPage
: keys::kBackgroundPage;
@@ -263,7 +263,7 @@
}
bool BackgroundInfo::LoadBackgroundPersistent(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
if (extension->is_platform_app()) {
is_persistent_ = false;
return true;
@@ -289,7 +289,7 @@
}
bool BackgroundInfo::LoadAllowJSAccess(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* allow_js_access = NULL;
if (!extension->manifest()->Get(keys::kBackgroundAllowJsAccess,
&allow_js_access))
@@ -311,7 +311,7 @@
}
bool BackgroundManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<BackgroundInfo> info(new BackgroundInfo);
if (!info->Parse(extension, error))
return false;
diff --git a/extensions/common/manifest_handlers/background_info.h b/extensions/common/manifest_handlers/background_info.h
index a5fd988..bef9b026 100644
--- a/extensions/common/manifest_handlers/background_info.h
+++ b/extensions/common/manifest_handlers/background_info.h
@@ -49,21 +49,21 @@
return has_background_page() && !is_persistent_;
}
- bool Parse(const Extension* extension, base::string16* error);
+ bool Parse(const Extension* extension, std::u16string* error);
private:
bool LoadBackgroundScripts(const Extension* extension,
const std::string& key,
- base::string16* error);
+ std::u16string* error);
bool LoadBackgroundPage(const Extension* extension,
const std::string& key,
- base::string16* error);
- bool LoadBackgroundPage(const Extension* extension, base::string16* error);
+ std::u16string* error);
+ bool LoadBackgroundPage(const Extension* extension, std::u16string* error);
bool LoadBackgroundServiceWorkerScript(const Extension* extension,
- base::string16* error);
+ std::u16string* error);
bool LoadBackgroundPersistent(const Extension* extension,
- base::string16* error);
- bool LoadAllowJSAccess(const Extension* extension, base::string16* error);
+ std::u16string* error);
+ bool LoadAllowJSAccess(const Extension* extension, std::u16string* error);
// Optional URL to a master page of which a single instance should be always
// loaded in the background.
@@ -96,7 +96,7 @@
BackgroundManifestHandler();
~BackgroundManifestHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/content_capabilities_handler.cc b/extensions/common/manifest_handlers/content_capabilities_handler.cc
index 3ce1ed7..dfce542 100644
--- a/extensions/common/manifest_handlers/content_capabilities_handler.cc
+++ b/extensions/common/manifest_handlers/content_capabilities_handler.cc
@@ -51,7 +51,7 @@
}
bool ContentCapabilitiesHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<ContentCapabilitiesInfo> info(new ContentCapabilitiesInfo);
const base::Value* value = NULL;
diff --git a/extensions/common/manifest_handlers/content_capabilities_handler.h b/extensions/common/manifest_handlers/content_capabilities_handler.h
index ecaf23d..5c22bda 100644
--- a/extensions/common/manifest_handlers/content_capabilities_handler.h
+++ b/extensions/common/manifest_handlers/content_capabilities_handler.h
@@ -38,7 +38,7 @@
ContentCapabilitiesHandler();
~ContentCapabilitiesHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/content_scripts_handler.cc b/extensions/common/manifest_handlers/content_scripts_handler.cc
index 4d24f16..a8ee958 100644
--- a/extensions/common/manifest_handlers/content_scripts_handler.cc
+++ b/extensions/common/manifest_handlers/content_scripts_handler.cc
@@ -64,7 +64,7 @@
int valid_schemes,
bool all_urls_includes_chrome_urls,
Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
auto result = std::make_unique<UserScript>();
// run_at
@@ -278,7 +278,7 @@
return kKeys;
}
-bool ContentScriptsHandler::Parse(Extension* extension, base::string16* error) {
+bool ContentScriptsHandler::Parse(Extension* extension, std::u16string* error) {
ContentScriptsKeys manifest_keys;
if (!ContentScriptsKeys::ParseFromDictionary(
extension->manifest()->available_values(), &manifest_keys, error)) {
diff --git a/extensions/common/manifest_handlers/content_scripts_handler.h b/extensions/common/manifest_handlers/content_scripts_handler.h
index c4aa580..14068c0 100644
--- a/extensions/common/manifest_handlers/content_scripts_handler.h
+++ b/extensions/common/manifest_handlers/content_scripts_handler.h
@@ -41,7 +41,7 @@
ContentScriptsHandler();
~ContentScriptsHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/csp_info.cc b/extensions/common/manifest_handlers/csp_info.cc
index 3489a2d..1b06d06 100644
--- a/extensions/common/manifest_handlers/csp_info.cc
+++ b/extensions/common/manifest_handlers/csp_info.cc
@@ -79,7 +79,7 @@
return options;
}
-base::string16 GetInvalidManifestKeyError(base::StringPiece key) {
+std::u16string GetInvalidManifestKeyError(base::StringPiece key) {
return ErrorUtils::FormatErrorMessageUTF16(errors::kInvalidManifestKey, key);
}
@@ -161,7 +161,7 @@
CSPHandler::~CSPHandler() = default;
-bool CSPHandler::Parse(Extension* extension, base::string16* error) {
+bool CSPHandler::Parse(Extension* extension, std::u16string* error) {
const char* key = extension->GetType() == Manifest::TYPE_PLATFORM_APP
? keys::kPlatformAppContentSecurityPolicy
: keys::kContentSecurityPolicy;
@@ -198,7 +198,7 @@
}
bool CSPHandler::ParseCSPDictionary(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
// keys::kSandboxedPagesCSP shouldn't be used when using
// keys::kContentSecurityPolicy as a dictionary.
if (extension->manifest()->HasPath(keys::kSandboxedPagesCSP)) {
@@ -219,7 +219,7 @@
bool CSPHandler::ParseExtensionPagesCSP(
Extension* extension,
- base::string16* error,
+ std::u16string* error,
base::StringPiece manifest_key,
bool secure_only,
const base::Value* content_security_policy) {
@@ -263,7 +263,7 @@
}
bool CSPHandler::ParseSandboxCSP(Extension* extension,
- base::string16* error,
+ std::u16string* error,
base::StringPiece manifest_key,
const base::Value* sandbox_csp) {
if (!sandbox_csp) {
@@ -298,7 +298,7 @@
bool secure_only,
std::string content_security_policy) {
if (secure_only) {
- base::string16 error;
+ std::u16string error;
DCHECK(csp_validator::DoesCSPDisallowRemoteCode(content_security_policy,
manifest_key, &error));
} else {
diff --git a/extensions/common/manifest_handlers/csp_info.h b/extensions/common/manifest_handlers/csp_info.h
index 74bda90..a2ba725 100644
--- a/extensions/common/manifest_handlers/csp_info.h
+++ b/extensions/common/manifest_handlers/csp_info.h
@@ -60,16 +60,16 @@
~CSPHandler() override;
// ManifestHandler override:
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
// Parses the "content_security_policy" dictionary in the manifest.
- bool ParseCSPDictionary(Extension* extension, base::string16* error);
+ bool ParseCSPDictionary(Extension* extension, std::u16string* error);
// Parses the content security policy specified in the manifest for extension
// pages.
bool ParseExtensionPagesCSP(Extension* extension,
- base::string16* error,
+ std::u16string* error,
base::StringPiece manifest_key,
bool secure_only,
const base::Value* content_security_policy);
@@ -77,7 +77,7 @@
// Parses the content security policy specified in the manifest for sandboxed
// pages. This should be called after ParseExtensionPagesCSP.
bool ParseSandboxCSP(Extension* extension,
- base::string16* error,
+ std::u16string* error,
base::StringPiece manifest_key,
const base::Value* sandbox_csp);
diff --git a/extensions/common/manifest_handlers/default_locale_handler.cc b/extensions/common/manifest_handlers/default_locale_handler.cc
index f765516..e51a23c 100644
--- a/extensions/common/manifest_handlers/default_locale_handler.cc
+++ b/extensions/common/manifest_handlers/default_locale_handler.cc
@@ -37,7 +37,7 @@
DefaultLocaleHandler::~DefaultLocaleHandler() {
}
-bool DefaultLocaleHandler::Parse(Extension* extension, base::string16* error) {
+bool DefaultLocaleHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<LocaleInfo> info(new LocaleInfo);
if (!extension->manifest()->GetString(keys::kDefaultLocale,
&info->default_locale) ||
diff --git a/extensions/common/manifest_handlers/default_locale_handler.h b/extensions/common/manifest_handlers/default_locale_handler.h
index 530f6f9a..a198049f 100644
--- a/extensions/common/manifest_handlers/default_locale_handler.h
+++ b/extensions/common/manifest_handlers/default_locale_handler.h
@@ -27,7 +27,7 @@
DefaultLocaleHandler();
~DefaultLocaleHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
// Validates locale info. Doesn't check if messages.json files are valid.
bool Validate(const Extension* extension,
diff --git a/extensions/common/manifest_handlers/extension_action_handler.cc b/extensions/common/manifest_handlers/extension_action_handler.cc
index cc4f22b..46a325b 100644
--- a/extensions/common/manifest_handlers/extension_action_handler.cc
+++ b/extensions/common/manifest_handlers/extension_action_handler.cc
@@ -21,7 +21,7 @@
ExtensionActionHandler::~ExtensionActionHandler() {}
bool ExtensionActionHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const char* key = nullptr;
const char* error_key = nullptr;
ActionInfo::Type type = ActionInfo::TYPE_ACTION;
diff --git a/extensions/common/manifest_handlers/extension_action_handler.h b/extensions/common/manifest_handlers/extension_action_handler.h
index 69be27b..c896591 100644
--- a/extensions/common/manifest_handlers/extension_action_handler.h
+++ b/extensions/common/manifest_handlers/extension_action_handler.h
@@ -18,7 +18,7 @@
ExtensionActionHandler();
~ExtensionActionHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/externally_connectable.cc b/extensions/common/manifest_handlers/externally_connectable.cc
index 65837bd..3c25fca 100644
--- a/extensions/common/manifest_handlers/externally_connectable.cc
+++ b/extensions/common/manifest_handlers/externally_connectable.cc
@@ -62,7 +62,7 @@
}
bool ExternallyConnectableHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* externally_connectable = NULL;
CHECK(extension->manifest()->Get(keys::kExternallyConnectable,
&externally_connectable));
@@ -98,7 +98,7 @@
const base::Value& value,
bool allow_all_urls,
std::vector<InstallWarning>* install_warnings,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<ExternallyConnectable> externally_connectable =
ExternallyConnectable::FromValue(value, error);
if (!externally_connectable)
diff --git a/extensions/common/manifest_handlers/externally_connectable.h b/extensions/common/manifest_handlers/externally_connectable.h
index 8ba285e..2595664 100644
--- a/extensions/common/manifest_handlers/externally_connectable.h
+++ b/extensions/common/manifest_handlers/externally_connectable.h
@@ -37,7 +37,7 @@
ExternallyConnectableHandler();
~ExternallyConnectableHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
@@ -58,7 +58,7 @@
const base::Value& value,
bool allow_all_urls,
std::vector<InstallWarning>* install_warnings,
- base::string16* error);
+ std::u16string* error);
~ExternallyConnectableInfo() override;
diff --git a/extensions/common/manifest_handlers/file_handler_info.cc b/extensions/common/manifest_handlers/file_handler_info.cc
index 939a0e9..c8d009a 100644
--- a/extensions/common/manifest_handlers/file_handler_info.cc
+++ b/extensions/common/manifest_handlers/file_handler_info.cc
@@ -58,7 +58,7 @@
bool LoadFileHandler(const std::string& handler_id,
const base::Value& handler_info,
FileHandlersInfo* file_handlers,
- base::string16* error,
+ std::u16string* error,
std::vector<InstallWarning>* install_warnings) {
DCHECK(error);
apps::FileHandlerInfo handler;
@@ -158,7 +158,7 @@
return true;
}
-bool FileHandlersParser::Parse(Extension* extension, base::string16* error) {
+bool FileHandlersParser::Parse(Extension* extension, std::u16string* error) {
// Don't load file handlers for hosted_apps unless they're also bookmark apps.
// This check can be removed when bookmark apps are migrated off hosted apps,
// and hosted_apps should be removed from the list of valid extension types
diff --git a/extensions/common/manifest_handlers/file_handler_info.h b/extensions/common/manifest_handlers/file_handler_info.h
index b771dec..456e7ff 100644
--- a/extensions/common/manifest_handlers/file_handler_info.h
+++ b/extensions/common/manifest_handlers/file_handler_info.h
@@ -45,7 +45,7 @@
FileHandlersParser();
~FileHandlersParser() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/icons_handler.cc b/extensions/common/manifest_handlers/icons_handler.cc
index a299e13..6a105128 100644
--- a/extensions/common/manifest_handlers/icons_handler.cc
+++ b/extensions/common/manifest_handlers/icons_handler.cc
@@ -58,7 +58,7 @@
IconsHandler::~IconsHandler() {
}
-bool IconsHandler::Parse(Extension* extension, base::string16* error) {
+bool IconsHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<IconsInfo> icons_info(new IconsInfo);
const base::Value* icons_dict = nullptr;
if (!extension->manifest()->GetDictionary(keys::kIcons, &icons_dict)) {
diff --git a/extensions/common/manifest_handlers/icons_handler.h b/extensions/common/manifest_handlers/icons_handler.h
index 6aca61b..75ef965 100644
--- a/extensions/common/manifest_handlers/icons_handler.h
+++ b/extensions/common/manifest_handlers/icons_handler.h
@@ -39,7 +39,7 @@
IconsHandler();
~IconsHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/incognito_info.cc b/extensions/common/manifest_handlers/incognito_info.cc
index 2831d553..9a01b1f 100644
--- a/extensions/common/manifest_handlers/incognito_info.cc
+++ b/extensions/common/manifest_handlers/incognito_info.cc
@@ -35,7 +35,7 @@
IncognitoHandler::IncognitoHandler() = default;
IncognitoHandler::~IncognitoHandler() = default;
-bool IncognitoHandler::Parse(Extension* extension, base::string16* error) {
+bool IncognitoHandler::Parse(Extension* extension, std::u16string* error) {
IncognitoManifestKeys manifest_keys;
if (!IncognitoManifestKeys::ParseFromDictionary(
extension->manifest()->available_values(), &manifest_keys, error)) {
diff --git a/extensions/common/manifest_handlers/incognito_info.h b/extensions/common/manifest_handlers/incognito_info.h
index ea1319f..54437d1 100644
--- a/extensions/common/manifest_handlers/incognito_info.h
+++ b/extensions/common/manifest_handlers/incognito_info.h
@@ -35,7 +35,7 @@
IncognitoHandler();
~IncognitoHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool AlwaysParseForType(Manifest::Type type) const override;
private:
diff --git a/extensions/common/manifest_handlers/kiosk_mode_info.cc b/extensions/common/manifest_handlers/kiosk_mode_info.cc
index 9c1d02c..02d2ddaf 100644
--- a/extensions/common/manifest_handlers/kiosk_mode_info.cc
+++ b/extensions/common/manifest_handlers/kiosk_mode_info.cc
@@ -105,7 +105,7 @@
KioskModeHandler::~KioskModeHandler() {
}
-bool KioskModeHandler::Parse(Extension* extension, base::string16* error) {
+bool KioskModeHandler::Parse(Extension* extension, std::u16string* error) {
const Manifest* manifest = extension->manifest();
DCHECK(manifest->HasKey(keys::kKioskEnabled) ||
manifest->HasKey(keys::kKioskOnly));
diff --git a/extensions/common/manifest_handlers/kiosk_mode_info.h b/extensions/common/manifest_handlers/kiosk_mode_info.h
index 3d7dd13..df35c78 100644
--- a/extensions/common/manifest_handlers/kiosk_mode_info.h
+++ b/extensions/common/manifest_handlers/kiosk_mode_info.h
@@ -74,7 +74,7 @@
KioskModeHandler();
~KioskModeHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/mime_types_handler.cc b/extensions/common/manifest_handlers/mime_types_handler.cc
index 8a43f563..b0a2cdf 100644
--- a/extensions/common/manifest_handlers/mime_types_handler.cc
+++ b/extensions/common/manifest_handlers/mime_types_handler.cc
@@ -140,7 +140,7 @@
}
bool MimeTypesHandlerParser::Parse(extensions::Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* mime_types_value = nullptr;
if (!extension->manifest()->GetList(keys::kMIMETypes, &mime_types_value)) {
*error = base::ASCIIToUTF16(errors::kInvalidMimeTypesHandler);
diff --git a/extensions/common/manifest_handlers/mime_types_handler.h b/extensions/common/manifest_handlers/mime_types_handler.h
index cfc80ac049..0a40c09 100644
--- a/extensions/common/manifest_handlers/mime_types_handler.h
+++ b/extensions/common/manifest_handlers/mime_types_handler.h
@@ -73,7 +73,7 @@
MimeTypesHandlerParser();
~MimeTypesHandlerParser() override;
- bool Parse(extensions::Extension* extension, base::string16* error) override;
+ bool Parse(extensions::Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/nacl_modules_handler.cc b/extensions/common/manifest_handlers/nacl_modules_handler.cc
index aac2e50b..2968206 100644
--- a/extensions/common/manifest_handlers/nacl_modules_handler.cc
+++ b/extensions/common/manifest_handlers/nacl_modules_handler.cc
@@ -43,7 +43,7 @@
NaClModulesHandler::~NaClModulesHandler() {
}
-bool NaClModulesHandler::Parse(Extension* extension, base::string16* error) {
+bool NaClModulesHandler::Parse(Extension* extension, std::u16string* error) {
const base::Value* list_value = nullptr;
if (!extension->manifest()->GetList(keys::kNaClModules, &list_value)) {
*error = base::ASCIIToUTF16(errors::kInvalidNaClModules);
diff --git a/extensions/common/manifest_handlers/nacl_modules_handler.h b/extensions/common/manifest_handlers/nacl_modules_handler.h
index dccb714..90fa539 100644
--- a/extensions/common/manifest_handlers/nacl_modules_handler.h
+++ b/extensions/common/manifest_handlers/nacl_modules_handler.h
@@ -30,7 +30,7 @@
NaClModulesHandler();
~NaClModulesHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/oauth2_manifest_handler.cc b/extensions/common/manifest_handlers/oauth2_manifest_handler.cc
index e69a8da..847a6c3 100644
--- a/extensions/common/manifest_handlers/oauth2_manifest_handler.cc
+++ b/extensions/common/manifest_handlers/oauth2_manifest_handler.cc
@@ -47,8 +47,7 @@
OAuth2ManifestHandler::~OAuth2ManifestHandler() {
}
-bool OAuth2ManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+bool OAuth2ManifestHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<OAuth2Info> info(new OAuth2Info);
const base::Value* dict = nullptr;
if (!extension->manifest()->GetDictionary(keys::kOAuth2, &dict)) {
diff --git a/extensions/common/manifest_handlers/oauth2_manifest_handler.h b/extensions/common/manifest_handlers/oauth2_manifest_handler.h
index 4221fba..f218335 100644
--- a/extensions/common/manifest_handlers/oauth2_manifest_handler.h
+++ b/extensions/common/manifest_handlers/oauth2_manifest_handler.h
@@ -35,7 +35,7 @@
OAuth2ManifestHandler();
~OAuth2ManifestHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/offline_enabled_info.cc b/extensions/common/manifest_handlers/offline_enabled_info.cc
index ee162aa..89f72964 100644
--- a/extensions/common/manifest_handlers/offline_enabled_info.cc
+++ b/extensions/common/manifest_handlers/offline_enabled_info.cc
@@ -39,7 +39,7 @@
OfflineEnabledHandler::~OfflineEnabledHandler() {
}
-bool OfflineEnabledHandler::Parse(Extension* extension, base::string16* error) {
+bool OfflineEnabledHandler::Parse(Extension* extension, std::u16string* error) {
if (!extension->manifest()->HasKey(keys::kOfflineEnabled)) {
// Only platform apps are provided with a default offline enabled value.
// A platform app is offline enabled unless it requests the webview
diff --git a/extensions/common/manifest_handlers/offline_enabled_info.h b/extensions/common/manifest_handlers/offline_enabled_info.h
index 6350d7d..8ee9d3fb 100644
--- a/extensions/common/manifest_handlers/offline_enabled_info.h
+++ b/extensions/common/manifest_handlers/offline_enabled_info.h
@@ -32,7 +32,7 @@
OfflineEnabledHandler();
~OfflineEnabledHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool AlwaysParseForType(Manifest::Type type) const override;
private:
diff --git a/extensions/common/manifest_handlers/options_page_info.cc b/extensions/common/manifest_handlers/options_page_info.cc
index 282207e..3750612 100644
--- a/extensions/common/manifest_handlers/options_page_info.cc
+++ b/extensions/common/manifest_handlers/options_page_info.cc
@@ -41,7 +41,7 @@
bool ParseOptionsUrl(Extension* extension,
const std::string& url_string,
const std::string& manifest_field_name,
- base::string16* error,
+ std::u16string* error,
GURL* result) {
if (extension->is_hosted_app()) {
// Hosted apps require an absolute URL.
@@ -111,7 +111,7 @@
const base::Value* options_ui_value,
const std::string& options_page_string,
std::vector<InstallWarning>* install_warnings,
- base::string16* error) {
+ std::u16string* error) {
GURL options_page;
// Chrome styling is always opt-in.
bool chrome_style = false;
@@ -121,7 +121,7 @@
// Parse the options_ui object.
if (options_ui_value) {
- base::string16 options_ui_error;
+ std::u16string options_ui_error;
std::unique_ptr<OptionsUI> options_ui =
OptionsUI::FromValue(*options_ui_value, &options_ui_error);
@@ -129,7 +129,7 @@
install_warnings->push_back(
InstallWarning(base::UTF16ToASCII(options_ui_error)));
} else {
- base::string16 options_parse_error;
+ std::u16string options_parse_error;
if (!ParseOptionsUrl(extension,
options_ui->page,
keys::kOptionsUI,
@@ -175,7 +175,7 @@
}
bool OptionsPageManifestHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
std::vector<InstallWarning> install_warnings;
const Manifest* manifest = extension->manifest();
diff --git a/extensions/common/manifest_handlers/options_page_info.h b/extensions/common/manifest_handlers/options_page_info.h
index 02b1804..5d571bf 100644
--- a/extensions/common/manifest_handlers/options_page_info.h
+++ b/extensions/common/manifest_handlers/options_page_info.h
@@ -51,7 +51,7 @@
const base::Value* options_ui_value,
const std::string& options_page_string,
std::vector<InstallWarning>* install_warnings,
- base::string16* error);
+ std::u16string* error);
private:
// The URL to the options page of this extension. We only store one options
@@ -72,7 +72,7 @@
OptionsPageManifestHandler();
~OptionsPageManifestHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/permissions_parser.cc b/extensions/common/manifest_handlers/permissions_parser.cc
index faf999f..f90e149 100644
--- a/extensions/common/manifest_handlers/permissions_parser.cc
+++ b/extensions/common/manifest_handlers/permissions_parser.cc
@@ -88,7 +88,7 @@
// manifest into |hosts|.
bool ParseHostsFromJSON(Extension* extension,
std::vector<std::string>* hosts,
- base::string16* error) {
+ std::u16string* error) {
if (!extension->manifest()->HasKey(keys::kHostPermissions))
return true;
@@ -200,7 +200,7 @@
const char* key,
APIPermissionSet* api_permissions,
URLPatternSet* host_permissions,
- base::string16* error) {
+ std::u16string* error) {
if (!extension->manifest()->HasKey(key))
return true;
@@ -394,7 +394,7 @@
PermissionsParser::~PermissionsParser() {
}
-bool PermissionsParser::Parse(Extension* extension, base::string16* error) {
+bool PermissionsParser::Parse(Extension* extension, std::u16string* error) {
initial_required_permissions_.reset(new InitialPermissions);
if (!ParseHelper(extension,
keys::kPermissions,
diff --git a/extensions/common/manifest_handlers/permissions_parser.h b/extensions/common/manifest_handlers/permissions_parser.h
index 8fe36ba..fa44feb4 100644
--- a/extensions/common/manifest_handlers/permissions_parser.h
+++ b/extensions/common/manifest_handlers/permissions_parser.h
@@ -28,7 +28,7 @@
~PermissionsParser();
// Parse the manifest-specified permissions.
- bool Parse(Extension* extension, base::string16* error);
+ bool Parse(Extension* extension, std::u16string* error);
// Finalize the permissions, setting the related manifest data on the
// extension.
diff --git a/extensions/common/manifest_handlers/replacement_apps.cc b/extensions/common/manifest_handlers/replacement_apps.cc
index cb8690c..b08ac80 100644
--- a/extensions/common/manifest_handlers/replacement_apps.cc
+++ b/extensions/common/manifest_handlers/replacement_apps.cc
@@ -69,7 +69,7 @@
}
bool ReplacementAppsInfo::LoadWebApp(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* app_value = nullptr;
if (!extension->manifest()->Get(keys::kReplacementWebApp, &app_value)) {
return true;
@@ -92,7 +92,7 @@
}
bool ReplacementAppsInfo::LoadAndroidApp(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
const base::Value* app_value = nullptr;
if (!extension->manifest()->Get(keys::kReplacementAndroidApp, &app_value)) {
return true;
@@ -109,7 +109,7 @@
}
bool ReplacementAppsInfo::Parse(const Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
if (!LoadWebApp(extension, error) || !LoadAndroidApp(extension, error)) {
return false;
}
@@ -121,7 +121,7 @@
ReplacementAppsHandler::~ReplacementAppsHandler() {}
bool ReplacementAppsHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
std::unique_ptr<ReplacementAppsInfo> info(new ReplacementAppsInfo);
if (!info->Parse(extension, error)) {
diff --git a/extensions/common/manifest_handlers/replacement_apps.h b/extensions/common/manifest_handlers/replacement_apps.h
index bbb07c33..c3243b61 100644
--- a/extensions/common/manifest_handlers/replacement_apps.h
+++ b/extensions/common/manifest_handlers/replacement_apps.h
@@ -36,11 +36,11 @@
static const std::string& GetReplacementAndroidApp(
const Extension* extension);
- bool Parse(const Extension* extension, base::string16* error);
+ bool Parse(const Extension* extension, std::u16string* error);
private:
- bool LoadWebApp(const Extension* extension, base::string16* error);
- bool LoadAndroidApp(const Extension* extension, base::string16* error);
+ bool LoadWebApp(const Extension* extension, std::u16string* error);
+ bool LoadAndroidApp(const Extension* extension, std::u16string* error);
// Optional URL of a Web app.
GURL replacement_web_app;
@@ -57,7 +57,7 @@
ReplacementAppsHandler();
~ReplacementAppsHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/requirements_info.cc b/extensions/common/manifest_handlers/requirements_info.cc
index d743e30..242d0f5 100644
--- a/extensions/common/manifest_handlers/requirements_info.cc
+++ b/extensions/common/manifest_handlers/requirements_info.cc
@@ -50,7 +50,7 @@
return true;
}
-bool RequirementsHandler::Parse(Extension* extension, base::string16* error) {
+bool RequirementsHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<RequirementsInfo> requirements(
new RequirementsInfo(extension->manifest()));
diff --git a/extensions/common/manifest_handlers/requirements_info.h b/extensions/common/manifest_handlers/requirements_info.h
index b5fe279..257c1e24 100644
--- a/extensions/common/manifest_handlers/requirements_info.h
+++ b/extensions/common/manifest_handlers/requirements_info.h
@@ -32,7 +32,7 @@
RequirementsHandler();
~RequirementsHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool AlwaysParseForType(Manifest::Type type) const override;
diff --git a/extensions/common/manifest_handlers/sandboxed_page_info.cc b/extensions/common/manifest_handlers/sandboxed_page_info.cc
index b861df66..ae24e07 100644
--- a/extensions/common/manifest_handlers/sandboxed_page_info.cc
+++ b/extensions/common/manifest_handlers/sandboxed_page_info.cc
@@ -55,7 +55,7 @@
SandboxedPageHandler::~SandboxedPageHandler() {
}
-bool SandboxedPageHandler::Parse(Extension* extension, base::string16* error) {
+bool SandboxedPageHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<SandboxedPageInfo> sandboxed_info(new SandboxedPageInfo);
const base::Value* list_value = nullptr;
diff --git a/extensions/common/manifest_handlers/sandboxed_page_info.h b/extensions/common/manifest_handlers/sandboxed_page_info.h
index 4eea981..35c852b 100644
--- a/extensions/common/manifest_handlers/sandboxed_page_info.h
+++ b/extensions/common/manifest_handlers/sandboxed_page_info.h
@@ -37,7 +37,7 @@
SandboxedPageHandler();
~SandboxedPageHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/shared_module_info.cc b/extensions/common/manifest_handlers/shared_module_info.cc
index 0570fd3..1c94352 100644
--- a/extensions/common/manifest_handlers/shared_module_info.cc
+++ b/extensions/common/manifest_handlers/shared_module_info.cc
@@ -130,7 +130,7 @@
SharedModuleHandler::SharedModuleHandler() = default;
SharedModuleHandler::~SharedModuleHandler() = default;
-bool SharedModuleHandler::Parse(Extension* extension, base::string16* error) {
+bool SharedModuleHandler::Parse(Extension* extension, std::u16string* error) {
ManifestKeys manifest_keys;
if (!ManifestKeys::ParseFromDictionary(
extension->manifest()->available_values(), &manifest_keys, error)) {
diff --git a/extensions/common/manifest_handlers/shared_module_info.h b/extensions/common/manifest_handlers/shared_module_info.h
index 5d9ea44..f9f4db2 100644
--- a/extensions/common/manifest_handlers/shared_module_info.h
+++ b/extensions/common/manifest_handlers/shared_module_info.h
@@ -67,7 +67,7 @@
SharedModuleHandler();
~SharedModuleHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/manifest_handlers/web_accessible_resources_info.cc b/extensions/common/manifest_handlers/web_accessible_resources_info.cc
index 20c66cf..7f1db9fd 100644
--- a/extensions/common/manifest_handlers/web_accessible_resources_info.cc
+++ b/extensions/common/manifest_handlers/web_accessible_resources_info.cc
@@ -48,7 +48,7 @@
std::unique_ptr<WebAccessibleResourcesInfo> ParseResourceStringList(
const Extension& extension,
- base::string16* error) {
+ std::u16string* error) {
WebAccessibleResourcesMv2ManifestKeys manifest_keys;
if (!WebAccessibleResourcesMv2ManifestKeys::ParseFromDictionary(
extension.manifest()->available_values(), &manifest_keys, error)) {
@@ -78,7 +78,7 @@
std::unique_ptr<WebAccessibleResourcesInfo> ParseEntryList(
const Extension& extension,
- base::string16* error) {
+ std::u16string* error) {
auto info = std::make_unique<WebAccessibleResourcesInfo>();
auto get_error = [](size_t i, base::StringPiece message) {
return ErrorUtils::FormatErrorMessageUTF16(
@@ -205,7 +205,7 @@
}
bool WebAccessibleResourcesHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
auto info = extension->manifest_version() < 3
? ParseResourceStringList(*extension, error)
: ParseEntryList(*extension, error);
diff --git a/extensions/common/manifest_handlers/web_accessible_resources_info.h b/extensions/common/manifest_handlers/web_accessible_resources_info.h
index 5a72952..72aae9a 100644
--- a/extensions/common/manifest_handlers/web_accessible_resources_info.h
+++ b/extensions/common/manifest_handlers/web_accessible_resources_info.h
@@ -66,7 +66,7 @@
WebAccessibleResourcesHandler();
~WebAccessibleResourcesHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/web_app_file_handler.cc b/extensions/common/manifest_handlers/web_app_file_handler.cc
index 85a19d1..5662eb9 100644
--- a/extensions/common/manifest_handlers/web_app_file_handler.cc
+++ b/extensions/common/manifest_handlers/web_app_file_handler.cc
@@ -66,7 +66,7 @@
bool LoadWebAppFileHandler(const std::string& manifest_entry_index,
const base::Value& manifest_entry,
apps::FileHandlers* file_handlers,
- base::string16* error,
+ std::u16string* error,
std::vector<InstallWarning>* install_warnings) {
DCHECK(error);
@@ -150,7 +150,7 @@
WebAppFileHandlersParser::~WebAppFileHandlersParser() = default;
bool WebAppFileHandlersParser::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
// The "web_app_file_handlers" key is only available for Bookmark Apps.
// Including it elsewhere results in an install warning, and the file handlers
// are not parsed.
diff --git a/extensions/common/manifest_handlers/web_app_file_handler.h b/extensions/common/manifest_handlers/web_app_file_handler.h
index fc8c2e92..e0583f4 100644
--- a/extensions/common/manifest_handlers/web_app_file_handler.h
+++ b/extensions/common/manifest_handlers/web_app_file_handler.h
@@ -32,7 +32,7 @@
WebAppFileHandlersParser();
~WebAppFileHandlersParser() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_handlers/web_app_linked_shortcut_items.cc b/extensions/common/manifest_handlers/web_app_linked_shortcut_items.cc
index e2e7b21b..211ec046 100644
--- a/extensions/common/manifest_handlers/web_app_linked_shortcut_items.cc
+++ b/extensions/common/manifest_handlers/web_app_linked_shortcut_items.cc
@@ -23,7 +23,7 @@
bool ParseShortcutItemIconValue(
const base::Value& value,
WebAppLinkedShortcutItems::ShortcutItemInfo::IconInfo* icon_info,
- base::string16* error) {
+ std::u16string* error) {
const base::DictionaryValue* shortcut_item_icon_dict = nullptr;
if (!value.GetAsDictionary(&shortcut_item_icon_dict)) {
*error = base::UTF8ToUTF16(
@@ -58,7 +58,7 @@
bool ParseShortcutItemValue(const base::Value& value,
WebAppLinkedShortcutItems::ShortcutItemInfo* info,
- base::string16* error) {
+ std::u16string* error) {
const base::DictionaryValue* shortcut_item_dict = nullptr;
if (!value.GetAsDictionary(&shortcut_item_dict)) {
*error =
@@ -151,7 +151,7 @@
WebAppLinkedShortcutItemsHandler::~WebAppLinkedShortcutItemsHandler() = default;
bool WebAppLinkedShortcutItemsHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
// The "web_app_linked_shortcut_items" key is only available for Bookmark
// Apps. Including it elsewhere results in an install warning, and the linked
// shortcut items are not parsed.
diff --git a/extensions/common/manifest_handlers/web_app_linked_shortcut_items.h b/extensions/common/manifest_handlers/web_app_linked_shortcut_items.h
index 7baae167..5019a82 100644
--- a/extensions/common/manifest_handlers/web_app_linked_shortcut_items.h
+++ b/extensions/common/manifest_handlers/web_app_linked_shortcut_items.h
@@ -32,7 +32,7 @@
ShortcutItemInfo(const ShortcutItemInfo& other);
~ShortcutItemInfo();
- base::string16 name;
+ std::u16string name;
GURL url;
std::vector<IconInfo> shortcut_item_icon_infos;
};
@@ -58,7 +58,7 @@
~WebAppLinkedShortcutItemsHandler() override;
// ManifestHandler:
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
// ManifestHandler:
diff --git a/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.cc b/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.cc
index 0431744..e089be0 100644
--- a/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.cc
+++ b/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.cc
@@ -55,7 +55,7 @@
WebAppShortcutIconsHandler::~WebAppShortcutIconsHandler() = default;
bool WebAppShortcutIconsHandler::Parse(Extension* extension,
- base::string16* error) {
+ std::u16string* error) {
// The "web_app_shortcut_icons" key is only available for Bookmark Apps.
// Including it elsewhere results in an install warning, and the shortcut
// icons are not parsed.
diff --git a/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.h b/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.h
index b411829..a903a70a0 100644
--- a/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.h
+++ b/extensions/common/manifest_handlers/web_app_shortcut_icons_handler.h
@@ -43,7 +43,7 @@
~WebAppShortcutIconsHandler() override;
// ManifestHandler:
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
// ManifestHandler:
diff --git a/extensions/common/manifest_handlers/webview_info.cc b/extensions/common/manifest_handlers/webview_info.cc
index 6f57fa99..b1a2ceec 100644
--- a/extensions/common/manifest_handlers/webview_info.cc
+++ b/extensions/common/manifest_handlers/webview_info.cc
@@ -112,7 +112,7 @@
WebviewHandler::~WebviewHandler() {
}
-bool WebviewHandler::Parse(Extension* extension, base::string16* error) {
+bool WebviewHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<WebviewInfo> info(new WebviewInfo(extension->id()));
const base::Value* dict_value = nullptr;
diff --git a/extensions/common/manifest_handlers/webview_info.h b/extensions/common/manifest_handlers/webview_info.h
index 45208be..eb78eb4 100644
--- a/extensions/common/manifest_handlers/webview_info.h
+++ b/extensions/common/manifest_handlers/webview_info.h
@@ -51,7 +51,7 @@
WebviewHandler();
~WebviewHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
diff --git a/extensions/common/manifest_url_handlers.cc b/extensions/common/manifest_url_handlers.cc
index 3945083..537841a 100644
--- a/extensions/common/manifest_url_handlers.cc
+++ b/extensions/common/manifest_url_handlers.cc
@@ -99,7 +99,7 @@
HomepageURLHandler::~HomepageURLHandler() {
}
-bool HomepageURLHandler::Parse(Extension* extension, base::string16* error) {
+bool HomepageURLHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<ManifestURL> manifest_url(new ManifestURL);
std::string homepage_url_str;
if (!extension->manifest()->GetString(keys::kHomepageURL,
@@ -130,7 +130,7 @@
UpdateURLHandler::~UpdateURLHandler() {
}
-bool UpdateURLHandler::Parse(Extension* extension, base::string16* error) {
+bool UpdateURLHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<ManifestURL> manifest_url(new ManifestURL);
std::string tmp_update_url;
@@ -163,7 +163,7 @@
AboutPageHandler::~AboutPageHandler() {
}
-bool AboutPageHandler::Parse(Extension* extension, base::string16* error) {
+bool AboutPageHandler::Parse(Extension* extension, std::u16string* error) {
std::unique_ptr<ManifestURL> manifest_url(new ManifestURL);
std::string about_str;
if (!extension->manifest()->GetString(keys::kAboutPage, &about_str)) {
diff --git a/extensions/common/manifest_url_handlers.h b/extensions/common/manifest_url_handlers.h
index 1cc496ed..6b4f164e 100644
--- a/extensions/common/manifest_url_handlers.h
+++ b/extensions/common/manifest_url_handlers.h
@@ -67,7 +67,7 @@
HomepageURLHandler();
~HomepageURLHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
@@ -81,7 +81,7 @@
UpdateURLHandler();
~UpdateURLHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
private:
base::span<const char* const> Keys() const override;
@@ -99,7 +99,7 @@
AboutPageHandler();
~AboutPageHandler() override;
- bool Parse(Extension* extension, base::string16* error) override;
+ bool Parse(Extension* extension, std::u16string* error) override;
bool Validate(const Extension* extension,
std::string* error,
std::vector<InstallWarning>* warnings) const override;
diff --git a/extensions/common/permissions/api_permission_set.cc b/extensions/common/permissions/api_permission_set.cc
index 6f912beb..d744ce0a 100644
--- a/extensions/common/permissions/api_permission_set.cc
+++ b/extensions/common/permissions/api_permission_set.cc
@@ -28,14 +28,12 @@
APIPermission::ID id;
};
-bool CreateAPIPermission(
- const std::string& permission_str,
- const base::Value* permission_value,
- APIPermissionSet::ParseSource source,
- APIPermissionSet* api_permissions,
- base::string16* error,
- std::vector<std::string>* unhandled_permissions) {
-
+bool CreateAPIPermission(const std::string& permission_str,
+ const base::Value* permission_value,
+ APIPermissionSet::ParseSource source,
+ APIPermissionSet* api_permissions,
+ std::u16string* error,
+ std::vector<std::string>* unhandled_permissions) {
const APIPermissionInfo* permission_info =
PermissionsInfo::GetInstance()->GetByName(permission_str);
if (permission_info) {
@@ -86,7 +84,7 @@
const base::Value* permission_value,
APIPermissionSet::ParseSource source,
APIPermissionSet* api_permissions,
- base::string16* error,
+ std::u16string* error,
std::vector<std::string>* unhandled_permissions) {
if (permission_value) {
if (!permission_value->is_list()) {
@@ -145,7 +143,7 @@
const base::Value* permissions,
APIPermissionSet::ParseSource source,
APIPermissionSet* api_permissions,
- base::string16* error,
+ std::u16string* error,
std::vector<std::string>* unhandled_permissions) {
if (!permissions->is_list()) {
if (error) {
@@ -196,13 +194,11 @@
}
PermissionID::PermissionID(APIPermission::ID id)
- : std::pair<APIPermission::ID, base::string16>(id, base::string16()) {
-}
+ : std::pair<APIPermission::ID, std::u16string>(id, std::u16string()) {}
PermissionID::PermissionID(APIPermission::ID id,
- const base::string16& parameter)
- : std::pair<APIPermission::ID, base::string16>(id, parameter) {
-}
+ const std::u16string& parameter)
+ : std::pair<APIPermission::ID, std::u16string>(id, parameter) {}
PermissionID::~PermissionID() {
}
@@ -223,11 +219,11 @@
}
void PermissionIDSet::insert(APIPermission::ID permission_id) {
- insert(permission_id, base::string16());
+ insert(permission_id, std::u16string());
}
void PermissionIDSet::insert(APIPermission::ID permission_id,
- const base::string16& permission_detail) {
+ const std::u16string& permission_detail) {
permissions_.insert(PermissionID(permission_id, permission_detail));
}
@@ -247,9 +243,9 @@
permissions_.erase(lower_bound, upper_bound);
}
-std::vector<base::string16> PermissionIDSet::GetAllPermissionParameters()
+std::vector<std::u16string> PermissionIDSet::GetAllPermissionParameters()
const {
- std::vector<base::string16> params;
+ std::vector<std::u16string> params;
for (const auto& permission : permissions_) {
params.push_back(permission.parameter());
}
diff --git a/extensions/common/permissions/api_permission_set.h b/extensions/common/permissions/api_permission_set.h
index 6aed049..b77fa1b 100644
--- a/extensions/common/permissions/api_permission_set.h
+++ b/extensions/common/permissions/api_permission_set.h
@@ -57,7 +57,7 @@
static bool ParseFromJSON(const base::Value* permissions,
ParseSource source,
APIPermissionSet* api_permissions,
- base::string16* error,
+ std::u16string* error,
std::vector<std::string>* unhandled_permissions);
};
@@ -77,14 +77,14 @@
//
// TODO(sashab): Move this to the same file as PermissionIDSet once that moves
// to its own file.
-class PermissionID : public std::pair<APIPermission::ID, base::string16> {
+class PermissionID : public std::pair<APIPermission::ID, std::u16string> {
public:
explicit PermissionID(APIPermission::ID id);
- PermissionID(APIPermission::ID id, const base::string16& parameter);
+ PermissionID(APIPermission::ID id, const std::u16string& parameter);
virtual ~PermissionID();
const APIPermission::ID& id() const { return this->first; }
- const base::string16& parameter() const { return this->second; }
+ const std::u16string& parameter() const { return this->second; }
};
// A set of permissions for an app or extension. Used for passing around groups
@@ -121,14 +121,14 @@
// Adds the given permission, and an optional parameter, to the set.
void insert(APIPermission::ID permission_id);
void insert(APIPermission::ID permission_id,
- const base::string16& permission_parameter);
+ const std::u16string& permission_parameter);
void InsertAll(const PermissionIDSet& permission_set);
// Erases all permissions with the given id.
void erase(APIPermission::ID permission_id);
// Returns the parameters for all PermissionIDs in this set.
- std::vector<base::string16> GetAllPermissionParameters() const;
+ std::vector<std::u16string> GetAllPermissionParameters() const;
// Check if the set contains a permission with the given ID.
bool ContainsID(PermissionID permission_id) const;
diff --git a/extensions/common/permissions/manifest_permission_set.cc b/extensions/common/permissions/manifest_permission_set.cc
index afb72c2..9670766a 100644
--- a/extensions/common/permissions/manifest_permission_set.cc
+++ b/extensions/common/permissions/manifest_permission_set.cc
@@ -22,12 +22,11 @@
using extensions::ManifestHandler;
namespace errors = extensions::manifest_errors;
-bool CreateManifestPermission(
- const std::string& permission_name,
- const base::Value* permission_value,
- ManifestPermissionSet* manifest_permissions,
- base::string16* error,
- std::vector<std::string>* unhandled_permissions) {
+bool CreateManifestPermission(const std::string& permission_name,
+ const base::Value* permission_value,
+ ManifestPermissionSet* manifest_permissions,
+ std::u16string* error,
+ std::vector<std::string>* unhandled_permissions) {
std::unique_ptr<ManifestPermission> permission(
ManifestHandler::CreatePermission(permission_name));
@@ -61,7 +60,7 @@
bool ManifestPermissionSet::ParseFromJSON(
const base::ListValue* permissions,
ManifestPermissionSet* manifest_permissions,
- base::string16* error,
+ std::u16string* error,
std::vector<std::string>* unhandled_permissions) {
for (size_t i = 0; i < permissions->GetSize(); ++i) {
std::string permission_name;
diff --git a/extensions/common/permissions/manifest_permission_set.h b/extensions/common/permissions/manifest_permission_set.h
index dad5ae4..05e7b7b 100644
--- a/extensions/common/permissions/manifest_permission_set.h
+++ b/extensions/common/permissions/manifest_permission_set.h
@@ -34,11 +34,10 @@
// If |error| is NULL, parsing will continue with the next permission if
// invalid data is detected. If |error| is not NULL, it will be set to an
// error message and false is returned when an invalid permission is found.
- static bool ParseFromJSON(
- const base::ListValue* permissions,
- ManifestPermissionSet* manifest_permissions,
- base::string16* error,
- std::vector<std::string>* unhandled_permissions);
+ static bool ParseFromJSON(const base::ListValue* permissions,
+ ManifestPermissionSet* manifest_permissions,
+ std::u16string* error,
+ std::vector<std::string>* unhandled_permissions);
};
} // namespace extensions
diff --git a/extensions/common/permissions/permission_message.cc b/extensions/common/permissions/permission_message.cc
index 83553e66..624de47 100644
--- a/extensions/common/permissions/permission_message.cc
+++ b/extensions/common/permissions/permission_message.cc
@@ -6,14 +6,14 @@
namespace extensions {
-PermissionMessage::PermissionMessage(const base::string16& message,
+PermissionMessage::PermissionMessage(const std::u16string& message,
const PermissionIDSet& permissions)
: message_(message), permissions_(permissions) {}
PermissionMessage::PermissionMessage(
- const base::string16& message,
+ const std::u16string& message,
const PermissionIDSet& permissions,
- const std::vector<base::string16>& submessages)
+ const std::vector<std::u16string>& submessages)
: message_(message), permissions_(permissions), submessages_(submessages) {}
PermissionMessage::PermissionMessage(const PermissionMessage& other) = default;
diff --git a/extensions/common/permissions/permission_message.h b/extensions/common/permissions/permission_message.h
index d56a329..eb72c00e 100644
--- a/extensions/common/permissions/permission_message.h
+++ b/extensions/common/permissions/permission_message.h
@@ -38,24 +38,24 @@
// permission message, registerable as a callback.
class PermissionMessage {
public:
- PermissionMessage(const base::string16& message,
+ PermissionMessage(const std::u16string& message,
const PermissionIDSet& permissions);
- PermissionMessage(const base::string16& message,
+ PermissionMessage(const std::u16string& message,
const PermissionIDSet& permissions,
- const std::vector<base::string16>& submessages);
+ const std::vector<std::u16string>& submessages);
PermissionMessage(const PermissionMessage& other);
virtual ~PermissionMessage();
- const base::string16& message() const { return message_; }
+ const std::u16string& message() const { return message_; }
const PermissionIDSet& permissions() const { return permissions_; }
- const std::vector<base::string16>& submessages() const {
+ const std::vector<std::u16string>& submessages() const {
return submessages_;
}
private:
- const base::string16 message_;
+ const std::u16string message_;
const PermissionIDSet permissions_;
- const std::vector<base::string16> submessages_;
+ const std::vector<std::u16string> submessages_;
};
using PermissionMessages = std::vector<PermissionMessage>;
diff --git a/extensions/common/permissions/permission_message_test_util.cc b/extensions/common/permissions/permission_message_test_util.cc
index f3d12d19..da20e26f 100644
--- a/extensions/common/permissions/permission_message_test_util.cc
+++ b/extensions/common/permissions/permission_message_test_util.cc
@@ -28,17 +28,17 @@
provider->GetAllPermissionIDs(permissions, extension_type));
}
-std::vector<base::string16> MakeVectorString16(
+std::vector<std::u16string> MakeVectorString16(
const std::vector<std::string>& vec) {
- std::vector<base::string16> result;
+ std::vector<std::u16string> result;
for (const std::string& msg : vec)
result.push_back(base::UTF8ToUTF16(msg));
return result;
}
-std::vector<std::vector<base::string16>> MakeVectorVectorString16(
+std::vector<std::vector<std::u16string>> MakeVectorVectorString16(
const std::vector<std::vector<std::string>>& vecs) {
- std::vector<std::vector<base::string16>> result;
+ std::vector<std::vector<std::u16string>> result;
for (const std::vector<std::string>& vec : vecs)
result.push_back(MakeVectorString16(vec));
return result;
@@ -47,7 +47,7 @@
// Returns the vector of messages concatenated into a single string, separated
// by newlines, e.g.: "Bar"\n"Baz"\n
std::string MessagesVectorToString(
- const std::vector<base::string16>& messages) {
+ const std::vector<std::u16string>& messages) {
if (messages.empty())
return "\n";
return base::StrCat({"\"",
@@ -57,22 +57,22 @@
}
std::string MessagesToString(const PermissionMessages& messages) {
- std::vector<base::string16> messages_vec;
+ std::vector<std::u16string> messages_vec;
for (const PermissionMessage& msg : messages)
messages_vec.push_back(msg.message());
return MessagesVectorToString(messages_vec);
}
bool CheckThatSubmessagesMatch(
- const base::string16& message,
- const std::vector<base::string16>& expected_submessages,
- const std::vector<base::string16>& actual_submessages) {
+ const std::u16string& message,
+ const std::vector<std::u16string>& expected_submessages,
+ const std::vector<std::u16string>& actual_submessages) {
bool result = true;
- std::vector<base::string16> expected_sorted(expected_submessages);
+ std::vector<std::u16string> expected_sorted(expected_submessages);
std::sort(expected_sorted.begin(), expected_sorted.end());
- std::vector<base::string16> actual_sorted(actual_submessages);
+ std::vector<std::u16string> actual_sorted(actual_submessages);
std::sort(actual_sorted.begin(), actual_sorted.end());
if (expected_sorted != actual_sorted) {
// This is always a failure, even within an EXPECT_FALSE.
@@ -88,8 +88,8 @@
}
testing::AssertionResult VerifyHasPermissionMessageImpl(
- const base::string16& expected_message,
- const std::vector<base::string16>& expected_submessages,
+ const std::u16string& expected_message,
+ const std::vector<std::u16string>& expected_submessages,
const PermissionMessages& actual_messages) {
auto message_it =
std::find_if(actual_messages.begin(), actual_messages.end(),
@@ -116,8 +116,8 @@
}
testing::AssertionResult VerifyPermissionMessagesWithSubmessagesImpl(
- const std::vector<base::string16>& expected_messages,
- const std::vector<std::vector<base::string16>>& expected_submessages,
+ const std::vector<std::u16string>& expected_messages,
+ const std::vector<std::vector<std::u16string>>& expected_submessages,
const PermissionMessages& actual_messages,
bool check_order) {
CHECK_EQ(expected_messages.size(), expected_submessages.size());
@@ -163,7 +163,7 @@
testing::AssertionResult VerifyHasPermissionMessage(
const PermissionsData* permissions_data,
- const base::string16& expected_message) {
+ const std::u16string& expected_message) {
return VerifyHasPermissionMessageImpl(
expected_message, {}, permissions_data->GetPermissionMessages());
}
@@ -180,7 +180,7 @@
testing::AssertionResult VerifyNoPermissionMessages(
const PermissionsData* permissions_data) {
return VerifyPermissionMessages(permissions_data,
- std::vector<base::string16>(), true);
+ std::vector<std::u16string>(), true);
}
testing::AssertionResult VerifyOnePermissionMessage(
@@ -192,16 +192,16 @@
testing::AssertionResult VerifyOnePermissionMessage(
const PermissionsData* permissions_data,
- const base::string16& expected_message) {
+ const std::u16string& expected_message) {
return VerifyPermissionMessages(permissions_data, {expected_message}, true);
}
testing::AssertionResult VerifyOnePermissionMessage(
const PermissionSet& permissions,
Manifest::Type extension_type,
- const base::string16& expected_message) {
+ const std::u16string& expected_message) {
return VerifyPermissionMessagesWithSubmessagesImpl(
- {expected_message}, std::vector<std::vector<base::string16>>(1),
+ {expected_message}, std::vector<std::vector<std::u16string>>(1),
GetMessages(permissions, extension_type), true);
}
@@ -234,11 +234,11 @@
testing::AssertionResult VerifyPermissionMessages(
const PermissionsData* permissions_data,
- const std::vector<base::string16>& expected_messages,
+ const std::vector<std::u16string>& expected_messages,
bool check_order) {
return VerifyPermissionMessagesWithSubmessages(
permissions_data, expected_messages,
- std::vector<std::vector<base::string16>>(expected_messages.size()),
+ std::vector<std::vector<std::u16string>>(expected_messages.size()),
check_order);
}
@@ -254,8 +254,8 @@
testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
const PermissionsData* permissions_data,
- const std::vector<base::string16>& expected_messages,
- const std::vector<std::vector<base::string16>>& expected_submessages,
+ const std::vector<std::u16string>& expected_messages,
+ const std::vector<std::vector<std::u16string>>& expected_submessages,
bool check_order) {
CHECK_EQ(expected_messages.size(), expected_submessages.size());
return VerifyPermissionMessagesWithSubmessagesImpl(
diff --git a/extensions/common/permissions/permission_message_test_util.h b/extensions/common/permissions/permission_message_test_util.h
index 63859773..53adc13 100644
--- a/extensions/common/permissions/permission_message_test_util.h
+++ b/extensions/common/permissions/permission_message_test_util.h
@@ -19,7 +19,7 @@
testing::AssertionResult VerifyHasPermissionMessage(
const PermissionsData* permissions_data,
- const base::string16& expected_message);
+ const std::u16string& expected_message);
testing::AssertionResult VerifyHasPermissionMessage(
const PermissionSet& permissions,
Manifest::Type extension_type,
@@ -33,11 +33,11 @@
const std::string& expected_message);
testing::AssertionResult VerifyOnePermissionMessage(
const PermissionsData* permissions_data,
- const base::string16& expected_message);
+ const std::u16string& expected_message);
testing::AssertionResult VerifyOnePermissionMessage(
const PermissionSet& permissions,
Manifest::Type extension_type,
- const base::string16& expected_message);
+ const std::u16string& expected_message);
testing::AssertionResult VerifyOnePermissionMessageWithSubmessages(
const PermissionsData* permissions_data,
@@ -56,7 +56,7 @@
bool check_order);
testing::AssertionResult VerifyPermissionMessages(
const PermissionsData* permissions_data,
- const std::vector<base::string16>& expected_messages,
+ const std::vector<std::u16string>& expected_messages,
bool check_order);
testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
@@ -66,8 +66,8 @@
bool check_order);
testing::AssertionResult VerifyPermissionMessagesWithSubmessages(
const PermissionsData* permissions_data,
- const std::vector<base::string16>& expected_messages,
- const std::vector<std::vector<base::string16>>& expected_submessages,
+ const std::vector<std::u16string>& expected_messages,
+ const std::vector<std::vector<std::u16string>>& expected_submessages,
bool check_order);
} // namespace extensions
diff --git a/extensions/common/permissions/usb_device_permission.cc b/extensions/common/permissions/usb_device_permission.cc
index dd36af81..73d44d6 100644
--- a/extensions/common/permissions/usb_device_permission.cc
+++ b/extensions/common/permissions/usb_device_permission.cc
@@ -150,7 +150,7 @@
const char* product =
device::UsbIds::GetProductName(data.vendor_id(), data.product_id());
if (product) {
- base::string16 product_name_and_vendor = l10n_util::GetStringFUTF16(
+ std::u16string product_name_and_vendor = l10n_util::GetStringFUTF16(
IDS_EXTENSION_USB_DEVICE_PRODUCT_NAME_AND_VENDOR,
base::UTF8ToUTF16(product), base::UTF8ToUTF16(vendor));
ids.insert(APIPermission::kUsbDevice, product_name_and_vendor);
diff --git a/extensions/common/stack_frame.cc b/extensions/common/stack_frame.cc
index 497edac..364882b 100644
--- a/extensions/common/stack_frame.cc
+++ b/extensions/common/stack_frame.cc
@@ -27,8 +27,8 @@
StackFrame::StackFrame(uint32_t line_number,
uint32_t column_number,
- const base::string16& source,
- const base::string16& function)
+ const std::u16string& source,
+ const std::u16string& function)
: line_number(line_number),
column_number(column_number),
source(source),
@@ -46,7 +46,7 @@
// both ways. If we reconcile this, we can clean this up.)
// static
std::unique_ptr<StackFrame> StackFrame::CreateFromText(
- const base::string16& frame_text) {
+ const std::u16string& frame_text) {
// We need to use utf8 for re2 matching.
std::string text = base::UTF16ToUTF8(frame_text);
diff --git a/extensions/common/stack_frame.h b/extensions/common/stack_frame.h
index 48efcd1..e501629 100644
--- a/extensions/common/stack_frame.h
+++ b/extensions/common/stack_frame.h
@@ -20,13 +20,13 @@
StackFrame(const StackFrame& frame);
StackFrame(uint32_t line_number,
uint32_t column_number,
- const base::string16& source,
- const base::string16& function);
+ const std::u16string& source,
+ const std::u16string& function);
~StackFrame();
// Construct a stack frame from a reported plain-text frame.
static std::unique_ptr<StackFrame> CreateFromText(
- const base::string16& frame_text);
+ const std::u16string& frame_text);
bool operator==(const StackFrame& rhs) const;
@@ -35,8 +35,8 @@
// and column numbers shouldn't exceed UINT32_MAX even on 64 bit builds.
uint32_t line_number;
uint32_t column_number;
- base::string16 source;
- base::string16 function; // optional
+ std::u16string source;
+ std::u16string function; // optional
};
typedef std::vector<StackFrame> StackTrace;
diff --git a/extensions/common/stack_frame_unittest.cc b/extensions/common/stack_frame_unittest.cc
index 234f5a9..c03684a8 100644
--- a/extensions/common/stack_frame_unittest.cc
+++ b/extensions/common/stack_frame_unittest.cc
@@ -24,7 +24,7 @@
size_t column,
const std::string& source,
const std::string& function) {
- base::string16 utf16_text = base::UTF8ToUTF16(text);
+ std::u16string utf16_text = base::UTF8ToUTF16(text);
std::unique_ptr<StackFrame> frame = StackFrame::CreateFromText(utf16_text);
ASSERT_TRUE(frame.get()) << "Failed to create frame from '" << text << "'";
@@ -35,7 +35,7 @@
}
void AssertStackFrameInvalid(const std::string& text) {
- base::string16 utf16_text = base::UTF8ToUTF16(text);
+ std::u16string utf16_text = base::UTF8ToUTF16(text);
std::unique_ptr<StackFrame> frame = StackFrame::CreateFromText(utf16_text);
ASSERT_FALSE(frame.get()) << "Errantly created frame from '" << text << "'";
}
diff --git a/extensions/components/native_app_window/native_app_window_views.cc b/extensions/components/native_app_window/native_app_window_views.cc
index 30bc290..12042bd 100644
--- a/extensions/components/native_app_window/native_app_window_views.cc
+++ b/extensions/components/native_app_window/native_app_window_views.cc
@@ -188,7 +188,7 @@
return web_view_;
}
-base::string16 NativeAppWindowViews::GetWindowTitle() const {
+std::u16string NativeAppWindowViews::GetWindowTitle() const {
return app_window_->GetTitle();
}
diff --git a/extensions/components/native_app_window/native_app_window_views.h b/extensions/components/native_app_window/native_app_window_views.h
index 9d580f24..a244963 100644
--- a/extensions/components/native_app_window/native_app_window_views.h
+++ b/extensions/components/native_app_window/native_app_window_views.h
@@ -91,7 +91,7 @@
// WidgetDelegate:
void OnWidgetMove() override;
views::View* GetInitiallyFocusedView() override;
- base::string16 GetWindowTitle() const override;
+ std::u16string GetWindowTitle() const override;
bool ShouldShowWindowTitle() const override;
void SaveWindowPlacement(const gfx::Rect& bounds,
ui::WindowShowState show_state) override;
diff --git a/extensions/renderer/api/automation/automation_api_helper.cc b/extensions/renderer/api/automation/automation_api_helper.cc
index 549ef5bad..fa03144 100644
--- a/extensions/renderer/api/automation/automation_api_helper.cc
+++ b/extensions/renderer/api/automation/automation_api_helper.cc
@@ -37,7 +37,7 @@
void AutomationApiHelper::OnQuerySelector(int request_id,
int acc_obj_id,
- const base::string16& selector) {
+ const std::u16string& selector) {
// ExtensionMsg_AutomationQuerySelector should only be sent to an active view.
DCHECK(render_frame()->IsMainFrame());
diff --git a/extensions/renderer/api/automation/automation_api_helper.h b/extensions/renderer/api/automation/automation_api_helper.h
index b16dda6..840f615 100644
--- a/extensions/renderer/api/automation/automation_api_helper.h
+++ b/extensions/renderer/api/automation/automation_api_helper.h
@@ -27,7 +27,7 @@
void OnQuerySelector(int acc_obj_id,
int request_id,
- const base::string16& selector);
+ const std::u16string& selector);
DISALLOW_COPY_AND_ASSIGN(AutomationApiHelper);
};
diff --git a/extensions/renderer/api/automation/automation_internal_custom_bindings.cc b/extensions/renderer/api/automation/automation_internal_custom_bindings.cc
index 1e31e82..4b8a7ca 100644
--- a/extensions/renderer/api/automation/automation_internal_custom_bindings.cc
+++ b/extensions/renderer/api/automation/automation_internal_custom_bindings.cc
@@ -1555,7 +1555,7 @@
[this](v8::Isolate* isolate, v8::ReturnValue<v8::Value> result,
AutomationAXTreeWrapper* tree_wrapper, ui::AXNode* node,
const std::string& search_str, bool backward) {
- base::string16 search_str_16 = base::UTF8ToUTF16(search_str);
+ std::u16string search_str_16 = base::UTF8ToUTF16(search_str);
auto next =
backward ? &AutomationInternalCustomBindings::GetPreviousInTreeOrder
: &AutomationInternalCustomBindings::GetNextInTreeOrder;
@@ -1570,7 +1570,7 @@
if (!node)
return;
- base::string16 name;
+ std::u16string name;
if (!node->GetString16Attribute(ax::mojom::StringAttribute::kName,
&name))
continue;
@@ -2712,7 +2712,7 @@
// Create an empty vector for storing final results and deal with the node
// without a name.
std::vector<int> sentence_boundary;
- base::string16 node_name =
+ std::u16string node_name =
node->GetString16Attribute(ax::mojom::StringAttribute::kName);
if (node_name.empty()) {
return sentence_boundary;
@@ -2723,8 +2723,8 @@
// is the string from the beginning of the paragraph to the head of current
// node. The |post_str| is the string from the head of current node to the end
// of the paragraph.
- base::string16 pre_str;
- base::string16 post_str;
+ std::u16string pre_str;
+ std::u16string post_str;
ui::AXNodePosition::AXPositionInstance head_pos =
ui::AXNodePosition::CreatePosition(*node,
0 /* child_index_or_text_offset */,
@@ -2753,7 +2753,7 @@
post_str = post_range.GetText();
// Calculate the boundary of the |combined_str|.
- base::string16 combined_str = pre_str + post_str;
+ std::u16string combined_str = pre_str + post_str;
auto boundary_func = start_boundary ? &ui::GetSentenceStartOffsets
: &ui::GetSentenceEndOffsets;
std::vector<int> combined_sentence_boundary = boundary_func(combined_str);
diff --git a/extensions/renderer/api/automation/automation_position.cc b/extensions/renderer/api/automation/automation_position.cc
index 8399625..4385095 100644
--- a/extensions/renderer/api/automation/automation_position.cc
+++ b/extensions/renderer/api/automation/automation_position.cc
@@ -415,7 +415,7 @@
return position_->IsValid();
}
-base::string16 AutomationPosition::GetText(gin::Arguments* arguments) {
+std::u16string AutomationPosition::GetText(gin::Arguments* arguments) {
return position_->GetText();
}
diff --git a/extensions/renderer/api/automation/automation_position.h b/extensions/renderer/api/automation/automation_position.h
index 972e0f3..c55e822c 100644
--- a/extensions/renderer/api/automation/automation_position.h
+++ b/extensions/renderer/api/automation/automation_position.h
@@ -94,7 +94,7 @@
bool IsInTextObject(gin::Arguments* arguments);
bool IsInWhiteSpace(gin::Arguments* arguments);
bool IsValid(gin::Arguments* arguments);
- base::string16 GetText(gin::Arguments* arguments);
+ std::u16string GetText(gin::Arguments* arguments);
ui::AXNodePosition::AXPositionInstance position_;
diff --git a/extensions/renderer/dom_activity_logger.cc b/extensions/renderer/dom_activity_logger.cc
index b07660f..f6c1600f 100644
--- a/extensions/renderer/dom_activity_logger.cc
+++ b/extensions/renderer/dom_activity_logger.cc
@@ -117,7 +117,7 @@
void DOMActivityLogger::SendDomActionMessage(
const std::string& api_call,
const GURL& url,
- const base::string16& url_title,
+ const std::u16string& url_title,
DomActionType::Type call_type,
std::unique_ptr<base::ListValue> args) {
ExtensionHostMsg_DOMAction_Params params;
diff --git a/extensions/renderer/dom_activity_logger.h b/extensions/renderer/dom_activity_logger.h
index 8ba8042..3d036c8b 100644
--- a/extensions/renderer/dom_activity_logger.h
+++ b/extensions/renderer/dom_activity_logger.h
@@ -70,7 +70,7 @@
// Helper function to actually send the message across IPC.
void SendDomActionMessage(const std::string& api_call,
const GURL& url,
- const base::string16& url_title,
+ const std::u16string& url_title,
DomActionType::Type call_type,
std::unique_ptr<base::ListValue> args);
diff --git a/extensions/renderer/extensions_render_frame_observer.cc b/extensions/renderer/extensions_render_frame_observer.cc
index 9f99fe3..d9be1c3 100644
--- a/extensions/renderer/extensions_render_frame_observer.cc
+++ b/extensions/renderer/extensions_render_frame_observer.cc
@@ -38,16 +38,16 @@
// the given line number and source.
// |message| will be populated with the error message only (i.e., will not
// include any stack trace).
-StackTrace GetStackTraceFromMessage(base::string16* message,
- const base::string16& source,
- const base::string16& stack_trace,
+StackTrace GetStackTraceFromMessage(std::u16string* message,
+ const std::u16string& source,
+ const std::u16string& stack_trace,
int32_t line_number) {
StackTrace result;
- std::vector<base::string16> pieces;
+ std::vector<std::u16string> pieces;
size_t index = 0;
if (message->find(base::UTF8ToUTF16(kStackFrameDelimiter)) !=
- base::string16::npos) {
+ std::u16string::npos) {
pieces = base::SplitStringUsingSubstr(
*message, base::UTF8ToUTF16(kStackFrameDelimiter),
base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
@@ -70,11 +70,10 @@
}
if (result.empty()) { // If we don't have a stack trace, mock one up.
- result.push_back(
- StackFrame(line_number,
- 1u, // column number
- source,
- base::string16() /* no function name */ ));
+ result.push_back(StackFrame(line_number,
+ 1u, // column number
+ source,
+ std::u16string() /* no function name */));
}
return result;
@@ -115,9 +114,9 @@
}
void ExtensionsRenderFrameObserver::DetailedConsoleMessageAdded(
- const base::string16& message,
- const base::string16& source,
- const base::string16& stack_trace_string,
+ const std::u16string& message,
+ const std::u16string& source,
+ const std::u16string& stack_trace_string,
uint32_t line_number,
int32_t severity_level) {
if (severity_level <
@@ -126,7 +125,7 @@
return;
}
- base::string16 trimmed_message = message;
+ std::u16string trimmed_message = message;
StackTrace stack_trace = GetStackTraceFromMessage(
&trimmed_message,
source,
diff --git a/extensions/renderer/extensions_render_frame_observer.h b/extensions/renderer/extensions_render_frame_observer.h
index 2f472948..54f1d8c 100644
--- a/extensions/renderer/extensions_render_frame_observer.h
+++ b/extensions/renderer/extensions_render_frame_observer.h
@@ -35,9 +35,9 @@
void SetVisuallyDeemphasized(bool deemphasized) override;
// RenderFrameObserver implementation.
- void DetailedConsoleMessageAdded(const base::string16& message,
- const base::string16& source,
- const base::string16& stack_trace,
+ void DetailedConsoleMessageAdded(const std::u16string& message,
+ const std::u16string& source,
+ const std::u16string& stack_trace,
uint32_t line_number,
int32_t severity_level) override;
void OnDestruct() override;
diff --git a/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
index cd80c89..4f3ea6b 100644
--- a/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
+++ b/extensions/shell/browser/api/file_system/shell_file_system_delegate.cc
@@ -39,7 +39,7 @@
void ShellFileSystemDelegate::ConfirmSensitiveDirectoryAccess(
bool has_write_permission,
- const base::string16& app_name,
+ const std::u16string& app_name,
content::WebContents* web_contents,
base::OnceClosure on_accept,
base::OnceClosure on_cancel) {
diff --git a/extensions/shell/browser/api/file_system/shell_file_system_delegate.h b/extensions/shell/browser/api/file_system/shell_file_system_delegate.h
index b6e21c7f..944c8232 100644
--- a/extensions/shell/browser/api/file_system/shell_file_system_delegate.h
+++ b/extensions/shell/browser/api/file_system/shell_file_system_delegate.h
@@ -24,7 +24,7 @@
FileSystemDelegate::FilesSelectedCallback files_selected_callback,
base::OnceClosure file_selection_canceled_callback) override;
void ConfirmSensitiveDirectoryAccess(bool has_write_permission,
- const base::string16& app_name,
+ const std::u16string& app_name,
content::WebContents* web_contents,
base::OnceClosure on_accept,
base::OnceClosure on_cancel) override;
diff --git a/extensions/shell/browser/shell_virtual_keyboard_delegate.cc b/extensions/shell/browser/shell_virtual_keyboard_delegate.cc
index a892f0f..6051ea5 100644
--- a/extensions/shell/browser/shell_virtual_keyboard_delegate.cc
+++ b/extensions/shell/browser/shell_virtual_keyboard_delegate.cc
@@ -29,7 +29,7 @@
return false;
}
-bool ShellVirtualKeyboardDelegate::InsertText(const base::string16& text) {
+bool ShellVirtualKeyboardDelegate::InsertText(const std::u16string& text) {
return false;
}
diff --git a/extensions/shell/browser/shell_virtual_keyboard_delegate.h b/extensions/shell/browser/shell_virtual_keyboard_delegate.h
index 7e78f498..fc8d18f 100644
--- a/extensions/shell/browser/shell_virtual_keyboard_delegate.h
+++ b/extensions/shell/browser/shell_virtual_keyboard_delegate.h
@@ -24,7 +24,7 @@
OnKeyboardSettingsCallback on_settings_callback) override;
void OnKeyboardConfigChanged() override;
bool HideKeyboard() override;
- bool InsertText(const base::string16& text) override;
+ bool InsertText(const std::u16string& text) override;
bool OnKeyboardLoaded() override;
void SetHotrodKeyboard(bool enable) override;
bool LockKeyboard(bool state) override;
diff --git a/extensions/shell/common/shell_content_client.cc b/extensions/shell/common/shell_content_client.cc
index b61f09f..422734cf 100644
--- a/extensions/shell/common/shell_content_client.cc
+++ b/extensions/shell/common/shell_content_client.cc
@@ -82,7 +82,7 @@
schemes->csp_bypassing_schemes.push_back(kExtensionScheme);
}
-base::string16 ShellContentClient::GetLocalizedString(int message_id) {
+std::u16string ShellContentClient::GetLocalizedString(int message_id) {
return l10n_util::GetStringUTF16(message_id);
}
diff --git a/extensions/shell/common/shell_content_client.h b/extensions/shell/common/shell_content_client.h
index 5edc1b26..06db44e 100644
--- a/extensions/shell/common/shell_content_client.h
+++ b/extensions/shell/common/shell_content_client.h
@@ -20,7 +20,7 @@
void AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) override;
void AddAdditionalSchemes(Schemes* schemes) override;
- base::string16 GetLocalizedString(int message_id) override;
+ std::u16string GetLocalizedString(int message_id) override;
base::StringPiece GetDataResource(int resource_id,
ui::ScaleFactor scale_factor) override;
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;