[LSC] Replace base::string16 with std::u16string in //{chrome*,content}
This change replaces base::string16 with std::u16string in //chrome, //chromecast, //chromeos and //content. Reproduction steps: $ git grep -lw 'base::string16' chrome* content | \ xargs sed -i 's/\bbase::string16\b/std::u16string/g' $ git cl format Bug: 1184339 Change-Id: I8fae0ab25b5d9bf1cb416ae5f47d7f680fb8f3ea Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2752229 Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Owners-Override: Daniel Cheng <dcheng@chromium.org> Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#862152}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
64505a98c8
commit
aace0cfef2
chrome
app
resources
app_shim
common
chrome_content_client.ccchrome_content_client.hchrome_manifest_url_handlers.ccchrome_manifest_url_handlers.hcommand.cccommand.hcommand_unittest.ccextension_unittest.cc
custom_handlers
extensions
api
commands
extension_action
file_browser_handlers
file_system_provider_capabilities
input_ime
omnibox
speech
storage
system_indicator
url_handlers
manifest_handlers
app_display_mode_info.ccapp_display_mode_info.happ_icon_color_info.ccapp_icon_color_info.happ_launch_info.ccapp_launch_info.happ_theme_color_info.ccapp_theme_color_info.hlinked_app_icons.cclinked_app_icons.hminimum_chrome_version_checker.ccminimum_chrome_version_checker.hnatively_connectable_handler.ccnatively_connectable_handler.hsettings_overrides_handler.ccsettings_overrides_handler.htheme_handler.cctheme_handler.h
manifest_tests
permissions
importer
firefox_importer_utils.ccfirefox_importer_utils.hfirefox_importer_utils_unittest.ccimported_bookmark_entry.himporter_autofill_form_data_entry.himporter_bridge.himporter_data_types.himporter_url_row.hmock_importer_bridge.hprofile_import_process_param_traits.h
media
net
search
service_process_util_win.cctime_format_browsertest.cccredential_provider
elevation_service
renderer
autofill
autofill_renderer_browsertest.ccfake_mojo_password_manager_driver.ccfake_mojo_password_manager_driver.hfake_password_generation_driver.hform_autocomplete_browsertest.ccform_autofill_browsertest.ccpassword_autofill_agent_browsertest.ccpassword_generation_agent_browsertest.ccpassword_generation_test_utils.ccpassword_generation_test_utils.h
cart
chrome_content_renderer_client.ccchrome_content_renderer_client.hchrome_render_frame_observer.ccchrome_render_frame_observer.hchrome_render_frame_observer_browsertest.ccnet
plugins
safe_browsing
searchbox
service
services
mac_notifications
public
util_win
test
base
browser_with_test_window_test.ccbrowser_with_test_window_test.hextension_js_browser_test.ccin_process_browser_test.ccjavascript_browser_test.ccjavascript_browser_test.htest_browser_window.htesting_profile_manager.cctesting_profile_manager.hui_test_utils.ccui_test_utils.hweb_ui_browser_test.cc
chromedriver
key_converter.cckey_converter.hkey_converter_unittest.cckeycode_text_conversion_mac.mmkeycode_text_conversion_ozone.cckeycode_text_conversion_x.cc
server
util.ccorigin_policy
ppapi
third_party
mozilla_security_manager
tools
updater
utility
importer
bookmark_html_reader.ccbookmark_html_reader.hbookmark_html_reader_unittest.ccbookmarks_file_importer.ccedge_database_reader_unittest_win.ccedge_database_reader_win.ccedge_importer_win.ccexternal_process_importer_bridge.ccexternal_process_importer_bridge.hfirefox_importer.ccie_importer_win.ccie_importer_win.hnss_decryptor.ccnss_decryptor_system_nss.hnss_decryptor_win.hsafari_importer.hsafari_importer.mmsafari_importer_unittest.mm
safe_browsing
chromecast
bindings
browser
bluetooth
cast_extension_host.cccast_extension_host.hcast_web_contents.hcast_web_contents_browsertest.cccast_web_contents_impl.cccast_web_contents_impl.hcast_web_view_default.cccast_web_view_default.hservice_manager_context.cctest
common
cast_content_client.cccast_content_client.hcast_redirect_manifest_handler.cccast_redirect_manifest_handler.hcast_resource_delegate.cccast_resource_delegate.h
ui
chromeos
components
diagnostics_ui
backend
local_search_service
content_extraction_utils.cccontent_extraction_utils.hcontent_extraction_utils_unittest.ccinverted_index.ccinverted_index.hinverted_index_search.ccinverted_index_search.hinverted_index_unittest.cclinear_map_search.cclinear_map_search.h
public
search_utils.ccsearch_utils.hshared_structs.ccshared_structs.hphonehub
browser_tabs_model.ccbrowser_tabs_model.hfake_message_sender.ccfake_message_sender.hfake_notification_manager.ccfake_notification_manager.hmessage_sender.hmessage_sender_impl.ccmessage_sender_impl.hmessage_sender_unittest.ccmutable_phone_model.ccmutable_phone_model.hmutable_phone_model_unittest.ccnotification.ccnotification.hnotification_manager.hnotification_manager_impl.ccnotification_manager_impl.hnotification_manager_impl_unittest.ccnotification_processor.ccphone_model.hphone_status_model.hphone_status_model_unittest.cctether_controller_impl_unittest.cc
proximity_auth
quick_answers
scanning
security_token_pin
string_matching
fuzzy_tokenized_string_match.ccfuzzy_tokenized_string_match.hfuzzy_tokenized_string_match_unittest.ccsequence_matcher.ccsequence_matcher.hterm_break_iterator.ccterm_break_iterator.hterm_break_iterator_unittest.cctokenized_string.cctokenized_string.htokenized_string_char_iterator_unittest.cctokenized_string_fuzzer.cctokenized_string_match.cctokenized_string_match.htokenized_string_match_unittest.cctokenized_string_unittest.cc
network
policy
weekly_time
services
cellular_setup
device_sync
proto
ime
public
cpp
rulebased
settings
ui
content
app_shim_remote_cocoa
render_widget_host_ns_view_bridge.hrender_widget_host_ns_view_bridge.mmrender_widget_host_view_cocoa.hrender_widget_host_view_cocoa.mmweb_drag_source_mac.mm
browser
accessibility
accessibility_auralinux_browsertest.ccaccessibility_browsertest.ccaccessibility_browsertest.haccessibility_event_recorder_win.ccaccessibility_tree_formatter_uia_win.ccaccessibility_tree_formatter_uia_win.haccessibility_tree_formatter_utils_mac.haccessibility_tree_formatter_win.ccaccessibility_win_browsertest.ccandroid_granularity_movement_browsertest.ccbrowser_accessibility.ccbrowser_accessibility.hbrowser_accessibility_android.ccbrowser_accessibility_android.hbrowser_accessibility_android_unittest.ccbrowser_accessibility_auralinux.ccbrowser_accessibility_auralinux.hbrowser_accessibility_auralinux_unittest.ccbrowser_accessibility_cocoa.hbrowser_accessibility_cocoa.mmbrowser_accessibility_com_win.ccbrowser_accessibility_com_win.hbrowser_accessibility_manager.ccbrowser_accessibility_manager.hbrowser_accessibility_manager_android.ccbrowser_accessibility_manager_mac.hbrowser_accessibility_manager_mac.mmbrowser_accessibility_win.ccbrowser_accessibility_win.hbrowser_accessibility_win_unittest.cccross_platform_accessibility_browsertest.ccone_shot_accessibility_tree_search.ccweb_contents_accessibility_android.ccweb_contents_accessibility_android.h
android
app_web_message_port.ccdate_time_chooser_android.ccime_adapter_android.ccime_adapter_android.h
selection
appcache
back_forward_cache_browsertest.ccbluetooth
bluetooth_device_scanning_prompt_controller.ccbluetooth_device_scanning_prompt_controller.hweb_bluetooth_service_impl.cc
browser_child_process_host_impl.ccbrowser_child_process_host_impl.hbrowsing_data
cache_storage
contacts
conversions
devtools
download
download_browsertest.ccdrag_download_util.ccdrag_download_util.hsave_package.ccsave_package.hsave_package_browsertest.cc
file_system
file_system_access
file_system_access_directory_handle_impl.ccfile_system_chooser.ccfile_system_chooser_test_helpers.cc
find_request_manager.ccfind_request_manager.hindexed_db
database_impl.ccdatabase_impl.hfake_indexed_db_metadata_coding.ccfake_indexed_db_metadata_coding.hindexed_db_backing_store.ccindexed_db_backing_store.hindexed_db_backing_store_unittest.ccindexed_db_browsertest.ccindexed_db_class_factory.ccindexed_db_class_factory.hindexed_db_connection_coordinator.ccindexed_db_context_impl.ccindexed_db_context_impl.hindexed_db_database.ccindexed_db_database.hindexed_db_database_error.ccindexed_db_database_error.hindexed_db_dispatcher_host.ccindexed_db_dispatcher_host.hindexed_db_dispatcher_host_unittest.ccindexed_db_external_object.ccindexed_db_external_object.hindexed_db_factory.hindexed_db_factory_impl.ccindexed_db_factory_impl.hindexed_db_factory_unittest.ccindexed_db_fake_backing_store.ccindexed_db_fake_backing_store.hindexed_db_index_writer.ccindexed_db_index_writer.hindexed_db_leveldb_coding.ccindexed_db_leveldb_coding.hindexed_db_leveldb_coding_encodeidbkey_fuzzer.ccindexed_db_leveldb_coding_encodeidbkeypath_fuzzer.ccindexed_db_leveldb_coding_unittest.ccindexed_db_leveldb_operations.ccindexed_db_leveldb_operations.hindexed_db_metadata_coding.ccindexed_db_metadata_coding.hindexed_db_origin_state.ccindexed_db_origin_state.hindexed_db_pre_close_task_queue_unittest.ccmock_browsertest_indexed_db_class_factory.ccmock_browsertest_indexed_db_class_factory.hmock_indexed_db_factory.hmock_mojo_indexed_db_callbacks.hmock_mojo_indexed_db_database_callbacks.htransaction_impl.cctransaction_impl.h
loader
cors_file_origin_browsertest.cccors_origin_pattern_setter_browsertest.cccors_preflight_cache_browsertest.cccross_site_document_blocking_browsertest.ccfile_url_loader_factory.ccloader_browsertest.ccprefetch_browsertest_base.ccquic_transport_browsertest.cc
log_console_message.cclog_console_message.hmanifest
media
android
media_browsertest.ccmedia_internals.ccmedia_internals.hmedia_internals_handler.ccmedia_internals_handler.hmedia_internals_proxy.ccmedia_internals_proxy.hmedia_internals_unittest.ccmedia_suspend_browsertest.ccmidi_browsertest.ccsession
media_session_impl.ccmedia_session_impl_browsertest.ccmedia_session_impl_service_routing_unittest.cc
system_media_controls_notifier_unittest.ccnet
notifications
devtools_event_logging.ccdevtools_event_logging.hnotification_event_dispatcher_impl.ccnotification_event_dispatcher_impl.h
picture_in_picture
plugin_list_unittest.ccplugin_service_impl.ccplugin_service_impl.hppapi_plugin_process_host.ccppapi_plugin_process_host.hprocess_internals
renderer_host
clipboard_host_impl.ccclipboard_host_impl.hclipboard_host_impl_mac.mmcursor_manager.cccursor_manager.hdata_transfer_util.ccdwrite_font_file_util_win.ccdwrite_font_file_util_win.hdwrite_font_lookup_table_builder_win.ccdwrite_font_proxy_impl_win.ccdwrite_font_proxy_impl_win.hdwrite_font_proxy_impl_win_unittest.ccframe_navigation_entry.cc
sandbox_support_mac_impl.hsandbox_support_mac_impl.mmsecurity_exploit_browsertest.ccservice_process_host_impl.ccinput
autoscroll_browsertest.cccomposited_scrolling_browsertest.cccompositor_event_ack_browsertest.ccfling_browsertest.ccinput_event_browsertest.ccinteraction_mq_dynamic_browsertest.ccmain_thread_event_queue_browsertest.ccscroll_behavior_browsertest.ccsynthetic_input_browsertest.cctouch_action_browsertest.cctouch_selection_controller_client_aura.cctouch_selection_controller_client_aura.htouch_selection_controller_client_child_frame.cctouch_selection_controller_client_child_frame.hwheel_event_listener_browsertest.cc
legacy_render_widget_host_win.ccmodal_close_listener_host_browsertest.ccnavigation_controller_android.ccnavigation_controller_impl.ccnavigation_controller_impl_browsertest.ccnavigation_controller_impl_unittest.ccnavigation_entry_impl.ccnavigation_entry_impl.hnavigation_entry_impl_unittest.ccraw_clipboard_host_impl.ccraw_clipboard_host_impl.hrender_frame_host_delegate.ccrender_frame_host_delegate.hrender_frame_host_impl.ccrender_frame_host_impl.hrender_frame_host_impl_browsertest.ccrender_frame_host_manager_browsertest.ccrender_frame_host_manager_unittest.ccrender_frame_proxy_host.ccrender_frame_proxy_host.hrender_process_host_browsertest.ccrender_view_host_impl.ccrender_view_host_unittest.ccrender_widget_host_browsertest.ccrender_widget_host_delegate.hrender_widget_host_impl.ccrender_widget_host_impl.hrender_widget_host_unittest.ccrender_widget_host_view_android.ccrender_widget_host_view_android.hrender_widget_host_view_aura.ccrender_widget_host_view_aura.hrender_widget_host_view_aura_unittest.ccrender_widget_host_view_base.ccrender_widget_host_view_base.hrender_widget_host_view_child_frame.ccrender_widget_host_view_child_frame.hrender_widget_host_view_mac.hrender_widget_host_view_mac.mmrender_widget_host_view_mac_browsertest.mmrender_widget_host_view_mac_editcommand_helper_unittest.mmrender_widget_host_view_mac_unittest.mmtext_input_manager.cctext_input_manager.hservice_worker
embedded_worker_instance.ccembedded_worker_instance.hfake_service_worker.ccfake_service_worker.hservice_worker_browsertest.ccservice_worker_clients_api_browsertest.ccservice_worker_context_core.ccservice_worker_context_core.hservice_worker_context_watcher_unittest.ccservice_worker_version.ccservice_worker_version.hservice_worker_version_browsertest.cc
session_history_browsertest.ccsite_instance_impl_unittest.ccsite_per_process_browsertest.ccsite_per_process_hit_test_browsertest.ccsite_per_process_unload_browsertest.ccsnapshot_browsertest.ccspeech
utility_process_host.ccutility_process_host.hweb_contents
web_contents_android.ccweb_contents_impl.ccweb_contents_impl.hweb_contents_impl_browsertest.ccweb_contents_impl_unittest.ccweb_contents_view.hweb_contents_view_android.ccweb_contents_view_android.hweb_contents_view_aura.ccweb_contents_view_aura.hweb_contents_view_aura_browsertest.ccweb_contents_view_aura_unittest.ccweb_contents_view_child_frame.ccweb_contents_view_child_frame.hweb_contents_view_mac.hweb_contents_view_mac.mmweb_drag_dest_mac_unittest.mm
web_database
web_package
link_web_bundle_browsertest.ccsigned_exchange_request_handler_browsertest.ccweb_bundle_browsertest.cc
webauth
webrtc
webui
web_ui_data_source_impl.ccweb_ui_data_source_impl.hweb_ui_data_source_unittest.ccweb_ui_impl.ccweb_ui_impl.hweb_ui_main_frame_observer.ccweb_ui_main_frame_observer.hweb_ui_main_frame_observer_unittest.ccweb_ui_message_handler.ccweb_ui_message_handler_unittest.cc
worker_host
child
blink_platform_impl.ccbrowser_font_resource_trusted.ccchild_process_sandbox_support_impl_mac.cc
dwrite_font_proxy
common
mac
public
browser
authenticator_request_client_delegate.ccauthenticator_request_client_delegate.hbluetooth_chooser.hbluetooth_scanning_prompt.hbrowser_child_process_host.hchild_process_data.hconsole_message.hjavascript_dialog_manager.ccjavascript_dialog_manager.hmessage_port_provider.hnavigation_entry.hnotification_event_dispatcher.hplugin_service.hrender_frame_host.hrender_widget_host.hrender_widget_host_view.hservice_process_host.ccservice_process_host.hservice_worker_context_observer.hweb_contents.hweb_contents_delegate.ccweb_contents_delegate.hweb_contents_observer.hweb_ui.hweb_ui_data_source.hweb_ui_message_handler.h
common
renderer
content_renderer_client.cccontent_renderer_client.hpepper_plugin_instance.hrender_frame.hrender_frame_observer.h
test
android
browser_test_utils.ccbrowser_test_utils.hfake_local_frame.ccfake_local_frame.hfake_pepper_plugin_instance.ccfake_pepper_plugin_instance.hfake_render_widget_host.ccfake_render_widget_host.hmock_render_process_host.ccmock_render_process_host.hrender_view_test.ccrender_view_test.htest_web_ui.cctest_web_ui.htext_input_test_utils.cctext_input_test_utils.htext_input_test_utils_mac.mmweb_contents_tester.hrenderer
accessibility
pepper
event_conversion.ccpepper_file_chooser_host_unittest.ccpepper_plugin_instance_impl.ccpepper_plugin_instance_impl.h
render_frame_impl.ccrender_frame_impl.hrender_frame_impl_browsertest.ccrender_view_browsertest.ccwebclipboard_impl_browsertest.ccshell
browser
shell.ccshell.hshell_content_browser_client.ccshell_javascript_dialog.hshell_javascript_dialog_mac.mmshell_javascript_dialog_manager.ccshell_javascript_dialog_manager.hshell_javascript_dialog_win.ccshell_platform_delegate.hshell_platform_delegate_android.ccshell_platform_delegate_aura.ccshell_platform_delegate_mac.mmshell_platform_delegate_views.cc
common
test
content_browser_test_test.cccontent_browser_test_utils_internal.cccontent_browser_test_utils_internal.hdwrite_font_fake_sender_win.ccdwrite_font_fake_sender_win.hfake_plugin_service.ccfake_plugin_service.hmock_clipboard_host.ccmock_clipboard_host.hmock_keyboard.ccmock_keyboard.hmock_platform_notification_service.ccmock_platform_notification_service.hmock_raw_clipboard_host.ccmock_raw_clipboard_host.hmock_render_widget_host_delegate.ccmock_render_widget_host_delegate.hmock_widget_input_handler.ccmock_widget_input_handler.htest_render_view_host.htest_web_contents.cctest_web_contents.h
web_test
browser
devtools_protocol_test_bindings.ccfake_bluetooth_chooser.ccfake_bluetooth_chooser.hweb_test_bluetooth_chooser_factory.ccweb_test_control_host.ccweb_test_control_host.hweb_test_first_device_bluetooth_chooser.ccweb_test_first_device_bluetooth_chooser.hweb_test_javascript_dialog_manager.ccweb_test_javascript_dialog_manager.hweb_test_shell_platform_delegate.hweb_test_shell_platform_delegate_aura.ccweb_test_shell_platform_delegate_mac.mmweb_test_shell_platform_delegate_views.cc
renderer
zygote
@ -48,7 +48,7 @@ TEST_F(ResourcesTest, CriticalMessagesContainNoExtraWhitespaces) {
|
||||
ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources("");
|
||||
|
||||
for (int message : messages_to_check) {
|
||||
base::string16 message_str = l10n_util::GetStringUTF16(message);
|
||||
std::u16string message_str = l10n_util::GetStringUTF16(message);
|
||||
EXPECT_EQ(message_str, base::TrimWhitespace(message_str, base::TRIM_ALL));
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class AppShimController : public chrome::mojom::AppShim {
|
||||
// The relative path of the profile.
|
||||
base::FilePath profile_dir;
|
||||
std::string app_id;
|
||||
base::string16 app_name;
|
||||
std::u16string app_name;
|
||||
GURL app_url;
|
||||
};
|
||||
|
||||
|
@ -566,13 +566,13 @@ void ChromeContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
#endif
|
||||
}
|
||||
|
||||
base::string16 ChromeContentClient::GetLocalizedString(int message_id) {
|
||||
std::u16string ChromeContentClient::GetLocalizedString(int message_id) {
|
||||
return l10n_util::GetStringUTF16(message_id);
|
||||
}
|
||||
|
||||
base::string16 ChromeContentClient::GetLocalizedString(
|
||||
std::u16string ChromeContentClient::GetLocalizedString(
|
||||
int message_id,
|
||||
const base::string16& replacement) {
|
||||
const std::u16string& replacement) {
|
||||
return l10n_util::GetStringFUTF16(message_id, replacement);
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,9 @@ class ChromeContentClient : public content::ContentClient {
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
void AddAdditionalSchemes(Schemes* schemes) override;
|
||||
base::string16 GetLocalizedString(int message_id) override;
|
||||
base::string16 GetLocalizedString(int message_id,
|
||||
const base::string16& replacement) override;
|
||||
std::u16string GetLocalizedString(int message_id) override;
|
||||
std::u16string GetLocalizedString(int message_id,
|
||||
const std::u16string& replacement) override;
|
||||
base::StringPiece GetDataResource(int resource_id,
|
||||
ui::ScaleFactor scale_factor) override;
|
||||
base::RefCountedMemory* GetDataResourceBytes(int resource_id) override;
|
||||
|
@ -150,7 +150,7 @@ std::unique_ptr<base::DictionaryValue> ProtocolHandler::Encode() const {
|
||||
return d;
|
||||
}
|
||||
|
||||
base::string16 ProtocolHandler::GetProtocolDisplayName(
|
||||
std::u16string ProtocolHandler::GetProtocolDisplayName(
|
||||
const std::string& protocol) {
|
||||
if (protocol == "mailto")
|
||||
return l10n_util::GetStringUTF16(IDS_REGISTER_PROTOCOL_HANDLER_MAILTO_NAME);
|
||||
@ -159,7 +159,7 @@ base::string16 ProtocolHandler::GetProtocolDisplayName(
|
||||
return base::UTF8ToUTF16(protocol);
|
||||
}
|
||||
|
||||
base::string16 ProtocolHandler::GetProtocolDisplayName() const {
|
||||
std::u16string ProtocolHandler::GetProtocolDisplayName() const {
|
||||
return GetProtocolDisplayName(protocol_);
|
||||
}
|
||||
|
||||
|
@ -75,11 +75,11 @@ class ProtocolHandler {
|
||||
|
||||
// Returns a friendly name for |protocol| if one is available, otherwise
|
||||
// this function returns |protocol|.
|
||||
static base::string16 GetProtocolDisplayName(const std::string& protocol);
|
||||
static std::u16string GetProtocolDisplayName(const std::string& protocol);
|
||||
|
||||
// Returns a friendly name for |this.protocol_| if one is available, otherwise
|
||||
// this function returns |this.protocol_|.
|
||||
base::string16 GetProtocolDisplayName() const;
|
||||
std::u16string GetProtocolDisplayName() const;
|
||||
|
||||
const std::string& protocol() const { return protocol_; }
|
||||
const GURL& url() const { return url_;}
|
||||
|
@ -67,7 +67,7 @@ CommandsHandler::CommandsHandler() {
|
||||
CommandsHandler::~CommandsHandler() {
|
||||
}
|
||||
|
||||
bool CommandsHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool CommandsHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
if (!extension->manifest()->HasKey(keys::kCommands)) {
|
||||
std::unique_ptr<CommandsInfo> commands_info(new CommandsInfo);
|
||||
MaybeSetBrowserActionDefault(extension, commands_info.get());
|
||||
@ -151,9 +151,7 @@ void CommandsHandler::MaybeSetBrowserActionDefault(const Extension* extension,
|
||||
!info->browser_action_command.get()) {
|
||||
info->browser_action_command.reset(
|
||||
new Command(manifest_values::kBrowserActionCommandEvent,
|
||||
base::string16(),
|
||||
std::string(),
|
||||
false));
|
||||
std::u16string(), std::string(), false));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ class CommandsHandler : public ManifestHandler {
|
||||
CommandsHandler();
|
||||
~CommandsHandler() 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:
|
||||
|
@ -127,8 +127,8 @@ TEST_F(BrowserActionManifestTest,
|
||||
}
|
||||
}
|
||||
})");
|
||||
base::string16 error = ErrorUtils::FormatErrorMessageUTF16(
|
||||
errors::kInvalidIconPath, "19");
|
||||
std::u16string error =
|
||||
ErrorUtils::FormatErrorMessageUTF16(errors::kInvalidIconPath, "19");
|
||||
LoadAndExpectError(
|
||||
ManifestData(std::move(manifest_value), "Invalid default icon"),
|
||||
errors::kInvalidIconPath);
|
||||
|
@ -141,7 +141,7 @@ namespace {
|
||||
std::unique_ptr<FileBrowserHandler> LoadFileBrowserHandler(
|
||||
const std::string& extension_id,
|
||||
const base::DictionaryValue* file_browser_handler,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::unique_ptr<FileBrowserHandler> result(new FileBrowserHandler());
|
||||
result->set_extension_id(extension_id);
|
||||
|
||||
@ -249,11 +249,10 @@ std::unique_ptr<FileBrowserHandler> LoadFileBrowserHandler(
|
||||
}
|
||||
|
||||
// Loads FileBrowserHandlers from |extension_actions| into a list in |result|.
|
||||
bool LoadFileBrowserHandlers(
|
||||
const std::string& extension_id,
|
||||
const base::ListValue* extension_actions,
|
||||
FileBrowserHandler::List* result,
|
||||
base::string16* error) {
|
||||
bool LoadFileBrowserHandlers(const std::string& extension_id,
|
||||
const base::ListValue* extension_actions,
|
||||
FileBrowserHandler::List* result,
|
||||
std::u16string* error) {
|
||||
for (const auto& entry : *extension_actions) {
|
||||
const base::DictionaryValue* dict;
|
||||
if (!entry.GetAsDictionary(&dict)) {
|
||||
@ -272,7 +271,7 @@ bool LoadFileBrowserHandlers(
|
||||
} // namespace
|
||||
|
||||
bool FileBrowserHandlerParser::Parse(extensions::Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::Value* file_browser_handlers_value = nullptr;
|
||||
if (!extension->manifest()->Get(keys::kFileBrowserHandlers,
|
||||
&file_browser_handlers_value)) {
|
||||
|
@ -92,7 +92,7 @@ class FileBrowserHandlerParser : public extensions::ManifestHandler {
|
||||
FileBrowserHandlerParser();
|
||||
~FileBrowserHandlerParser() 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;
|
||||
|
@ -53,7 +53,7 @@ const FileSystemProviderCapabilities* FileSystemProviderCapabilities::Get(
|
||||
}
|
||||
|
||||
bool FileSystemProviderCapabilitiesHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const bool has_permission = extensions::PermissionsParser::HasAPIPermission(
|
||||
extension, extensions::APIPermission::ID::kFileSystemProvider);
|
||||
const base::DictionaryValue* section = nullptr;
|
||||
|
@ -51,7 +51,7 @@ class FileSystemProviderCapabilitiesHandler : public ManifestHandler {
|
||||
~FileSystemProviderCapabilitiesHandler() override;
|
||||
|
||||
// ManifestHandler overrides.
|
||||
bool Parse(Extension* extension, base::string16* error) override;
|
||||
bool Parse(Extension* extension, std::u16string* error) override;
|
||||
bool AlwaysParseForType(Manifest::Type type) const override;
|
||||
|
||||
private:
|
||||
|
@ -48,7 +48,7 @@ InputComponentsHandler::~InputComponentsHandler() {
|
||||
}
|
||||
|
||||
bool InputComponentsHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::unique_ptr<InputComponents> info(new InputComponents);
|
||||
const base::ListValue* list_value = NULL;
|
||||
if (!extension->manifest()->GetList(keys::kInputComponents, &list_value)) {
|
||||
|
@ -50,7 +50,7 @@ class InputComponentsHandler : public ManifestHandler {
|
||||
InputComponentsHandler();
|
||||
~InputComponentsHandler() override;
|
||||
|
||||
bool Parse(Extension* extension, base::string16* error) override;
|
||||
bool Parse(Extension* extension, std::u16string* error) override;
|
||||
|
||||
// Requires kOptionsPage is already parsed.
|
||||
const std::vector<std::string> PrerequisiteKeys() const override;
|
||||
|
@ -35,7 +35,7 @@ OmniboxHandler::OmniboxHandler() {
|
||||
OmniboxHandler::~OmniboxHandler() {
|
||||
}
|
||||
|
||||
bool OmniboxHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool OmniboxHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
ManifestKeys manifest_keys;
|
||||
if (!ManifestKeys::ParseFromDictionary(
|
||||
extension->manifest()->available_values(), &manifest_keys, error)) {
|
||||
|
@ -28,7 +28,7 @@ class OmniboxHandler : public ManifestHandler {
|
||||
OmniboxHandler();
|
||||
~OmniboxHandler() 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;
|
||||
|
@ -34,7 +34,7 @@ TtsVoices::~TtsVoices() {}
|
||||
// static
|
||||
bool TtsVoices::Parse(const base::ListValue* tts_voices,
|
||||
TtsVoices* out_voices,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
Extension* extension) {
|
||||
bool added_gender_warning = false;
|
||||
for (size_t i = 0; i < tts_voices->GetSize(); i++) {
|
||||
@ -126,7 +126,7 @@ TtsEngineManifestHandler::TtsEngineManifestHandler() {}
|
||||
TtsEngineManifestHandler::~TtsEngineManifestHandler() {}
|
||||
|
||||
bool TtsEngineManifestHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
auto info = std::make_unique<TtsVoices>();
|
||||
const base::DictionaryValue* tts_dict = nullptr;
|
||||
if (!extension->manifest()->GetDictionary(keys::kTtsEngine, &tts_dict)) {
|
||||
|
@ -32,7 +32,7 @@ struct TtsVoices : public Extension::ManifestData {
|
||||
~TtsVoices() override;
|
||||
static bool Parse(const base::ListValue* tts_voices,
|
||||
TtsVoices* out_voices,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
Extension* extension);
|
||||
|
||||
std::vector<extensions::TtsVoice> voices;
|
||||
@ -46,7 +46,7 @@ class TtsEngineManifestHandler : public ManifestHandler {
|
||||
TtsEngineManifestHandler();
|
||||
~TtsEngineManifestHandler() 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;
|
||||
|
@ -59,7 +59,7 @@ policy::Schema StorageSchemaManifestHandler::GetSchema(
|
||||
}
|
||||
|
||||
bool StorageSchemaManifestHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::string path;
|
||||
if (!extension->manifest()->GetString(kStorageManagedSchema, &path)) {
|
||||
*error = base::ASCIIToUTF16(
|
||||
|
@ -29,7 +29,7 @@ class StorageSchemaManifestHandler : public ManifestHandler {
|
||||
|
||||
private:
|
||||
// ManifestHandler implementation:
|
||||
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;
|
||||
|
@ -46,7 +46,7 @@ const ExtensionIconSet* SystemIndicatorHandler::GetSystemIndicatorIcon(
|
||||
}
|
||||
|
||||
bool SystemIndicatorHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::DictionaryValue* system_indicator_value = nullptr;
|
||||
if (!extension->manifest()->GetDictionary(
|
||||
manifest_keys::kSystemIndicator, &system_indicator_value)) {
|
||||
|
@ -30,7 +30,7 @@ class SystemIndicatorHandler : public ManifestHandler {
|
||||
const Extension& extension);
|
||||
|
||||
// ManifestHandler:
|
||||
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;
|
||||
|
@ -111,7 +111,7 @@ UrlHandlersParser::~UrlHandlersParser() {
|
||||
bool ParseUrlHandler(const std::string& handler_id,
|
||||
const base::DictionaryValue& handler_info,
|
||||
std::vector<UrlHandlerInfo>* url_handlers,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
Extension* extension) {
|
||||
DCHECK(error);
|
||||
|
||||
@ -158,7 +158,7 @@ bool ParseUrlHandler(const std::string& handler_id,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool UrlHandlersParser::Parse(Extension* extension, base::string16* error) {
|
||||
bool UrlHandlersParser::Parse(Extension* extension, std::u16string* error) {
|
||||
if (extension->GetType() == Manifest::TYPE_HOSTED_APP &&
|
||||
!extension->from_bookmark()) {
|
||||
*error = base::ASCIIToUTF16(merrors::kUrlHandlersInHostedApps);
|
||||
|
@ -63,7 +63,7 @@ class UrlHandlersParser : public ManifestHandler {
|
||||
~UrlHandlersParser() override;
|
||||
|
||||
// ManifestHandler API
|
||||
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;
|
||||
|
@ -71,7 +71,7 @@ DevToolsPageHandler::DevToolsPageHandler() {
|
||||
DevToolsPageHandler::~DevToolsPageHandler() {
|
||||
}
|
||||
|
||||
bool DevToolsPageHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool DevToolsPageHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
std::unique_ptr<ManifestURL> manifest_url(new ManifestURL);
|
||||
std::string devtools_str;
|
||||
if (!extension->manifest()->GetString(keys::kDevToolsPage, &devtools_str)) {
|
||||
@ -103,7 +103,7 @@ URLOverridesHandler::URLOverridesHandler() {
|
||||
URLOverridesHandler::~URLOverridesHandler() {
|
||||
}
|
||||
|
||||
bool URLOverridesHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool URLOverridesHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
const base::DictionaryValue* overrides = NULL;
|
||||
if (!extension->manifest()->GetDictionary(keys::kChromeURLOverrides,
|
||||
&overrides)) {
|
||||
|
@ -40,7 +40,7 @@ class DevToolsPageHandler : public ManifestHandler {
|
||||
DevToolsPageHandler();
|
||||
~DevToolsPageHandler() 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;
|
||||
@ -54,7 +54,7 @@ class URLOverridesHandler : public ManifestHandler {
|
||||
URLOverridesHandler();
|
||||
~URLOverridesHandler() 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;
|
||||
|
@ -67,7 +67,7 @@ ui::Accelerator ParseImpl(const std::string& accelerator,
|
||||
const std::string& platform_key,
|
||||
int index,
|
||||
bool should_parse_media_keys,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
error->clear();
|
||||
if (platform_key != values::kKeybindingPlatformWin &&
|
||||
platform_key != values::kKeybindingPlatformMac &&
|
||||
@ -273,11 +273,11 @@ std::string NormalizeShortcutSuggestion(const std::string& suggestion,
|
||||
Command::Command() : global_(false) {}
|
||||
|
||||
Command::Command(const std::string& command_name,
|
||||
const base::string16& description,
|
||||
const std::u16string& description,
|
||||
const std::string& accelerator,
|
||||
bool global)
|
||||
: command_name_(command_name), description_(description), global_(global) {
|
||||
base::string16 error;
|
||||
std::u16string error;
|
||||
accelerator_ = ParseImpl(accelerator, CommandPlatform(), 0,
|
||||
IsNamedCommand(command_name), &error);
|
||||
}
|
||||
@ -304,7 +304,7 @@ std::string Command::CommandPlatform() {
|
||||
// static
|
||||
ui::Accelerator Command::StringToAccelerator(const std::string& accelerator,
|
||||
const std::string& command_name) {
|
||||
base::string16 error;
|
||||
std::u16string error;
|
||||
ui::Accelerator parsed =
|
||||
ParseImpl(accelerator, Command::CommandPlatform(), 0,
|
||||
IsNamedCommand(command_name), &error);
|
||||
@ -418,10 +418,10 @@ bool Command::IsMediaKey(const ui::Accelerator& accelerator) {
|
||||
bool Command::Parse(const base::DictionaryValue* command,
|
||||
const std::string& command_name,
|
||||
int index,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
DCHECK(!command_name.empty());
|
||||
|
||||
base::string16 description;
|
||||
std::u16string description;
|
||||
if (IsNamedCommand(command_name)) {
|
||||
if (!command->GetString(keys::kDescription, &description) ||
|
||||
description.empty()) {
|
||||
|
@ -21,7 +21,7 @@ class Command {
|
||||
public:
|
||||
Command();
|
||||
Command(const std::string& command_name,
|
||||
const base::string16& description,
|
||||
const std::u16string& description,
|
||||
const std::string& accelerator,
|
||||
bool global);
|
||||
Command(const Command& other);
|
||||
@ -48,12 +48,12 @@ class Command {
|
||||
bool Parse(const base::DictionaryValue* command,
|
||||
const std::string& command_name,
|
||||
int index,
|
||||
base::string16* error);
|
||||
std::u16string* error);
|
||||
|
||||
// Accessors:
|
||||
const std::string& command_name() const { return command_name_; }
|
||||
const ui::Accelerator& accelerator() const { return accelerator_; }
|
||||
const base::string16& description() const { return description_; }
|
||||
const std::u16string& description() const { return description_; }
|
||||
bool global() const { return global_; }
|
||||
|
||||
// Setter:
|
||||
@ -67,7 +67,7 @@ class Command {
|
||||
private:
|
||||
std::string command_name_;
|
||||
ui::Accelerator accelerator_;
|
||||
base::string16 description_;
|
||||
std::u16string description_;
|
||||
bool global_;
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ void CheckParse(const ConstCommandsTestData& data,
|
||||
|
||||
extensions::Command command;
|
||||
std::unique_ptr<base::DictionaryValue> input(new base::DictionaryValue);
|
||||
base::string16 error;
|
||||
std::u16string error;
|
||||
|
||||
// First, test the parse of a string suggested_key value.
|
||||
input->SetString("suggested_key", data.key);
|
||||
@ -219,7 +219,7 @@ TEST(CommandTest, ExtensionCommandParsingFallback) {
|
||||
key_dict->SetString("chromeos", "Ctrl+Shift+C");
|
||||
|
||||
extensions::Command command;
|
||||
base::string16 error;
|
||||
std::u16string error;
|
||||
EXPECT_TRUE(command.Parse(input.get(), command_name, 0, &error));
|
||||
EXPECT_STREQ(description.c_str(),
|
||||
base::UTF16ToASCII(command.description()).c_str());
|
||||
|
@ -171,7 +171,7 @@ TEST(ExtensionTest, RTLNameInLTRLocale) {
|
||||
ExtensionBuilder().SetManifest(manifest.Build()).Build();
|
||||
ASSERT_TRUE(extension);
|
||||
const int kResourceId = IDS_EXTENSION_PERMISSIONS_PROMPT_TITLE;
|
||||
const base::string16 expected_utf16 = base::WideToUTF16(expected);
|
||||
const std::u16string expected_utf16 = base::WideToUTF16(expected);
|
||||
EXPECT_EQ(l10n_util::GetStringFUTF16(kResourceId, expected_utf16),
|
||||
l10n_util::GetStringFUTF16(kResourceId,
|
||||
base::UTF8ToUTF16(extension->name())));
|
||||
|
@ -32,7 +32,7 @@ AppDisplayModeHandler::AppDisplayModeHandler() = default;
|
||||
|
||||
AppDisplayModeHandler::~AppDisplayModeHandler() = default;
|
||||
|
||||
bool AppDisplayModeHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool AppDisplayModeHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
std::string display_mode_string;
|
||||
blink::mojom::DisplayMode display_mode =
|
||||
blink::mojom::DisplayMode::kUndefined;
|
||||
|
@ -30,7 +30,7 @@ class AppDisplayModeHandler : public ManifestHandler {
|
||||
AppDisplayModeHandler();
|
||||
~AppDisplayModeHandler() 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;
|
||||
|
@ -53,7 +53,7 @@ AppIconColorHandler::AppIconColorHandler() {
|
||||
AppIconColorHandler::~AppIconColorHandler() {
|
||||
}
|
||||
|
||||
bool AppIconColorHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool AppIconColorHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
std::unique_ptr<AppIconColorInfo> app_icon_color_info(new AppIconColorInfo);
|
||||
|
||||
const base::Value* temp = NULL;
|
||||
|
@ -33,7 +33,7 @@ class AppIconColorHandler : public ManifestHandler {
|
||||
AppIconColorHandler();
|
||||
~AppIconColorHandler() 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;
|
||||
|
@ -31,7 +31,7 @@ bool ReadLaunchDimension(const extensions::Manifest* manifest,
|
||||
const char* key,
|
||||
int* target,
|
||||
bool is_valid_container,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::Value* temp = NULL;
|
||||
if (manifest->Get(key, &temp)) {
|
||||
if (!is_valid_container) {
|
||||
@ -125,14 +125,14 @@ GURL AppLaunchInfo::GetFullLaunchURL(const Extension* extension) {
|
||||
return extension->url().Resolve(info.launch_local_path_);
|
||||
}
|
||||
|
||||
bool AppLaunchInfo::Parse(Extension* extension, base::string16* error) {
|
||||
bool AppLaunchInfo::Parse(Extension* extension, std::u16string* error) {
|
||||
if (!LoadLaunchURL(extension, error) ||
|
||||
!LoadLaunchContainer(extension, error))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AppLaunchInfo::LoadLaunchURL(Extension* extension, base::string16* error) {
|
||||
bool AppLaunchInfo::LoadLaunchURL(Extension* extension, std::u16string* error) {
|
||||
const base::Value* temp = NULL;
|
||||
|
||||
// Launch URL can be either local (to chrome-extension:// root) or an absolute
|
||||
@ -264,7 +264,7 @@ bool AppLaunchInfo::LoadLaunchURL(Extension* extension, base::string16* error) {
|
||||
}
|
||||
|
||||
bool AppLaunchInfo::LoadLaunchContainer(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::Value* tmp_launcher_container = NULL;
|
||||
if (!extension->manifest()->Get(keys::kLaunchContainer,
|
||||
&tmp_launcher_container))
|
||||
@ -342,7 +342,7 @@ AppLaunchManifestHandler::~AppLaunchManifestHandler() {
|
||||
}
|
||||
|
||||
bool AppLaunchManifestHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::unique_ptr<AppLaunchInfo> info(new AppLaunchInfo);
|
||||
if (!info->Parse(extension, error))
|
||||
return false;
|
||||
|
@ -46,11 +46,11 @@ class AppLaunchInfo : public Extension::ManifestData {
|
||||
// Get the fully resolved absolute launch URL.
|
||||
static GURL GetFullLaunchURL(const Extension* extension);
|
||||
|
||||
bool Parse(Extension* extension, base::string16* error);
|
||||
bool Parse(Extension* extension, std::u16string* error);
|
||||
|
||||
private:
|
||||
bool LoadLaunchURL(Extension* extension, base::string16* error);
|
||||
bool LoadLaunchContainer(Extension* extension, base::string16* error);
|
||||
bool LoadLaunchURL(Extension* extension, std::u16string* error);
|
||||
bool LoadLaunchContainer(Extension* extension, std::u16string* error);
|
||||
void OverrideLaunchURL(Extension* extension, GURL override_url);
|
||||
|
||||
std::string launch_local_path_;
|
||||
@ -71,7 +71,7 @@ class AppLaunchManifestHandler : public ManifestHandler {
|
||||
AppLaunchManifestHandler();
|
||||
~AppLaunchManifestHandler() 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:
|
||||
|
@ -34,7 +34,7 @@ AppThemeColorHandler::AppThemeColorHandler() {}
|
||||
|
||||
AppThemeColorHandler::~AppThemeColorHandler() {}
|
||||
|
||||
bool AppThemeColorHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool AppThemeColorHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
std::string theme_color_string;
|
||||
SkColor theme_color = SK_ColorTRANSPARENT;
|
||||
if (!extension->manifest()->GetString(keys::kAppThemeColor,
|
||||
|
@ -30,7 +30,7 @@ class AppThemeColorHandler : public ManifestHandler {
|
||||
AppThemeColorHandler();
|
||||
~AppThemeColorHandler() 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;
|
||||
|
@ -50,7 +50,7 @@ LinkedAppIconsHandler::LinkedAppIconsHandler() {
|
||||
LinkedAppIconsHandler::~LinkedAppIconsHandler() {
|
||||
}
|
||||
|
||||
bool LinkedAppIconsHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool LinkedAppIconsHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
std::unique_ptr<LinkedAppIcons> linked_app_icons(new LinkedAppIcons);
|
||||
|
||||
const base::Value* icons_value = nullptr;
|
||||
|
@ -40,7 +40,7 @@ class LinkedAppIconsHandler : public ManifestHandler {
|
||||
LinkedAppIconsHandler();
|
||||
~LinkedAppIconsHandler() 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;
|
||||
|
@ -26,7 +26,7 @@ MinimumChromeVersionChecker::~MinimumChromeVersionChecker() {
|
||||
}
|
||||
|
||||
bool MinimumChromeVersionChecker::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::string minimum_version_string;
|
||||
if (!extension->manifest()->GetString(keys::kMinimumChromeVersion,
|
||||
&minimum_version_string)) {
|
||||
|
@ -18,7 +18,7 @@ class MinimumChromeVersionChecker : public ManifestHandler {
|
||||
|
||||
// Validate minimum Chrome version. We don't need to store this, since the
|
||||
// extension is not valid if it is incorrect.
|
||||
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;
|
||||
|
@ -41,7 +41,7 @@ NativelyConnectableHandler::NativelyConnectableHandler() = default;
|
||||
NativelyConnectableHandler::~NativelyConnectableHandler() = default;
|
||||
|
||||
bool NativelyConnectableHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::Value* natively_connectable_hosts = nullptr;
|
||||
if (!extension->manifest()->GetList(manifest_keys::kNativelyConnectable,
|
||||
&natively_connectable_hosts)) {
|
||||
|
@ -35,7 +35,7 @@ class NativelyConnectableHandler : public ManifestHandler {
|
||||
NativelyConnectableHandler();
|
||||
~NativelyConnectableHandler() 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;
|
||||
|
@ -38,7 +38,7 @@ std::unique_ptr<GURL> CreateManifestURL(const std::string& url) {
|
||||
}
|
||||
|
||||
std::unique_ptr<GURL> ParseHomepage(const ChromeSettingsOverrides& overrides,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
if (!overrides.homepage)
|
||||
return std::unique_ptr<GURL>();
|
||||
std::unique_ptr<GURL> manifest_url = CreateManifestURL(*overrides.homepage);
|
||||
@ -50,7 +50,7 @@ std::unique_ptr<GURL> ParseHomepage(const ChromeSettingsOverrides& overrides,
|
||||
}
|
||||
|
||||
std::vector<GURL> ParseStartupPage(const ChromeSettingsOverrides& overrides,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
std::vector<GURL> urls;
|
||||
if (!overrides.startup_pages)
|
||||
return urls;
|
||||
@ -72,7 +72,7 @@ std::vector<GURL> ParseStartupPage(const ChromeSettingsOverrides& overrides,
|
||||
|
||||
std::unique_ptr<ChromeSettingsOverrides::SearchProvider> ParseSearchEngine(
|
||||
ChromeSettingsOverrides* overrides,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
if (!overrides->search_provider)
|
||||
return std::unique_ptr<ChromeSettingsOverrides::SearchProvider>();
|
||||
if (!CreateManifestURL(overrides->search_provider->search_url)) {
|
||||
@ -138,7 +138,7 @@ SettingsOverridesHandler::SettingsOverridesHandler() {}
|
||||
SettingsOverridesHandler::~SettingsOverridesHandler() {}
|
||||
|
||||
bool SettingsOverridesHandler::Parse(Extension* extension,
|
||||
base::string16* error) {
|
||||
std::u16string* error) {
|
||||
const base::Value* dict = NULL;
|
||||
CHECK(extension->manifest()->Get(manifest_keys::kSettingsOverride, &dict));
|
||||
std::unique_ptr<ChromeSettingsOverrides> settings(
|
||||
@ -150,11 +150,11 @@ bool SettingsOverridesHandler::Parse(Extension* extension,
|
||||
// parse failure should result in hard error. Currently, Parse fails only when
|
||||
// all of these fail to parse.
|
||||
auto info = std::make_unique<SettingsOverrides>();
|
||||
base::string16 homepage_error;
|
||||
std::u16string homepage_error;
|
||||
info->homepage = ParseHomepage(*settings, &homepage_error);
|
||||
base::string16 search_engine_error;
|
||||
std::u16string search_engine_error;
|
||||
info->search_engine = ParseSearchEngine(settings.get(), &search_engine_error);
|
||||
base::string16 startup_pages_error;
|
||||
std::u16string startup_pages_error;
|
||||
info->startup_pages = ParseStartupPage(*settings, &startup_pages_error);
|
||||
if (!info->homepage && !info->search_engine && info->startup_pages.empty()) {
|
||||
if (!homepage_error.empty()) {
|
||||
|
@ -43,7 +43,7 @@ class SettingsOverridesHandler : public ManifestHandler {
|
||||
SettingsOverridesHandler();
|
||||
~SettingsOverridesHandler() 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;
|
||||
|
@ -22,7 +22,7 @@ namespace errors = manifest_errors;
|
||||
namespace {
|
||||
|
||||
bool LoadImages(const base::DictionaryValue* theme_value,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
ThemeInfo* theme_info) {
|
||||
const base::DictionaryValue* images_value = NULL;
|
||||
if (theme_value->GetDictionary(keys::kThemeImages, &images_value)) {
|
||||
@ -57,7 +57,7 @@ bool LoadImages(const base::DictionaryValue* theme_value,
|
||||
}
|
||||
|
||||
bool LoadColors(const base::DictionaryValue* theme_value,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
ThemeInfo* theme_info) {
|
||||
const base::DictionaryValue* colors_value = NULL;
|
||||
if (theme_value->GetDictionary(keys::kThemeColors, &colors_value)) {
|
||||
@ -89,7 +89,7 @@ bool LoadColors(const base::DictionaryValue* theme_value,
|
||||
}
|
||||
|
||||
bool LoadTints(const base::DictionaryValue* theme_value,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
ThemeInfo* theme_info) {
|
||||
const base::DictionaryValue* tints_value = NULL;
|
||||
if (!theme_value->GetDictionary(keys::kThemeTints, &tints_value))
|
||||
@ -114,7 +114,7 @@ bool LoadTints(const base::DictionaryValue* theme_value,
|
||||
}
|
||||
|
||||
bool LoadDisplayProperties(const base::DictionaryValue* theme_value,
|
||||
base::string16* error,
|
||||
std::u16string* error,
|
||||
ThemeInfo* theme_info) {
|
||||
const base::DictionaryValue* display_properties_value = NULL;
|
||||
if (theme_value->GetDictionary(keys::kThemeDisplayProperties,
|
||||
@ -168,7 +168,7 @@ ThemeHandler::ThemeHandler() {
|
||||
ThemeHandler::~ThemeHandler() {
|
||||
}
|
||||
|
||||
bool ThemeHandler::Parse(Extension* extension, base::string16* error) {
|
||||
bool ThemeHandler::Parse(Extension* extension, std::u16string* error) {
|
||||
const base::DictionaryValue* theme_value = NULL;
|
||||
if (!extension->manifest()->GetDictionary(keys::kTheme, &theme_value)) {
|
||||
*error = base::ASCIIToUTF16(errors::kInvalidTheme);
|
||||
|
@ -48,7 +48,7 @@ class ThemeHandler : public ManifestHandler {
|
||||
ThemeHandler();
|
||||
~ThemeHandler() 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;
|
||||
|
@ -178,7 +178,7 @@ TEST_F(InitValueManifestTest, InitFromValueValidNameInRTL) {
|
||||
scoped_refptr<Extension> extension(LoadAndExpectSuccess(
|
||||
"init_valid_name_no_rtl.json"));
|
||||
|
||||
base::string16 localized_name(base::ASCIIToUTF16("Dictionary (by Google)"));
|
||||
std::u16string localized_name(base::ASCIIToUTF16("Dictionary (by Google)"));
|
||||
base::i18n::AdjustStringForLocaleDirection(&localized_name);
|
||||
EXPECT_EQ(localized_name, base::UTF8ToUTF16(extension->name()));
|
||||
|
||||
|
@ -51,7 +51,7 @@ class SingleParameterFormatter : public ChromePermissionMessageFormatter {
|
||||
PermissionMessage GetPermissionMessage(
|
||||
const PermissionIDSet& permissions) const override {
|
||||
DCHECK(permissions.size() > 0);
|
||||
std::vector<base::string16> parameters =
|
||||
std::vector<std::u16string> parameters =
|
||||
permissions.GetAllPermissionParameters();
|
||||
DCHECK_EQ(1U, parameters.size())
|
||||
<< "Only one message with each ID can be parameterized.";
|
||||
@ -103,9 +103,9 @@ class SpaceSeparatedListFormatter : public ChromePermissionMessageFormatter {
|
||||
PermissionMessage GetPermissionMessage(
|
||||
const PermissionIDSet& permissions) const override {
|
||||
DCHECK(permissions.size() > 0);
|
||||
std::vector<base::string16> hostnames =
|
||||
std::vector<std::u16string> hostnames =
|
||||
permissions.GetAllPermissionParameters();
|
||||
base::string16 hosts_string =
|
||||
std::u16string hosts_string =
|
||||
base::JoinString(hostnames, base::ASCIIToUTF16(" "));
|
||||
return PermissionMessage(
|
||||
l10n_util::GetStringFUTF16(hostnames.size() == 1
|
||||
@ -140,7 +140,7 @@ class HostListFormatter : public ChromePermissionMessageFormatter {
|
||||
PermissionMessage GetPermissionMessage(
|
||||
const PermissionIDSet& permissions) const override {
|
||||
DCHECK(!permissions.empty());
|
||||
std::vector<base::string16> hostnames =
|
||||
std::vector<std::u16string> hostnames =
|
||||
GetHostMessages(permissions.GetAllPermissionParameters());
|
||||
int message_id = message_id_for_hosts(hostnames.size());
|
||||
if (hostnames.size() <= kMaxHostsInMainMessage) {
|
||||
@ -166,13 +166,13 @@ class HostListFormatter : public ChromePermissionMessageFormatter {
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<base::string16> GetHostMessages(
|
||||
const std::vector<base::string16>& hosts) const {
|
||||
std::vector<std::u16string> GetHostMessages(
|
||||
const std::vector<std::u16string>& hosts) const {
|
||||
int msg_id = hosts.size() <= kMaxHostsInMainMessage
|
||||
? IDS_EXTENSION_PROMPT_WARNING_HOST_AND_SUBDOMAIN
|
||||
: IDS_EXTENSION_PROMPT_WARNING_HOST_AND_SUBDOMAIN_LIST;
|
||||
std::vector<base::string16> messages;
|
||||
for (const base::string16& host : hosts) {
|
||||
std::vector<std::u16string> messages;
|
||||
for (const std::u16string& host : hosts) {
|
||||
messages.push_back(
|
||||
host[0] == '*' && host[1] == '.'
|
||||
? l10n_util::GetStringFUTF16(msg_id, host.substr(2))
|
||||
@ -207,7 +207,7 @@ class USBDevicesFormatter : public ChromePermissionMessageFormatter {
|
||||
PermissionMessage GetItemMessage(const PermissionIDSet& permissions) const {
|
||||
DCHECK(permissions.size() == 1);
|
||||
const PermissionID& permission = *permissions.begin();
|
||||
base::string16 msg;
|
||||
std::u16string msg;
|
||||
switch (permission.id()) {
|
||||
case APIPermission::kUsbDevice:
|
||||
msg = l10n_util::GetStringFUTF16(
|
||||
@ -232,14 +232,14 @@ class USBDevicesFormatter : public ChromePermissionMessageFormatter {
|
||||
const PermissionIDSet& permissions) const {
|
||||
DCHECK(permissions.size() > 1);
|
||||
// Put all the individual items into submessages.
|
||||
std::vector<base::string16> submessages =
|
||||
std::vector<std::u16string> submessages =
|
||||
permissions.GetAllPermissionsWithID(APIPermission::kUsbDevice)
|
||||
.GetAllPermissionParameters();
|
||||
std::vector<base::string16> vendors =
|
||||
permissions.GetAllPermissionsWithID(
|
||||
APIPermission::kUsbDeviceUnknownProduct)
|
||||
std::vector<std::u16string> vendors =
|
||||
permissions
|
||||
.GetAllPermissionsWithID(APIPermission::kUsbDeviceUnknownProduct)
|
||||
.GetAllPermissionParameters();
|
||||
for (const base::string16& vendor : vendors) {
|
||||
for (const std::u16string& vendor : vendors) {
|
||||
submessages.push_back(l10n_util::GetStringFUTF16(
|
||||
IDS_EXTENSION_PROMPT_WARNING_USB_DEVICE_LIST_ITEM_UNKNOWN_PRODUCT,
|
||||
vendor));
|
||||
|
@ -47,7 +47,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) {
|
||||
}
|
||||
|
||||
size_t IndexOf(const PermissionMessages& warnings, const std::string& warning) {
|
||||
base::string16 warning16 = base::ASCIIToUTF16(warning);
|
||||
std::u16string warning16 = base::ASCIIToUTF16(warning);
|
||||
size_t i = 0;
|
||||
for (const PermissionMessage& msg : warnings) {
|
||||
if (msg.message() == warning16)
|
||||
|
@ -29,7 +29,7 @@ namespace {
|
||||
// Retrieves the file system path of the profile name.
|
||||
base::FilePath GetProfilePath(const base::DictionaryValue& root,
|
||||
const std::string& profile_name) {
|
||||
base::string16 path16;
|
||||
std::u16string path16;
|
||||
std::string is_relative;
|
||||
if (!root.GetStringASCII(profile_name + ".IsRelative", &is_relative) ||
|
||||
!root.GetString(profile_name + ".Path", &path16))
|
||||
@ -75,13 +75,13 @@ std::vector<FirefoxDetail> GetFirefoxDetailsFromDictionary(
|
||||
break;
|
||||
}
|
||||
|
||||
base::string16 path;
|
||||
std::u16string path;
|
||||
if (!root.GetString(current_profile + ".Path", &path))
|
||||
continue;
|
||||
|
||||
FirefoxDetail details;
|
||||
details.path = GetProfilePath(root, current_profile);
|
||||
base::string16 name;
|
||||
std::u16string name;
|
||||
root.GetString(current_profile + ".Name", &name);
|
||||
// Make the profile name more presentable by replacing dashes with spaces.
|
||||
base::ReplaceChars(name, base::ASCIIToUTF16("-"), base::ASCIIToUTF16(" "),
|
||||
@ -94,7 +94,7 @@ std::vector<FirefoxDetail> GetFirefoxDetailsFromDictionary(
|
||||
// The name is only used to disambiguate profiles in the profile selection UI,
|
||||
// which is only useful when there are multiple profiles.
|
||||
if (profile_details.size() == 1) {
|
||||
profile_details[0].name = base::string16();
|
||||
profile_details[0].name = std::u16string();
|
||||
}
|
||||
|
||||
return profile_details;
|
||||
@ -300,7 +300,7 @@ std::string GetPrefsJsValue(const std::string& content,
|
||||
// ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
// .........................................
|
||||
// In this example the function returns "Iceweasel" (or a localized equivalent).
|
||||
base::string16 GetFirefoxImporterName(const base::FilePath& app_path) {
|
||||
std::u16string GetFirefoxImporterName(const base::FilePath& app_path) {
|
||||
const base::FilePath app_ini_file = app_path.AppendASCII("application.ini");
|
||||
std::string branding_name;
|
||||
if (base::PathExists(app_ini_file)) {
|
||||
|
@ -37,7 +37,7 @@ struct FirefoxDetail {
|
||||
// in stored.
|
||||
base::FilePath path;
|
||||
// The user specified name of the profile.
|
||||
base::string16 name;
|
||||
std::u16string name;
|
||||
};
|
||||
|
||||
inline bool operator==(const FirefoxDetail& a1, const FirefoxDetail& a2) {
|
||||
@ -101,6 +101,6 @@ std::string GetPrefsJsValue(const std::string& prefs,
|
||||
// This is useful to differentiate between Firefox and Iceweasel.
|
||||
// If anything goes wrong while trying to obtain the branding name,
|
||||
// the function assumes it's Firefox.
|
||||
base::string16 GetFirefoxImporterName(const base::FilePath& app_path);
|
||||
std::u16string GetFirefoxImporterName(const base::FilePath& app_path);
|
||||
|
||||
#endif // CHROME_COMMON_IMPORTER_FIREFOX_IMPORTER_UTILS_H_
|
||||
|
@ -145,7 +145,7 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) {
|
||||
GetFirefoxDetailsFromDictionary(single_profile, std::string());
|
||||
EXPECT_THAT(details, UnorderedElementsAre(FirefoxDetail{
|
||||
base::FilePath(FILE_PATH_LITERAL("first")),
|
||||
base::string16()}));
|
||||
std::u16string()}));
|
||||
|
||||
base::DictionaryValue no_default;
|
||||
no_default.SetString("Profile0.Path", "first");
|
||||
@ -222,9 +222,9 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) {
|
||||
EXPECT_THAT(default_single_install_unknown_profile_details,
|
||||
UnorderedElementsAre(
|
||||
FirefoxDetail{base::FilePath(FILE_PATH_LITERAL("first")),
|
||||
base::string16()},
|
||||
std::u16string()},
|
||||
FirefoxDetail{base::FilePath(FILE_PATH_LITERAL("second")),
|
||||
base::string16()}));
|
||||
std::u16string()}));
|
||||
|
||||
default_single_install_unknown_profile.SetString("Install01.Default",
|
||||
"first");
|
||||
@ -241,9 +241,9 @@ TEST(FirefoxImporterUtilsTest, GetFirefoxProfilePath) {
|
||||
EXPECT_THAT(default_multiple_install_details,
|
||||
UnorderedElementsAre(
|
||||
FirefoxDetail{base::FilePath(FILE_PATH_LITERAL("first")),
|
||||
base::string16()},
|
||||
std::u16string()},
|
||||
FirefoxDetail{base::FilePath(FILE_PATH_LITERAL("second")),
|
||||
base::string16()}));
|
||||
std::u16string()}));
|
||||
|
||||
base::DictionaryValue one_of_profiles_is_not_ascii_named;
|
||||
one_of_profiles_is_not_ascii_named.SetString("Profile0.Path", "first");
|
||||
|
@ -22,8 +22,8 @@ struct ImportedBookmarkEntry {
|
||||
bool in_toolbar;
|
||||
bool is_folder;
|
||||
GURL url;
|
||||
std::vector<base::string16> path;
|
||||
base::string16 title;
|
||||
std::vector<std::u16string> path;
|
||||
std::u16string title;
|
||||
base::Time creation_time;
|
||||
};
|
||||
|
||||
|
@ -17,10 +17,10 @@ struct ImporterAutofillFormDataEntry {
|
||||
~ImporterAutofillFormDataEntry();
|
||||
|
||||
// Name of input element.
|
||||
base::string16 name;
|
||||
std::u16string name;
|
||||
|
||||
// Value of input element.
|
||||
base::string16 value;
|
||||
std::u16string value;
|
||||
|
||||
// Number of times this name-value pair has been used.
|
||||
int times_used;
|
||||
|
@ -28,9 +28,8 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
|
||||
public:
|
||||
ImporterBridge();
|
||||
|
||||
virtual void AddBookmarks(
|
||||
const std::vector<ImportedBookmarkEntry>& bookmarks,
|
||||
const base::string16& first_folder_name) = 0;
|
||||
virtual void AddBookmarks(const std::vector<ImportedBookmarkEntry>& bookmarks,
|
||||
const std::u16string& first_folder_name) = 0;
|
||||
|
||||
virtual void AddHomePage(const GURL& home_page) = 0;
|
||||
|
||||
@ -67,7 +66,7 @@ class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> {
|
||||
// this calls the set of strings we've ported over to the external process.
|
||||
// It's good to avoid having to create a separate ResourceBundle for the
|
||||
// external import process, since the importer only needs a few strings.
|
||||
virtual base::string16 GetLocalizedString(int message_id) = 0;
|
||||
virtual std::u16string GetLocalizedString(int message_id) = 0;
|
||||
|
||||
protected:
|
||||
friend class base::RefCountedThreadSafe<ImporterBridge>;
|
||||
|
@ -40,7 +40,7 @@ struct SourceProfile {
|
||||
SourceProfile(const SourceProfile& other);
|
||||
~SourceProfile();
|
||||
|
||||
base::string16 importer_name;
|
||||
std::u16string importer_name;
|
||||
ImporterType importer_type;
|
||||
base::FilePath source_path;
|
||||
base::FilePath app_path;
|
||||
@ -48,16 +48,16 @@ struct SourceProfile {
|
||||
// The application locale. Stored because we can only access it from the UI
|
||||
// thread on the browser process. This is only used by the Firefox importer.
|
||||
std::string locale;
|
||||
base::string16 profile;
|
||||
std::u16string profile;
|
||||
};
|
||||
|
||||
// Contains information needed for importing search engine urls.
|
||||
struct SearchEngineInfo {
|
||||
// |url| is a string instead of a GURL since it may not actually be a valid
|
||||
// GURL directly (e.g. for "http://%s.com").
|
||||
base::string16 url;
|
||||
base::string16 keyword;
|
||||
base::string16 display_name;
|
||||
std::u16string url;
|
||||
std::u16string keyword;
|
||||
std::u16string display_name;
|
||||
};
|
||||
|
||||
// Contains the information read from the IE7/IE8 Storage2 key in the registry.
|
||||
@ -68,7 +68,7 @@ struct ImporterIE7PasswordInfo {
|
||||
ImporterIE7PasswordInfo& operator=(const ImporterIE7PasswordInfo& other);
|
||||
|
||||
// Hash of the url.
|
||||
base::string16 url_hash;
|
||||
std::u16string url_hash;
|
||||
|
||||
// Encrypted data containing the username, password and some more
|
||||
// undocumented fields.
|
||||
@ -98,10 +98,10 @@ struct ImportedPasswordForm {
|
||||
std::string signon_realm;
|
||||
GURL url;
|
||||
GURL action;
|
||||
base::string16 username_element;
|
||||
base::string16 username_value;
|
||||
base::string16 password_element;
|
||||
base::string16 password_value;
|
||||
std::u16string username_element;
|
||||
std::u16string username_value;
|
||||
std::u16string password_element;
|
||||
std::u16string password_value;
|
||||
bool blocked_by_user = false;
|
||||
};
|
||||
|
||||
|
@ -21,7 +21,7 @@ struct ImporterURLRow {
|
||||
ImporterURLRow(const ImporterURLRow& other);
|
||||
|
||||
GURL url;
|
||||
base::string16 title;
|
||||
std::u16string title;
|
||||
|
||||
// Total number of times this URL has been visited.
|
||||
int visit_count;
|
||||
|
@ -19,7 +19,7 @@ class MockImporterBridge : public ImporterBridge {
|
||||
|
||||
MOCK_METHOD2(AddBookmarks,
|
||||
void(const std::vector<ImportedBookmarkEntry>&,
|
||||
const base::string16&));
|
||||
const std::u16string&));
|
||||
MOCK_METHOD1(AddHomePage, void(const GURL&));
|
||||
MOCK_METHOD1(SetFavicons, void(const favicon_base::FaviconUsageDataList&));
|
||||
MOCK_METHOD2(SetHistoryItems,
|
||||
@ -33,7 +33,7 @@ class MockImporterBridge : public ImporterBridge {
|
||||
MOCK_METHOD1(NotifyItemStarted, void(importer::ImportItem));
|
||||
MOCK_METHOD1(NotifyItemEnded, void(importer::ImportItem));
|
||||
MOCK_METHOD0(NotifyEnded, void());
|
||||
MOCK_METHOD1(GetLocalizedString, base::string16(int));
|
||||
MOCK_METHOD1(GetLocalizedString, std::u16string(int));
|
||||
|
||||
private:
|
||||
~MockImporterBridge() override;
|
||||
|
@ -69,22 +69,22 @@ struct StructTraits<chrome::mojom::ImportedPasswordFormDataView,
|
||||
return r.action;
|
||||
}
|
||||
|
||||
static const base::string16& username_element(
|
||||
static const std::u16string& username_element(
|
||||
const importer::ImportedPasswordForm& r) {
|
||||
return r.username_element;
|
||||
}
|
||||
|
||||
static const base::string16& username_value(
|
||||
static const std::u16string& username_value(
|
||||
const importer::ImportedPasswordForm& r) {
|
||||
return r.username_value;
|
||||
}
|
||||
|
||||
static const base::string16& password_element(
|
||||
static const std::u16string& password_element(
|
||||
const importer::ImportedPasswordForm& r) {
|
||||
return r.password_element;
|
||||
}
|
||||
|
||||
static const base::string16& password_value(
|
||||
static const std::u16string& password_value(
|
||||
const importer::ImportedPasswordForm& r) {
|
||||
return r.password_value;
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ int MediaMessageIdToGrdId(media::MessageId message_id) {
|
||||
|
||||
} // namespace
|
||||
|
||||
base::string16 ChromeMediaLocalizedStringProvider(media::MessageId message_id) {
|
||||
std::u16string ChromeMediaLocalizedStringProvider(media::MessageId message_id) {
|
||||
return l10n_util::GetStringUTF16(MediaMessageIdToGrdId(message_id));
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "media/base/localized_strings.h"
|
||||
|
||||
// This is called indirectly by the media layer to access resources.
|
||||
base::string16 ChromeMediaLocalizedStringProvider(
|
||||
std::u16string ChromeMediaLocalizedStringProvider(
|
||||
media::MessageId media_message_id);
|
||||
|
||||
#endif // CHROME_COMMON_MEDIA_MEDIA_RESOURCE_PROVIDER_H_
|
||||
|
@ -320,11 +320,11 @@ string ProcessRawBitsSignatureWrap(CERTCertificate* cert_handle) {
|
||||
|
||||
std::string ProcessIDN(const std::string& input) {
|
||||
// Convert the ASCII input to a string16 for ICU.
|
||||
base::string16 input16;
|
||||
std::u16string input16;
|
||||
input16.reserve(input.length());
|
||||
input16.insert(input16.end(), input.begin(), input.end());
|
||||
|
||||
base::string16 output16 = url_formatter::IDNToUnicode(input);
|
||||
std::u16string output16 = url_formatter::IDNToUnicode(input);
|
||||
if (input16 == output16)
|
||||
return input; // Input did not contain any encoded data.
|
||||
|
||||
|
@ -173,7 +173,7 @@ struct InstantMostVisitedItem {
|
||||
|
||||
// The title of the Most Visited page. May be empty, in which case the |url|
|
||||
// is used as the title.
|
||||
base::string16 title;
|
||||
std::u16string title;
|
||||
|
||||
// The external URL of the favicon associated with this page.
|
||||
GURL favicon;
|
||||
|
@ -110,7 +110,7 @@ ServiceProcessState::CreateServiceProcessDataRegion(size_t size) {
|
||||
if (size > static_cast<size_t>(std::numeric_limits<int>::max()))
|
||||
return {};
|
||||
|
||||
base::string16 name = base::ASCIIToUTF16(GetServiceProcessSharedMemName());
|
||||
std::u16string name = base::ASCIIToUTF16(GetServiceProcessSharedMemName());
|
||||
|
||||
SECURITY_ATTRIBUTES sa = {sizeof(sa), nullptr, FALSE};
|
||||
HANDLE raw_handle =
|
||||
@ -140,7 +140,7 @@ ServiceProcessState::CreateServiceProcessDataRegion(size_t size) {
|
||||
base::ReadOnlySharedMemoryMapping
|
||||
ServiceProcessState::OpenServiceProcessDataMapping(size_t size) {
|
||||
DWORD access = FILE_MAP_READ | SECTION_QUERY;
|
||||
base::string16 name = base::ASCIIToUTF16(GetServiceProcessSharedMemName());
|
||||
std::u16string name = base::ASCIIToUTF16(GetServiceProcessSharedMemName());
|
||||
HANDLE raw_handle = OpenFileMapping(access, false, base::as_wcstr(name));
|
||||
if (!raw_handle) {
|
||||
auto err = GetLastError();
|
||||
|
@ -37,9 +37,8 @@ IN_PROC_BROWSER_TEST_F(TimeFormatBrowserTest, DecimalPointNotDot) {
|
||||
// This showed up on the browser on estimated download time, for example.
|
||||
// http://crbug.com/60476
|
||||
|
||||
base::string16 one_min =
|
||||
ui::TimeFormat::Simple(ui::TimeFormat::FORMAT_DURATION,
|
||||
ui::TimeFormat::LENGTH_SHORT,
|
||||
TimeDelta::FromMinutes(1));
|
||||
std::u16string one_min = ui::TimeFormat::Simple(
|
||||
ui::TimeFormat::FORMAT_DURATION, ui::TimeFormat::LENGTH_SHORT,
|
||||
TimeDelta::FromMinutes(1));
|
||||
EXPECT_EQ(base::ASCIIToUTF16("1 min"), one_min);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ CredentialProviderBrokerWin::CredentialProviderBrokerWin() = default;
|
||||
CredentialProviderBrokerWin::~CredentialProviderBrokerWin() = default;
|
||||
|
||||
void CredentialProviderBrokerWin::OpenDevice(
|
||||
const base::string16& input_device_path,
|
||||
const std::u16string& input_device_path,
|
||||
OpenDeviceCallback callback) {
|
||||
base::win::ScopedDevInfo device_info_set(
|
||||
SetupDiGetClassDevs(&GUID_DEVINTERFACE_HID, nullptr, nullptr,
|
||||
|
@ -22,7 +22,7 @@ class CredentialProviderBrokerWin
|
||||
|
||||
protected:
|
||||
// GcpwHidBroker impl:
|
||||
void OpenDevice(const base::string16& device_path,
|
||||
void OpenDevice(const std::u16string& device_path,
|
||||
OpenDeviceCallback callback) override;
|
||||
};
|
||||
} // namespace credential_provider
|
||||
|
@ -89,7 +89,7 @@ class ServiceMain {
|
||||
void SignalExit();
|
||||
|
||||
// Registers |factory| as the factory for the elevator identified by |id|.
|
||||
void RegisterElevatorFactory(const base::string16& id,
|
||||
void RegisterElevatorFactory(const std::u16string& id,
|
||||
IClassFactory* factory);
|
||||
|
||||
// The action routine to be executed.
|
||||
|
@ -190,21 +190,21 @@ TEST_F(AutofillRendererTest, SendForms) {
|
||||
|
||||
expected.id_attribute = ASCIIToUTF16("firstname");
|
||||
expected.name = expected.id_attribute;
|
||||
expected.value = base::string16();
|
||||
expected.value = std::u16string();
|
||||
expected.form_control_type = "text";
|
||||
expected.max_length = WebInputElement::DefaultMaxLength();
|
||||
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[0]);
|
||||
|
||||
expected.id_attribute = ASCIIToUTF16("middlename");
|
||||
expected.name = expected.id_attribute;
|
||||
expected.value = base::string16();
|
||||
expected.value = std::u16string();
|
||||
expected.form_control_type = "text";
|
||||
expected.max_length = WebInputElement::DefaultMaxLength();
|
||||
EXPECT_FORM_FIELD_DATA_EQUALS(expected, forms[0].fields[1]);
|
||||
|
||||
expected.id_attribute = ASCIIToUTF16("lastname");
|
||||
expected.name = expected.id_attribute;
|
||||
expected.value = base::string16();
|
||||
expected.value = std::u16string();
|
||||
expected.form_control_type = "text";
|
||||
expected.autocomplete_attribute = "off";
|
||||
expected.max_length = WebInputElement::DefaultMaxLength();
|
||||
|
@ -59,7 +59,7 @@ void FakeMojoPasswordManagerDriver::UserModifiedPasswordField() {
|
||||
|
||||
void FakeMojoPasswordManagerDriver::UserModifiedNonPasswordField(
|
||||
autofill::FieldRendererId renderer_id,
|
||||
const base::string16& value) {}
|
||||
const std::u16string& value) {}
|
||||
|
||||
void FakeMojoPasswordManagerDriver::CheckSafeBrowsingReputation(
|
||||
const GURL& form_action,
|
||||
|
@ -38,7 +38,7 @@ class FakeMojoPasswordManagerDriver
|
||||
|
||||
MOCK_METHOD4(ShowPasswordSuggestions,
|
||||
void(base::i18n::TextDirection,
|
||||
const base::string16&,
|
||||
const std::u16string&,
|
||||
int,
|
||||
const gfx::RectF&));
|
||||
|
||||
@ -99,7 +99,7 @@ class FakeMojoPasswordManagerDriver
|
||||
return called_save_generation_field_;
|
||||
}
|
||||
|
||||
const base::Optional<base::string16>& save_generation_field() const {
|
||||
const base::Optional<std::u16string>& save_generation_field() const {
|
||||
return save_generation_field_;
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ class FakeMojoPasswordManagerDriver
|
||||
void UserModifiedPasswordField() override;
|
||||
|
||||
void UserModifiedNonPasswordField(autofill::FieldRendererId renderer_id,
|
||||
const base::string16& value) override;
|
||||
const std::u16string& value) override;
|
||||
|
||||
void CheckSafeBrowsingReputation(const GURL& form_action,
|
||||
const GURL& frame_url) override;
|
||||
@ -176,7 +176,7 @@ class FakeMojoPasswordManagerDriver
|
||||
// Records whether SaveGenerationFieldDetectedByClassifier() gets called.
|
||||
bool called_save_generation_field_ = false;
|
||||
// Records data received via SaveGenerationFieldDetectedByClassifier() call.
|
||||
base::Optional<base::string16> save_generation_field_;
|
||||
base::Optional<std::u16string> save_generation_field_;
|
||||
|
||||
// Records number of times CheckSafeBrowsingReputation() gets called.
|
||||
int called_check_safe_browsing_reputation_cnt_ = 0;
|
||||
|
@ -38,11 +38,11 @@ class FakePasswordGenerationDriver
|
||||
void(const gfx::RectF&,
|
||||
const autofill::FormData&,
|
||||
autofill::FieldRendererId,
|
||||
const base::string16&));
|
||||
const std::u16string&));
|
||||
MOCK_METHOD0(PasswordGenerationRejectedByTyping, void());
|
||||
MOCK_METHOD2(PresaveGeneratedPassword,
|
||||
void(const autofill::FormData& form_data,
|
||||
const base::string16& generated_password));
|
||||
const std::u16string& generated_password));
|
||||
MOCK_METHOD1(PasswordNoLongerGenerated,
|
||||
void(const autofill::FormData& form_data));
|
||||
MOCK_METHOD0(FrameWasScrolled, void());
|
||||
|
@ -767,7 +767,7 @@ TEST_F(FormAutocompleteTest, AcceptDataListSuggestion) {
|
||||
WebDocument document = GetMainFrame()->GetDocument();
|
||||
|
||||
// Each case tests a different field value with the same suggestion.
|
||||
const base::string16 kSuggestion =
|
||||
const std::u16string kSuggestion =
|
||||
base::ASCIIToUTF16("suggestion@example.com");
|
||||
struct TestCase {
|
||||
std::string id;
|
||||
|
@ -293,11 +293,11 @@ class FormAutofillTest : public ChromeRenderViewTest {
|
||||
#endif
|
||||
|
||||
void ExpectLabels(const char* html,
|
||||
const std::vector<base::string16>& id_attributes,
|
||||
const std::vector<base::string16>& name_attributes,
|
||||
const std::vector<base::string16>& labels,
|
||||
const std::vector<base::string16>& names,
|
||||
const std::vector<base::string16>& values) {
|
||||
const std::vector<std::u16string>& id_attributes,
|
||||
const std::vector<std::u16string>& name_attributes,
|
||||
const std::vector<std::u16string>& labels,
|
||||
const std::vector<std::u16string>& names,
|
||||
const std::vector<std::u16string>& values) {
|
||||
ASSERT_EQ(labels.size(), id_attributes.size());
|
||||
ASSERT_EQ(labels.size(), name_attributes.size());
|
||||
ASSERT_EQ(labels.size(), names.size());
|
||||
@ -346,23 +346,23 @@ class FormAutofillTest : public ChromeRenderViewTest {
|
||||
// the name attribute to identify the input fields. Otherwise, this is the
|
||||
// same text structure as ExpectJohnSmithLabelsAndNameAttributes().
|
||||
void ExpectJohnSmithLabelsAndIdAttributes(const char* html) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("First name:"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("John"));
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("lastname"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("Last name:"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("Smith"));
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("email"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("Email:"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("john@example.com"));
|
||||
@ -374,21 +374,21 @@ class FormAutofillTest : public ChromeRenderViewTest {
|
||||
// the id attribute to identify the input fields. Otherwise, this is the same
|
||||
// text structure as ExpectJohnSmithLabelsAndIdAttributes().
|
||||
void ExpectJohnSmithLabelsAndNameAttributes(const char* html) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
id_attributes.push_back(base::string16());
|
||||
id_attributes.push_back(std::u16string());
|
||||
name_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
labels.push_back(ASCIIToUTF16("First name:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("John"));
|
||||
|
||||
id_attributes.push_back(base::string16());
|
||||
id_attributes.push_back(std::u16string());
|
||||
name_attributes.push_back(ASCIIToUTF16("lastname"));
|
||||
labels.push_back(ASCIIToUTF16("Last name:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("Smith"));
|
||||
|
||||
id_attributes.push_back(base::string16());
|
||||
id_attributes.push_back(std::u16string());
|
||||
name_attributes.push_back(ASCIIToUTF16("email"));
|
||||
labels.push_back(ASCIIToUTF16("Email:"));
|
||||
names.push_back(name_attributes.back());
|
||||
@ -3155,7 +3155,7 @@ TEST_F(FormAutofillTest, WebFormElementToFormData_CssClasses) {
|
||||
EXPECT_EQ(3U, form.fields.size());
|
||||
EXPECT_EQ(ASCIIToUTF16("firstname_field"), form.fields[0].css_classes);
|
||||
EXPECT_EQ(ASCIIToUTF16("lastname_field"), form.fields[1].css_classes);
|
||||
EXPECT_EQ(base::string16(), form.fields[2].css_classes);
|
||||
EXPECT_EQ(std::u16string(), form.fields[2].css_classes);
|
||||
}
|
||||
|
||||
// Tests id attributes are set.
|
||||
@ -3582,7 +3582,7 @@ TEST_F(FormAutofillTest, LabelsWithSpans) {
|
||||
// however, current label parsing code will extract the text from the previous
|
||||
// label element and apply it to the following input field.
|
||||
TEST_F(FormAutofillTest, InvalidLabels) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
@ -3738,7 +3738,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellTH) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -3813,7 +3813,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -3879,7 +3879,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromPreviousTD) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -4115,7 +4115,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableTDInterveningElements) {
|
||||
// Verify that we correctly infer labels when the label text spans multiple
|
||||
// adjacent HTML elements, not separated by whitespace.
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromTableAdjacentElements) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -4176,7 +4176,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableAdjacentElements) {
|
||||
// Verify that we correctly infer labels when the label text resides in the
|
||||
// previous row.
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromTableRow) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -4300,7 +4300,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableRow) {
|
||||
|
||||
// Verify that we correctly infer labels when enclosed within a list item.
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromListItem) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("areacode"));
|
||||
@ -4342,7 +4342,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromListItem) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
@ -4412,26 +4412,26 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredWithSameName) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("Address"));
|
||||
labels.push_back(ASCIIToUTF16("Address Line 1:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("Address"));
|
||||
labels.push_back(ASCIIToUTF16("Address Line 2:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("Address"));
|
||||
labels.push_back(ASCIIToUTF16("Address Line 3:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
ExpectLabels(
|
||||
"<FORM name='TestForm' action='http://cnn.com' method='post'>"
|
||||
@ -4447,38 +4447,38 @@ TEST_F(FormAutofillTest, LabelsInferredWithSameName) {
|
||||
}
|
||||
|
||||
TEST_F(FormAutofillTest, LabelsInferredWithImageTags) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("dayphone1"));
|
||||
labels.push_back(ASCIIToUTF16("Phone:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("dayphone2"));
|
||||
labels.push_back(ASCIIToUTF16(""));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("dayphone3"));
|
||||
labels.push_back(ASCIIToUTF16(""));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("dayphone4"));
|
||||
labels.push_back(ASCIIToUTF16("ext.:"));
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16(""));
|
||||
name_attributes.push_back(ASCIIToUTF16("dummy"));
|
||||
labels.push_back(base::string16());
|
||||
labels.push_back(std::u16string());
|
||||
names.push_back(name_attributes.back());
|
||||
values.push_back(base::string16());
|
||||
values.push_back(std::u16string());
|
||||
|
||||
ExpectLabels(
|
||||
"<FORM name='TestForm' action='http://cnn.com' method='post'>"
|
||||
@ -5131,23 +5131,23 @@ TEST_F(FormAutofillTest, ClearOnlyAutofilledFieldsForUnownedForm) {
|
||||
|
||||
// If we have multiple labels per id, the labels concatenated into label string.
|
||||
TEST_F(FormAutofillTest, MultipleLabelsPerElement) {
|
||||
std::vector<base::string16> id_attributes, name_attributes, labels, names,
|
||||
std::vector<std::u16string> id_attributes, name_attributes, labels, names,
|
||||
values;
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("firstname"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("First Name:"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("John"));
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("lastname"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("Last Name:"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("Smith"));
|
||||
|
||||
id_attributes.push_back(ASCIIToUTF16("email"));
|
||||
name_attributes.push_back(base::string16());
|
||||
name_attributes.push_back(std::u16string());
|
||||
labels.push_back(ASCIIToUTF16("Email: xxx@yyy.com"));
|
||||
names.push_back(id_attributes.back());
|
||||
values.push_back(ASCIIToUTF16("john@example.com"));
|
||||
|
@ -279,7 +279,7 @@ void SetElementReadOnly(WebInputElement& element, bool read_only) {
|
||||
|
||||
bool FormHasFieldWithValue(const autofill::FormData& form,
|
||||
const std::string& value) {
|
||||
base::string16 value_16 = ASCIIToUTF16(value);
|
||||
std::u16string value_16 = ASCIIToUTF16(value);
|
||||
for (const auto& field : form.fields) {
|
||||
if (field.value == value_16)
|
||||
return true;
|
||||
@ -501,16 +501,16 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
|
||||
}
|
||||
|
||||
void SimulateSuggestionChoice(WebInputElement& username_input) {
|
||||
base::string16 username(ASCIIToUTF16(kAliceUsername));
|
||||
base::string16 password(ASCIIToUTF16(kAlicePassword));
|
||||
std::u16string username(ASCIIToUTF16(kAliceUsername));
|
||||
std::u16string password(ASCIIToUTF16(kAlicePassword));
|
||||
SimulateSuggestionChoiceOfUsernameAndPassword(username_input, username,
|
||||
password);
|
||||
}
|
||||
|
||||
void SimulateSuggestionChoiceOfUsernameAndPassword(
|
||||
WebInputElement& input,
|
||||
const base::string16& username,
|
||||
const base::string16& password) {
|
||||
const std::u16string& username,
|
||||
const std::u16string& password) {
|
||||
// This call is necessary to setup the autofill agent appropriate for the
|
||||
// user selection; simulates the menu actually popping up.
|
||||
SimulatePointClick(gfx::Point(1, 1));
|
||||
@ -640,7 +640,7 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
|
||||
|
||||
void ExpectFieldPropertiesMasks(
|
||||
PasswordFormSourceType expected_type,
|
||||
const std::map<base::string16, FieldPropertiesMask>&
|
||||
const std::map<std::u16string, FieldPropertiesMask>&
|
||||
expected_properties_masks,
|
||||
autofill::mojom::SubmissionIndicatorEvent expected_submission_event) {
|
||||
base::RunLoop().RunUntilIdle();
|
||||
@ -721,9 +721,9 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
|
||||
username_value, password_value, new_password_value, event);
|
||||
}
|
||||
|
||||
void CheckIfEventsAreCalled(const std::vector<base::string16>& checkers,
|
||||
void CheckIfEventsAreCalled(const std::vector<std::u16string>& checkers,
|
||||
bool expected) {
|
||||
for (const base::string16& variable : checkers) {
|
||||
for (const std::u16string& variable : checkers) {
|
||||
int value;
|
||||
EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(variable, &value))
|
||||
<< variable;
|
||||
@ -783,15 +783,15 @@ class PasswordAutofillAgentTest : public ChromeRenderViewTest {
|
||||
FakeMojoPasswordManagerDriver fake_driver_;
|
||||
testing::NiceMock<FakePasswordGenerationDriver> fake_pw_client_;
|
||||
|
||||
base::string16 username1_;
|
||||
base::string16 username2_;
|
||||
base::string16 username3_;
|
||||
base::string16 username4_;
|
||||
base::string16 password1_;
|
||||
base::string16 password2_;
|
||||
base::string16 password3_;
|
||||
base::string16 alternate_username3_;
|
||||
base::string16 password4_;
|
||||
std::u16string username1_;
|
||||
std::u16string username2_;
|
||||
std::u16string username3_;
|
||||
std::u16string username4_;
|
||||
std::u16string password1_;
|
||||
std::u16string password2_;
|
||||
std::u16string password3_;
|
||||
std::u16string alternate_username3_;
|
||||
std::u16string password4_;
|
||||
PasswordFormFillData fill_data_;
|
||||
|
||||
WebInputElement username_element_;
|
||||
@ -925,7 +925,7 @@ TEST_F(PasswordAutofillAgentTest, MetricsOnlyLoggedOnce) {
|
||||
// read-only field.
|
||||
TEST_F(PasswordAutofillAgentTest,
|
||||
AutocompletePasswordForReadonlyUsernamePrefixMatched) {
|
||||
base::string16 username_at = username3_ + base::UTF8ToUTF16("@example.com");
|
||||
std::u16string username_at = username3_ + base::UTF8ToUTF16("@example.com");
|
||||
username_element_.SetValue(WebString::FromUTF16(username_at));
|
||||
SetElementReadOnly(username_element_, true);
|
||||
|
||||
@ -966,7 +966,7 @@ TEST_F(PasswordAutofillAgentTest, NoFillingOnSignupForm_NoMetrics) {
|
||||
// of username in read-only field.
|
||||
TEST_F(PasswordAutofillAgentTest,
|
||||
DontAutocompletePasswordForReadonlyUsernamePrefixMatched) {
|
||||
base::string16 prefilled_username =
|
||||
std::u16string prefilled_username =
|
||||
username3_ + base::UTF8ToUTF16("example.com");
|
||||
username_element_.SetValue(WebString::FromUTF16(prefilled_username));
|
||||
SetElementReadOnly(username_element_, true);
|
||||
@ -986,7 +986,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
TEST_F(
|
||||
PasswordAutofillAgentTest,
|
||||
DontAutocompletePasswordForNotReadonlyUsernameFieldEvenWhenPrefixMatched) {
|
||||
base::string16 prefilled_username =
|
||||
std::u16string prefilled_username =
|
||||
username3_ + base::UTF8ToUTF16("@example.com");
|
||||
username_element_.SetValue(WebString::FromUTF16(prefilled_username));
|
||||
|
||||
@ -1321,8 +1321,8 @@ TEST_F(PasswordAutofillAgentTest, NoDOMActivationTest) {
|
||||
// are filled on page load.
|
||||
TEST_F(PasswordAutofillAgentTest,
|
||||
PasswordAutofillTriggersOnChangeEventsOnLoad) {
|
||||
std::vector<base::string16> username_event_checkers;
|
||||
std::vector<base::string16> password_event_checkers;
|
||||
std::vector<std::u16string> username_event_checkers;
|
||||
std::vector<std::u16string> password_event_checkers;
|
||||
std::string events_registration_script =
|
||||
CreateScriptToRegisterListeners(kUsernameName, &username_event_checkers) +
|
||||
CreateScriptToRegisterListeners(kPasswordName, &password_event_checkers);
|
||||
@ -1359,7 +1359,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
// are filled after page load.
|
||||
TEST_F(PasswordAutofillAgentTest,
|
||||
PasswordAutofillTriggersOnChangeEventsWaitForUsername) {
|
||||
std::vector<base::string16> event_checkers;
|
||||
std::vector<std::u16string> event_checkers;
|
||||
std::string events_registration_script =
|
||||
CreateScriptToRegisterListeners(kUsernameName, &event_checkers) +
|
||||
CreateScriptToRegisterListeners(kPasswordName, &event_checkers);
|
||||
@ -2245,7 +2245,7 @@ TEST_F(PasswordAutofillAgentTest, RememberFieldPropertiesOnSubmit) {
|
||||
|
||||
SaveAndSubmitForm();
|
||||
|
||||
std::map<base::string16, FieldPropertiesMask> expected_properties_masks;
|
||||
std::map<std::u16string, FieldPropertiesMask> expected_properties_masks;
|
||||
expected_properties_masks[ASCIIToUTF16("random_field")] =
|
||||
FieldPropertiesFlags::kHadFocus;
|
||||
expected_properties_masks[ASCIIToUTF16("username")] =
|
||||
@ -2289,7 +2289,7 @@ TEST_F(PasswordAutofillAgentTest, FixEmptyFieldPropertiesOnSubmit) {
|
||||
.To<WebFormElement>();
|
||||
SaveAndSubmitForm(form_element);
|
||||
|
||||
std::map<base::string16, FieldPropertiesMask> expected_properties_masks;
|
||||
std::map<std::u16string, FieldPropertiesMask> expected_properties_masks;
|
||||
expected_properties_masks[ASCIIToUTF16("new_username")] =
|
||||
FieldPropertiesFlags::kAutofilledOnPageLoad;
|
||||
expected_properties_masks[ASCIIToUTF16("new_password")] =
|
||||
@ -2316,7 +2316,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
|
||||
FireAjaxSucceeded();
|
||||
|
||||
std::map<base::string16, FieldPropertiesMask> expected_properties_masks;
|
||||
std::map<std::u16string, FieldPropertiesMask> expected_properties_masks;
|
||||
expected_properties_masks[ASCIIToUTF16("username")] =
|
||||
FieldPropertiesFlags::kUserTyped | FieldPropertiesFlags::kHadFocus;
|
||||
expected_properties_masks[ASCIIToUTF16("password")] =
|
||||
@ -2346,7 +2346,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
|
||||
base::RunLoop().RunUntilIdle();
|
||||
|
||||
std::map<base::string16, FieldPropertiesMask> expected_properties_masks;
|
||||
std::map<std::u16string, FieldPropertiesMask> expected_properties_masks;
|
||||
expected_properties_masks[ASCIIToUTF16("username")] =
|
||||
FieldPropertiesFlags::kUserTyped | FieldPropertiesFlags::kHadFocus;
|
||||
expected_properties_masks[ASCIIToUTF16("password")] =
|
||||
@ -2477,7 +2477,7 @@ TEST_F(PasswordAutofillAgentTest, ShowPopupOnEmptyPasswordField) {
|
||||
password_element_.SetAutofillState(WebAutofillState::kNotFilled);
|
||||
|
||||
SimulateSuggestionChoiceOfUsernameAndPassword(
|
||||
password_element_, base::string16(), ASCIIToUTF16(kAlicePassword));
|
||||
password_element_, std::u16string(), ASCIIToUTF16(kAlicePassword));
|
||||
CheckSuggestions(std::string(), true);
|
||||
EXPECT_EQ(ASCIIToUTF16(kAlicePassword), password_element_.Value().Utf16());
|
||||
EXPECT_TRUE(password_element_.IsAutofilled());
|
||||
@ -2502,7 +2502,7 @@ TEST_F(PasswordAutofillAgentTest, ShowPopupOnAutofilledPasswordField) {
|
||||
password_element_.SetAutofillState(WebAutofillState::kAutofilled);
|
||||
|
||||
SimulateSuggestionChoiceOfUsernameAndPassword(
|
||||
password_element_, base::string16(), ASCIIToUTF16(kAlicePassword));
|
||||
password_element_, std::u16string(), ASCIIToUTF16(kAlicePassword));
|
||||
CheckSuggestions(std::string(), true);
|
||||
EXPECT_EQ(ASCIIToUTF16(kAlicePassword), password_element_.Value().Utf16());
|
||||
EXPECT_TRUE(password_element_.IsAutofilled());
|
||||
@ -2528,7 +2528,7 @@ TEST_F(PasswordAutofillAgentTest, NotShowPopupPasswordField) {
|
||||
password_element_.SetAutofillState(WebAutofillState::kNotFilled);
|
||||
|
||||
SimulateSuggestionChoiceOfUsernameAndPassword(
|
||||
password_element_, base::string16(), ASCIIToUTF16(kAlicePassword));
|
||||
password_element_, std::u16string(), ASCIIToUTF16(kAlicePassword));
|
||||
EXPECT_CALL(fake_driver_, ShowPasswordSuggestions).Times(0);
|
||||
base::RunLoop().RunUntilIdle();
|
||||
}
|
||||
@ -2601,7 +2601,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
// generaiton pop-up. GeneratedPasswordAccepted can't be called without it.
|
||||
SimulateElementClick(kPasswordName);
|
||||
|
||||
base::string16 password = ASCIIToUTF16("NewPass22");
|
||||
std::u16string password = ASCIIToUTF16("NewPass22");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
|
||||
@ -2621,7 +2621,7 @@ TEST_F(PasswordAutofillAgentTest,
|
||||
// Simulate the user clicks on a password field, that leads to showing
|
||||
// generaiton pop-up. GeneratedPasswordAccepted can't be called without it.
|
||||
SimulateElementClick(kPasswordName);
|
||||
base::string16 password = ASCIIToUTF16("NewPass22");
|
||||
std::u16string password = ASCIIToUTF16("NewPass22");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
|
||||
|
@ -182,7 +182,7 @@ class PasswordGenerationAgentTest : public ChromeRenderViewTest {
|
||||
void ExpectGenerationElementLostFocus(const char* new_element_id);
|
||||
void ExpectFormClassifierVoteReceived(
|
||||
bool received,
|
||||
const base::string16& expected_generation_element);
|
||||
const std::u16string& expected_generation_element);
|
||||
void SelectGenerationFallbackAndExpect(bool available);
|
||||
|
||||
void BindPasswordManagerDriver(mojo::ScopedInterfaceEndpointHandle handle);
|
||||
@ -303,7 +303,7 @@ void PasswordGenerationAgentTest::ExpectGenerationElementLostFocus(
|
||||
|
||||
void PasswordGenerationAgentTest::ExpectFormClassifierVoteReceived(
|
||||
bool received,
|
||||
const base::string16& expected_generation_element) {
|
||||
const std::u16string& expected_generation_element) {
|
||||
base::RunLoop().RunUntilIdle();
|
||||
if (received) {
|
||||
ASSERT_TRUE(fake_driver_.called_save_generation_field());
|
||||
@ -441,7 +441,7 @@ TEST_F(PasswordGenerationAgentTest, DetectionTestNoForm) {
|
||||
|
||||
TEST_F(PasswordGenerationAgentTest, FillTest) {
|
||||
// Add event listeners for password fields.
|
||||
std::vector<base::string16> variables_to_check;
|
||||
std::vector<std::u16string> variables_to_check;
|
||||
std::string events_registration_script =
|
||||
CreateScriptToRegisterListeners("first_password", &variables_to_check) +
|
||||
CreateScriptToRegisterListeners("second_password", &variables_to_check);
|
||||
@ -470,7 +470,7 @@ TEST_F(PasswordGenerationAgentTest, FillTest) {
|
||||
EXPECT_TRUE(first_password_element.Value().IsNull());
|
||||
EXPECT_TRUE(second_password_element.Value().IsNull());
|
||||
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
@ -482,7 +482,7 @@ TEST_F(PasswordGenerationAgentTest, FillTest) {
|
||||
EXPECT_TRUE(second_password_element.IsAutofilled());
|
||||
|
||||
// Make sure all events are called.
|
||||
for (const base::string16& variable : variables_to_check) {
|
||||
for (const std::u16string& variable : variables_to_check) {
|
||||
int value;
|
||||
EXPECT_TRUE(ExecuteJavaScriptAndReturnIntValue(variable, &value));
|
||||
EXPECT_EQ(1, value) << variable;
|
||||
@ -511,7 +511,7 @@ TEST_F(PasswordGenerationAgentTest, EditingTest) {
|
||||
ASSERT_FALSE(element.IsNull());
|
||||
WebInputElement second_password_element = element.To<WebInputElement>();
|
||||
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
@ -522,7 +522,7 @@ TEST_F(PasswordGenerationAgentTest, EditingTest) {
|
||||
|
||||
// After editing the first field they are still the same.
|
||||
std::string edited_password_ascii = "edited_password";
|
||||
base::string16 edited_password = base::ASCIIToUTF16(edited_password_ascii);
|
||||
std::u16string edited_password = base::ASCIIToUTF16(edited_password_ascii);
|
||||
EXPECT_CALL(fake_pw_client_,
|
||||
PresaveGeneratedPassword(_, Eq(edited_password)));
|
||||
EXPECT_CALL(fake_pw_client_, ShowPasswordEditingPopup(_, _, _, _));
|
||||
@ -545,17 +545,17 @@ TEST_F(PasswordGenerationAgentTest, EditingTest) {
|
||||
EXPECT_CALL(fake_pw_client_, PasswordNoLongerGenerated(_));
|
||||
EXPECT_CALL(fake_pw_client_, AutomaticGenerationAvailable(_));
|
||||
SimulateUserInputChangeForElement(&first_password_element, std::string());
|
||||
EXPECT_EQ(base::string16(), first_password_element.Value().Utf16());
|
||||
EXPECT_EQ(base::string16(), second_password_element.Value().Utf16());
|
||||
EXPECT_EQ(std::u16string(), first_password_element.Value().Utf16());
|
||||
EXPECT_EQ(std::u16string(), second_password_element.Value().Utf16());
|
||||
EXPECT_FALSE(first_password_element.IsAutofilled());
|
||||
EXPECT_FALSE(second_password_element.IsAutofilled());
|
||||
ASSERT_TRUE(fake_driver_.form_data_maybe_submitted().has_value());
|
||||
EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(),
|
||||
"first_password"),
|
||||
testing::Field(&FormFieldData::value, base::string16()));
|
||||
testing::Field(&FormFieldData::value, std::u16string()));
|
||||
EXPECT_THAT(FindFieldById(*fake_driver_.form_data_maybe_submitted(),
|
||||
"second_password"),
|
||||
testing::Field(&FormFieldData::value, base::string16()));
|
||||
testing::Field(&FormFieldData::value, std::u16string()));
|
||||
}
|
||||
|
||||
TEST_F(PasswordGenerationAgentTest, EditingEventsTest) {
|
||||
@ -566,7 +566,7 @@ TEST_F(PasswordGenerationAgentTest, EditingEventsTest) {
|
||||
|
||||
// Generate password.
|
||||
ExpectAutomaticGenerationAvailable("first_password", kAvailable);
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
fake_pw_client_.Flush();
|
||||
@ -698,7 +698,7 @@ TEST_F(PasswordGenerationAgentTest, MinimumLengthForEditedPassword) {
|
||||
ExpectAutomaticGenerationAvailable("first_password", kAvailable);
|
||||
|
||||
// Generate a new password.
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
@ -736,8 +736,8 @@ TEST_F(PasswordGenerationAgentTest, MinimumLengthForEditedPassword) {
|
||||
element = document.GetElementById(WebString::FromUTF8("second_password"));
|
||||
ASSERT_FALSE(element.IsNull());
|
||||
WebInputElement second_password_element = element.To<WebInputElement>();
|
||||
EXPECT_NE(base::string16(), first_password_element.Value().Utf16());
|
||||
EXPECT_EQ(base::string16(), second_password_element.Value().Utf16());
|
||||
EXPECT_NE(std::u16string(), first_password_element.Value().Utf16());
|
||||
EXPECT_EQ(std::u16string(), second_password_element.Value().Utf16());
|
||||
}
|
||||
|
||||
TEST_F(PasswordGenerationAgentTest, DynamicFormTest) {
|
||||
@ -853,7 +853,7 @@ TEST_F(PasswordGenerationAgentTest, ManualGenerationNoIds) {
|
||||
SelectGenerationFallbackAndExpect(true);
|
||||
|
||||
// Simulate that the user accepts a generated password.
|
||||
base::string16 password = ASCIIToUTF16("random_password");
|
||||
std::u16string password = ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
|
||||
@ -888,7 +888,7 @@ TEST_F(PasswordGenerationAgentTest, PresavingGeneratedPassword) {
|
||||
SimulateElementRightClick(test_case.generation_element);
|
||||
SelectGenerationFallbackAndExpect(true);
|
||||
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
base::RunLoop().RunUntilIdle();
|
||||
@ -928,7 +928,7 @@ TEST_F(PasswordGenerationAgentTest, FallbackForSaving) {
|
||||
SimulateElementRightClick("first_password");
|
||||
SelectGenerationFallbackAndExpect(true);
|
||||
EXPECT_EQ(0, fake_driver_.called_inform_about_user_input_count());
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)))
|
||||
.WillOnce(testing::InvokeWithoutArgs([this]() {
|
||||
// Make sure that generation event was propagated to the browser before
|
||||
@ -946,7 +946,7 @@ TEST_F(PasswordGenerationAgentTest, FallbackForSaving) {
|
||||
TEST_F(PasswordGenerationAgentTest, FormClassifierDisabled) {
|
||||
LoadHTMLWithUserGesture(kSigninFormHTML);
|
||||
ExpectFormClassifierVoteReceived(false /* vote is not expected */,
|
||||
base::string16());
|
||||
std::u16string());
|
||||
}
|
||||
|
||||
TEST_F(PasswordGenerationAgentTest, RevealPassword) {
|
||||
@ -961,7 +961,7 @@ TEST_F(PasswordGenerationAgentTest, RevealPassword) {
|
||||
const char* kTextFieldId = "username";
|
||||
|
||||
ExpectAutomaticGenerationAvailable(kGenerationElementId, kAvailable);
|
||||
base::string16 password = base::ASCIIToUTF16("long_pwd");
|
||||
std::u16string password = base::ASCIIToUTF16("long_pwd");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
|
||||
@ -998,7 +998,7 @@ TEST_F(PasswordGenerationAgentTest, JavascriptClearedTheField) {
|
||||
|
||||
const char kGenerationElementId[] = "first_password";
|
||||
ExpectAutomaticGenerationAvailable(kGenerationElementId, kAvailable);
|
||||
base::string16 password = base::ASCIIToUTF16("long_pwd");
|
||||
std::u16string password = base::ASCIIToUTF16("long_pwd");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
|
||||
@ -1066,7 +1066,7 @@ TEST_F(PasswordGenerationAgentTest, PasswordUnmaskedUntilCompleteDeletion) {
|
||||
|
||||
// Generate a new password.
|
||||
ExpectAutomaticGenerationAvailable(kGenerationElementId, kAvailable);
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
fake_pw_client_.Flush();
|
||||
@ -1118,7 +1118,7 @@ TEST_F(PasswordGenerationAgentTest, ShortPasswordMaskedAfterChangingFocus) {
|
||||
|
||||
// Generate a new password.
|
||||
ExpectAutomaticGenerationAvailable(kGenerationElementId, kAvailable);
|
||||
base::string16 password = base::ASCIIToUTF16("random_password");
|
||||
std::u16string password = base::ASCIIToUTF16("random_password");
|
||||
EXPECT_CALL(fake_pw_client_, PresaveGeneratedPassword(_, Eq(password)));
|
||||
password_generation_->GeneratedPasswordAccepted(password);
|
||||
fake_pw_client_.Flush();
|
||||
|
@ -62,7 +62,7 @@ void SetFoundFormEligibleForGeneration(
|
||||
// |variables_to_check| are set to 1.
|
||||
std::string CreateScriptToRegisterListeners(
|
||||
const char* const element_name,
|
||||
std::vector<base::string16>* variables_to_check) {
|
||||
std::vector<std::u16string>* variables_to_check) {
|
||||
DCHECK(variables_to_check);
|
||||
std::string element = element_name;
|
||||
|
||||
|
@ -28,7 +28,7 @@ void SetFoundFormEligibleForGeneration(
|
||||
|
||||
std::string CreateScriptToRegisterListeners(
|
||||
const char* const element_name,
|
||||
std::vector<base::string16>* variables_to_check);
|
||||
std::vector<std::u16string>* variables_to_check);
|
||||
|
||||
} // namespace autofill
|
||||
|
||||
|
@ -440,7 +440,7 @@ IN_PROC_BROWSER_TEST_F(CommerceHintAgentTest, MultipleProfiles) {
|
||||
base::RunLoop run_loop;
|
||||
profile_manager->CreateProfileAsync(
|
||||
profile_path2, base::BindRepeating(&UnblockOnProfileCreation, &run_loop),
|
||||
base::string16(), std::string());
|
||||
std::u16string(), std::string());
|
||||
run_loop.Run();
|
||||
ASSERT_EQ(profile_manager->GetNumberOfProfiles(), 2U);
|
||||
|
||||
|
@ -800,7 +800,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
const chrome::mojom::PluginInfo& plugin_info) {
|
||||
const WebPluginInfo& info = plugin_info.plugin;
|
||||
const std::string& actual_mime_type = plugin_info.actual_mime_type;
|
||||
const base::string16& group_name = plugin_info.group_name;
|
||||
const std::u16string& group_name = plugin_info.group_name;
|
||||
const std::string& identifier = plugin_info.group_identifier;
|
||||
chrome::mojom::PluginStatus status = plugin_info.status;
|
||||
GURL url(original_params.url);
|
||||
@ -870,7 +870,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
|
||||
|
||||
auto create_blocked_plugin = [&render_frame, ¶ms, &info, &identifier,
|
||||
&group_name](int template_id,
|
||||
const base::string16& message) {
|
||||
const std::u16string& message) {
|
||||
return ChromePluginPlaceholder::CreateBlockedPlugin(
|
||||
render_frame, params, info, identifier, group_name, template_id,
|
||||
message);
|
||||
@ -1113,7 +1113,7 @@ GURL ChromeContentRendererClient::GetNaClContentHandlerURL(
|
||||
const content::WebPluginInfo& plugin) {
|
||||
// Look for the manifest URL among the MIME type's additonal parameters.
|
||||
const char kNaClPluginManifestAttribute[] = "nacl";
|
||||
base::string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute);
|
||||
std::u16string nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute);
|
||||
for (size_t i = 0; i < plugin.mime_types.size(); ++i) {
|
||||
if (plugin.mime_types[i].mime_type == actual_mime_type) {
|
||||
for (const auto& p : plugin.mime_types[i].additional_params) {
|
||||
@ -1423,7 +1423,7 @@ bool ChromeContentRendererClient::IsKeySystemsUpdateNeeded() {
|
||||
}
|
||||
|
||||
bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource(
|
||||
const base::string16& source) {
|
||||
const std::u16string& source) {
|
||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||
return extensions::IsSourceFromAnExtension(source);
|
||||
#else
|
||||
|
@ -140,7 +140,7 @@ class ChromeContentRendererClient
|
||||
std::unique_ptr<blink::WebSocketHandshakeThrottleProvider>
|
||||
CreateWebSocketHandshakeThrottleProvider() override;
|
||||
bool ShouldReportDetailedMessageForSource(
|
||||
const base::string16& source) override;
|
||||
const std::u16string& source) override;
|
||||
std::unique_ptr<blink::WebContentSettingsClient>
|
||||
CreateWorkerContentSettingsClient(
|
||||
content::RenderFrame* render_frame) override;
|
||||
|
@ -284,7 +284,7 @@ void ChromeRenderFrameObserver::SetWindowFeatures(
|
||||
}
|
||||
|
||||
void ChromeRenderFrameObserver::ExecuteWebUIJavaScript(
|
||||
const base::string16& javascript) {
|
||||
const std::u16string& javascript) {
|
||||
#if !defined(OS_ANDROID)
|
||||
webui_javascript_.push_back(javascript);
|
||||
#endif
|
||||
@ -493,7 +493,7 @@ void ChromeRenderFrameObserver::CapturePageText(
|
||||
}
|
||||
DCHECK_GT(capture_max_size, 0U);
|
||||
|
||||
base::string16 contents;
|
||||
std::u16string contents;
|
||||
{
|
||||
SCOPED_UMA_HISTOGRAM_TIMER(kTranslateCaptureText);
|
||||
TRACE_EVENT0("renderer", "ChromeRenderFrameObserver::CapturePageText");
|
||||
|
@ -81,7 +81,7 @@ class ChromeRenderFrameObserver : public content::RenderFrameObserver,
|
||||
// chrome::mojom::ChromeRenderFrame:
|
||||
void SetWindowFeatures(
|
||||
blink::mojom::WindowFeaturesPtr window_features) override;
|
||||
void ExecuteWebUIJavaScript(const base::string16& javascript) override;
|
||||
void ExecuteWebUIJavaScript(const std::u16string& javascript) override;
|
||||
void RequestImageForContextNode(
|
||||
int32_t thumbnail_min_area_pixels,
|
||||
const gfx::Size& thumbnail_max_size_pixels,
|
||||
@ -140,7 +140,7 @@ class ChromeRenderFrameObserver : public content::RenderFrameObserver,
|
||||
|
||||
#if !defined(OS_ANDROID)
|
||||
// Save the JavaScript to preload if ExecuteWebUIJavaScript is invoked.
|
||||
std::vector<base::string16> webui_javascript_;
|
||||
std::vector<std::u16string> webui_javascript_;
|
||||
#endif
|
||||
|
||||
mojo::AssociatedReceiverSet<chrome::mojom::ChromeRenderFrame> receivers_;
|
||||
|
@ -75,7 +75,7 @@ class TestOptGuideConsumer
|
||||
TestOptGuideConsumer() = default;
|
||||
~TestOptGuideConsumer() override = default;
|
||||
|
||||
base::string16 text() const { return base::StrCat(chunks_); }
|
||||
std::u16string text() const { return base::StrCat(chunks_); }
|
||||
bool on_chunks_end_called() const { return on_chunks_end_called_; }
|
||||
size_t num_chunks() const { return chunks_.size(); }
|
||||
|
||||
@ -85,7 +85,7 @@ class TestOptGuideConsumer
|
||||
}
|
||||
|
||||
// optimization_guide::mojom::PageTextConsumer:
|
||||
void OnTextDumpChunk(const base::string16& chunk) override {
|
||||
void OnTextDumpChunk(const std::u16string& chunk) override {
|
||||
ASSERT_FALSE(on_chunks_end_called_);
|
||||
chunks_.push_back(chunk);
|
||||
}
|
||||
@ -94,7 +94,7 @@ class TestOptGuideConsumer
|
||||
|
||||
private:
|
||||
mojo::Receiver<optimization_guide::mojom::PageTextConsumer> receiver_{this};
|
||||
std::vector<base::string16> chunks_;
|
||||
std::vector<std::u16string> chunks_;
|
||||
bool on_chunks_end_called_ = false;
|
||||
};
|
||||
|
||||
|
@ -34,7 +34,7 @@ using chrome::mojom::AvailableContentType;
|
||||
// characters. Additionally, javascript needs UTF16 strings. So we instead
|
||||
// encode to UTF16, and then store that data as base64.
|
||||
std::string ConvertToUTF16Base64(const std::string& text) {
|
||||
base::string16 text_utf16 = base::UTF8ToUTF16(text);
|
||||
std::u16string text_utf16 = base::UTF8ToUTF16(text);
|
||||
std::string utf16_bytes;
|
||||
for (char16_t c : text_utf16) {
|
||||
utf16_bytes.push_back(static_cast<char>(c >> 8));
|
||||
|
@ -283,7 +283,7 @@ LocalizedError::PageState NetErrorHelper::UpdateErrorPage(
|
||||
|
||||
std::string js = "if (window.updateForDnsProbe) "
|
||||
"updateForDnsProbe(" + json + ");";
|
||||
base::string16 js16;
|
||||
std::u16string js16;
|
||||
if (base::UTF8ToUTF16(js.c_str(), js.length(), &js16)) {
|
||||
render_frame()->ExecuteJavaScript(js16);
|
||||
} else {
|
||||
@ -297,7 +297,7 @@ void NetErrorHelper::InitializeErrorPageEasterEggHighScore(int high_score) {
|
||||
"if (window.initializeEasterEggHighScore) "
|
||||
"initializeEasterEggHighScore(%i);",
|
||||
high_score);
|
||||
base::string16 js16;
|
||||
std::u16string js16;
|
||||
if (!base::UTF8ToUTF16(js.c_str(), js.length(), &js16)) {
|
||||
NOTREACHED();
|
||||
return;
|
||||
|
@ -95,7 +95,7 @@ ChromePluginPlaceholder::ChromePluginPlaceholder(
|
||||
content::RenderFrame* render_frame,
|
||||
const blink::WebPluginParams& params,
|
||||
const std::string& html_data,
|
||||
const base::string16& title)
|
||||
const std::u16string& title)
|
||||
: plugins::LoadablePluginPlaceholder(render_frame, params, html_data),
|
||||
status_(chrome::mojom::PluginStatus::kAllowed),
|
||||
title_(title) {
|
||||
@ -152,9 +152,9 @@ ChromePluginPlaceholder* ChromePluginPlaceholder::CreateBlockedPlugin(
|
||||
const blink::WebPluginParams& params,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& identifier,
|
||||
const base::string16& name,
|
||||
const std::u16string& name,
|
||||
int template_id,
|
||||
const base::string16& message) {
|
||||
const std::u16string& message) {
|
||||
base::DictionaryValue values;
|
||||
values.SetString("message", message);
|
||||
values.SetString("name", name);
|
||||
|
@ -33,9 +33,9 @@ class ChromePluginPlaceholder final
|
||||
const blink::WebPluginParams& params,
|
||||
const content::WebPluginInfo& info,
|
||||
const std::string& identifier,
|
||||
const base::string16& name,
|
||||
const std::u16string& name,
|
||||
int resource_id,
|
||||
const base::string16& message);
|
||||
const std::u16string& message);
|
||||
|
||||
// Creates a new WebViewPlugin with a MissingPlugin as a delegate.
|
||||
static ChromePluginPlaceholder* CreateLoadableMissingPlugin(
|
||||
@ -55,7 +55,7 @@ class ChromePluginPlaceholder final
|
||||
ChromePluginPlaceholder(content::RenderFrame* render_frame,
|
||||
const blink::WebPluginParams& params,
|
||||
const std::string& html_data,
|
||||
const base::string16& title);
|
||||
const std::u16string& title);
|
||||
~ChromePluginPlaceholder() override;
|
||||
|
||||
// content::LoadablePluginPlaceholder overrides.
|
||||
@ -92,9 +92,9 @@ class ChromePluginPlaceholder final
|
||||
|
||||
chrome::mojom::PluginStatus status_;
|
||||
|
||||
base::string16 title_;
|
||||
std::u16string title_;
|
||||
|
||||
base::string16 plugin_name_;
|
||||
std::u16string plugin_name_;
|
||||
|
||||
mojo::Receiver<chrome::mojom::PluginRenderer> plugin_renderer_receiver_{this};
|
||||
|
||||
|
@ -121,7 +121,7 @@ class PhishingClassifierTest : public ChromeRenderViewTest {
|
||||
}
|
||||
|
||||
// Helper method to start phishing classification.
|
||||
void RunPhishingClassifier(const base::string16* page_text) {
|
||||
void RunPhishingClassifier(const std::u16string* page_text) {
|
||||
feature_map_.Clear();
|
||||
|
||||
classifier_->BeginClassification(
|
||||
@ -166,7 +166,7 @@ class PhishingClassifierTest : public ChromeRenderViewTest {
|
||||
const std::string url_tld_token_net_;
|
||||
const std::string page_link_domain_phishing_;
|
||||
const std::string page_term_login_;
|
||||
base::string16 page_text_;
|
||||
std::u16string page_text_;
|
||||
|
||||
// Outputs of phishing classifier.
|
||||
FeatureMap feature_map_;
|
||||
|
@ -41,7 +41,7 @@ class MockPhishingClassifier : public PhishingClassifier {
|
||||
|
||||
~MockPhishingClassifier() override {}
|
||||
|
||||
MOCK_METHOD2(BeginClassification, void(const base::string16*, DoneCallback));
|
||||
MOCK_METHOD2(BeginClassification, void(const std::u16string*, DoneCallback));
|
||||
MOCK_METHOD0(CancelPendingClassification, void());
|
||||
|
||||
private:
|
||||
@ -120,7 +120,7 @@ TEST_F(PhishingClassifierDelegateTest, Navigation) {
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
|
||||
OnStartPhishingDetection(url);
|
||||
base::string16 page_text = ASCIIToUTF16("dummy");
|
||||
std::u16string page_text = ASCIIToUTF16("dummy");
|
||||
{
|
||||
InSequence s;
|
||||
EXPECT_CALL(*classifier_, CancelPendingClassification());
|
||||
@ -254,7 +254,7 @@ TEST_F(PhishingClassifierDelegateTest, NoScorer) {
|
||||
|
||||
// Queue up a pending classification, cancel it, then queue up another one.
|
||||
GURL url("http://host.test");
|
||||
base::string16 page_text = ASCIIToUTF16("dummy");
|
||||
std::u16string page_text = ASCIIToUTF16("dummy");
|
||||
LoadHTMLWithUrlOverride("dummy", url.spec().c_str());
|
||||
OnStartPhishingDetection(url);
|
||||
delegate_->PageCaptured(&page_text, false);
|
||||
@ -293,7 +293,7 @@ TEST_F(PhishingClassifierDelegateTest, NoScorer_Ref) {
|
||||
|
||||
// Queue up a pending classification, cancel it, then queue up another one.
|
||||
GURL url("http://host.test");
|
||||
base::string16 page_text = ASCIIToUTF16("dummy");
|
||||
std::u16string page_text = ASCIIToUTF16("dummy");
|
||||
LoadHTMLWithUrlOverride("dummy", url.spec().c_str());
|
||||
OnStartPhishingDetection(url);
|
||||
delegate_->PageCaptured(&page_text, false);
|
||||
@ -335,7 +335,7 @@ TEST_F(PhishingClassifierDelegateTest, NoStartPhishingDetection) {
|
||||
LoadHTMLWithUrlOverride("<html><body>phish</body></html>",
|
||||
url.spec().c_str());
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
base::string16 page_text = ASCIIToUTF16("phish");
|
||||
std::u16string page_text = ASCIIToUTF16("phish");
|
||||
EXPECT_CALL(*classifier_, CancelPendingClassification());
|
||||
delegate_->PageCaptured(&page_text, false);
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
@ -410,7 +410,7 @@ TEST_F(PhishingClassifierDelegateTest, IgnorePreliminaryCapture) {
|
||||
url.spec().c_str());
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
OnStartPhishingDetection(url);
|
||||
base::string16 page_text = ASCIIToUTF16("phish");
|
||||
std::u16string page_text = ASCIIToUTF16("phish");
|
||||
delegate_->PageCaptured(&page_text, true);
|
||||
|
||||
// Once the non-preliminary capture happens, classification should begin.
|
||||
@ -440,7 +440,7 @@ TEST_F(PhishingClassifierDelegateTest, DuplicatePageCapture) {
|
||||
url.spec().c_str());
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
OnStartPhishingDetection(url);
|
||||
base::string16 page_text = ASCIIToUTF16("phish");
|
||||
std::u16string page_text = ASCIIToUTF16("phish");
|
||||
{
|
||||
InSequence s;
|
||||
EXPECT_CALL(*classifier_, CancelPendingClassification());
|
||||
@ -471,7 +471,7 @@ TEST_F(PhishingClassifierDelegateTest, PhishingDetectionDone) {
|
||||
LoadHTMLWithUrlOverride("<html><body>phish</body></html>",
|
||||
url.spec().c_str());
|
||||
Mock::VerifyAndClearExpectations(classifier_);
|
||||
base::string16 page_text = ASCIIToUTF16("phish");
|
||||
std::u16string page_text = ASCIIToUTF16("phish");
|
||||
OnStartPhishingDetection(url);
|
||||
{
|
||||
InSequence s;
|
||||
|
@ -285,7 +285,7 @@ const NtpTheme* SearchBox::GetNtpTheme() const {
|
||||
return base::OptionalOrNullptr(theme_);
|
||||
}
|
||||
|
||||
void SearchBox::Paste(const base::string16& text) {
|
||||
void SearchBox::Paste(const std::u16string& text) {
|
||||
embedded_search_service_->PasteAndOpenDropdown(page_seq_no_, text);
|
||||
}
|
||||
|
||||
@ -438,7 +438,7 @@ void SearchBox::ConfirmThemeChanges() {
|
||||
embedded_search_service_->ConfirmThemeChanges();
|
||||
}
|
||||
|
||||
void SearchBox::QueryAutocomplete(const base::string16& input,
|
||||
void SearchBox::QueryAutocomplete(const std::u16string& input,
|
||||
bool prevent_inline_autocomplete) {
|
||||
embedded_search_service_->QueryAutocomplete(input,
|
||||
prevent_inline_autocomplete);
|
||||
|
@ -93,7 +93,7 @@ class SearchBox : public content::RenderFrameObserver,
|
||||
InstantMostVisitedItem* item) const;
|
||||
|
||||
// Sends PasteAndOpenDropdown to the browser.
|
||||
void Paste(const base::string16& text);
|
||||
void Paste(const std::u16string& text);
|
||||
|
||||
// Will return null if the theme info hasn't been set yet.
|
||||
const NtpTheme* GetNtpTheme() const;
|
||||
@ -194,7 +194,7 @@ class SearchBox : public content::RenderFrameObserver,
|
||||
// search term. |prevent_inline_autocomplete| is true if the result set should
|
||||
// not require inline autocomplete for the default match. Handled by
|
||||
// |QueryAutocompleteResult|.
|
||||
void QueryAutocomplete(const base::string16& input,
|
||||
void QueryAutocomplete(const std::u16string& input,
|
||||
bool prevent_inline_autocomplete);
|
||||
|
||||
// Deletes |AutocompleteMatch| by index of the result.
|
||||
|
@ -641,7 +641,7 @@ class SearchBoxBindings : public gin::Wrappable<SearchBoxBindings> {
|
||||
// Handlers for JS functions.
|
||||
static void DeleteAutocompleteMatch(int line);
|
||||
static void Paste(const std::string& text);
|
||||
static void QueryAutocomplete(const base::string16& input,
|
||||
static void QueryAutocomplete(const std::u16string& input,
|
||||
bool prevent_inline_autocomplete);
|
||||
static void StopAutocomplete(bool clear_result);
|
||||
static void LogCharTypedToRepaintLatency(uint32_t latency_ms);
|
||||
@ -757,7 +757,7 @@ void SearchBoxBindings::Paste(const std::string& text) {
|
||||
}
|
||||
|
||||
// static
|
||||
void SearchBoxBindings::QueryAutocomplete(const base::string16& input,
|
||||
void SearchBoxBindings::QueryAutocomplete(const std::u16string& input,
|
||||
bool prevent_inline_autocomplete) {
|
||||
SearchBox* search_box = GetSearchBoxForCurrentContext();
|
||||
if (!search_box)
|
||||
@ -1141,7 +1141,7 @@ void NewTabPageBindings::UpdateCustomLink(int rid,
|
||||
|
||||
// Limit the title to |kMaxCustomLinkTitleLength| characters. If truncated,
|
||||
// adds an ellipsis.
|
||||
base::string16 truncated_title =
|
||||
std::u16string truncated_title =
|
||||
gfx::TruncateString(base::UTF8ToUTF16(title), kMaxCustomLinkTitleLength,
|
||||
gfx::CHARACTER_BREAK);
|
||||
|
||||
|
@ -29,7 +29,7 @@ class SearchBoxExtension {
|
||||
|
||||
// Helpers to dispatch Javascript events.
|
||||
static void DispatchChromeIdentityCheckResult(blink::WebLocalFrame* frame,
|
||||
const base::string16& identity,
|
||||
const std::u16string& identity,
|
||||
bool identity_match);
|
||||
static void DispatchFocusChange(blink::WebLocalFrame* frame);
|
||||
static void DispatchAddCustomLinkResult(blink::WebLocalFrame* frame,
|
||||
|
@ -609,7 +609,7 @@ void CloudPrintConnector::OnReceivePrinterCaps(
|
||||
LOG(ERROR) << "CP_CONNECTOR: Failed to get printer info"
|
||||
<< ", printer name: " << printer_name;
|
||||
// This printer failed to register, notify the server of this failure.
|
||||
base::string16 printer_name_utf16 = base::UTF8ToUTF16(printer_name);
|
||||
std::u16string printer_name_utf16 = base::UTF8ToUTF16(printer_name);
|
||||
std::string status_message = l10n_util::GetStringFUTF8(
|
||||
IDS_CLOUD_PRINT_REGISTER_PRINTER_FAILED,
|
||||
printer_name_utf16,
|
||||
|
@ -293,7 +293,7 @@ class JobSpoolerWin : public PrintSystem::JobSpooler {
|
||||
}
|
||||
DOCINFO di = {0};
|
||||
di.cbSize = sizeof(DOCINFO);
|
||||
base::string16 doc_name = base::UTF8ToUTF16(job_title);
|
||||
std::u16string doc_name = base::UTF8ToUTF16(job_title);
|
||||
DCHECK(printing::SimplifyDocumentTitle(doc_name) == doc_name);
|
||||
di.lpszDocName = base::as_wcstr(doc_name);
|
||||
job_id_ = StartDoc(dc, &di);
|
||||
|
@ -769,7 +769,7 @@ void PrinterJobHandler::DoPrint(const JobDetails& job_details,
|
||||
base::Time::Now() - job_start_time_);
|
||||
DCHECK(job_spooler_.get());
|
||||
|
||||
base::string16 document_name =
|
||||
std::u16string document_name =
|
||||
job_details.job_title_.empty()
|
||||
? l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE)
|
||||
: base::UTF8ToUTF16(job_details.job_title_);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user