summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cloud_print/common/win/cloud_print_utils.cc12
-rw-r--r--cloud_print/common/win/cloud_print_utils.h6
-rw-r--r--cloud_print/common/win/install_utils.cc21
-rw-r--r--cloud_print/common/win/install_utils.h17
-rw-r--r--cloud_print/service/win/chrome_launcher.cc2
-rw-r--r--cloud_print/service/win/cloud_print_service.cc21
-rw-r--r--cloud_print/service/win/cloud_print_service_config.cc31
-rw-r--r--cloud_print/service/win/local_security_policy.cc11
-rw-r--r--cloud_print/service/win/local_security_policy.h7
-rw-r--r--cloud_print/service/win/service_controller.cc18
-rw-r--r--cloud_print/service/win/service_controller.h18
-rw-r--r--cloud_print/service/win/service_utils.cc14
-rw-r--r--cloud_print/service/win/service_utils.h4
-rw-r--r--cloud_print/service/win/setup_listener.cc8
-rw-r--r--cloud_print/service/win/setup_listener.h8
-rw-r--r--cloud_print/virtual_driver/win/install/setup.cc20
-rw-r--r--cloud_print/virtual_driver/win/port_monitor/port_monitor.cc10
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver_helpers.cc9
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver_helpers.h5
-rw-r--r--components/autofill/content/browser/wallet/wallet_address.cc56
-rw-r--r--components/autofill/core/browser/autocomplete_history_manager.cc2
-rw-r--r--components/autofill/core/browser/phone_field_unittest.cc6
-rw-r--r--components/autofill/core/browser/validation.cc4
-rw-r--r--components/autofill/core/browser/validation.h2
-rw-r--r--components/autofill/core/common/form_field_data.cc2
-rw-r--r--components/autofill/core/common/password_form.h18
-rw-r--r--components/breakpad/app/hard_error_handler_win.cc2
-rw-r--r--components/dom_distiller/content/distiller_page_web_contents.cc15
-rw-r--r--components/dom_distiller/content/distiller_page_web_contents.h2
-rw-r--r--components/plugins/renderer/plugin_placeholder.cc2
-rw-r--r--components/plugins/renderer/plugin_placeholder.h4
-rw-r--r--components/policy/core/browser/policy_error_map.cc8
-rw-r--r--components/policy/core/browser/policy_error_map.h4
-rw-r--r--components/policy/core/common/registry_dict_win.cc2
-rw-r--r--components/policy/core/common/registry_dict_win.h2
-rw-r--r--components/sessions/serialized_navigation_entry.cc6
-rw-r--r--components/sessions/serialized_navigation_entry.h8
-rw-r--r--components/sessions/serialized_navigation_entry_unittest.cc6
-rw-r--r--components/webdata/common/web_data_results.h2
-rw-r--r--components/wifi/wifi_service_win.cc2
40 files changed, 203 insertions, 194 deletions
diff --git a/cloud_print/common/win/cloud_print_utils.cc b/cloud_print/common/win/cloud_print_utils.cc
index 71c9b53..ee30964 100644
--- a/cloud_print/common/win/cloud_print_utils.cc
+++ b/cloud_print/common/win/cloud_print_utils.cc
@@ -23,7 +23,7 @@ HRESULT GetLastHResult() {
return error_code ? HRESULT_FROM_WIN32(error_code) : E_FAIL;
}
-string16 LoadLocalString(DWORD id) {
+base::string16 LoadLocalString(DWORD id) {
static wchar_t dummy = L'\0';
HMODULE module = NULL;
::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT |
@@ -33,21 +33,21 @@ string16 LoadLocalString(DWORD id) {
// LPCWSTR* and assign pointer to read-only memory with resource.
int count = ::LoadString(module, id, reinterpret_cast<LPWSTR>(&buffer), 0);
if (!buffer)
- return string16();
- return string16(buffer, buffer + count);
+ return base::string16();
+ return base::string16(buffer, buffer + count);
}
-string16 GetErrorMessage(HRESULT hr) {
+base::string16 GetErrorMessage(HRESULT hr) {
LPWSTR buffer = NULL;
::FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_ALLOCATE_BUFFER,
0, hr, 0, reinterpret_cast<LPWSTR>(&buffer), 0, NULL);
- string16 result(buffer);
+ base::string16 result(buffer);
::LocalFree(buffer);
return result;
}
-void SetGoogleUpdateUsage(const string16& product_id) {
+void SetGoogleUpdateUsage(const base::string16& product_id) {
// Set appropriate key to 1 to let Omaha record usage.
base::win::RegKey key;
if (key.Create(HKEY_CURRENT_USER,
diff --git a/cloud_print/common/win/cloud_print_utils.h b/cloud_print/common/win/cloud_print_utils.h
index 7effa1b..bc9895c 100644
--- a/cloud_print/common/win/cloud_print_utils.h
+++ b/cloud_print/common/win/cloud_print_utils.h
@@ -15,14 +15,14 @@ namespace cloud_print {
HRESULT GetLastHResult();
// Convert an HRESULT to a localized string.
-string16 GetErrorMessage(HRESULT hr);
+base::string16 GetErrorMessage(HRESULT hr);
// Retrieves a string from the string table of the module that contains the
// calling code.
-string16 LoadLocalString(DWORD id);
+base::string16 LoadLocalString(DWORD id);
// Sets registry value to notify Google Update that product was used.
-void SetGoogleUpdateUsage(const string16& product_id);
+void SetGoogleUpdateUsage(const base::string16& product_id);
} // namespace cloud_print
diff --git a/cloud_print/common/win/install_utils.cc b/cloud_print/common/win/install_utils.cc
index 98a3e0d..38113ac 100644
--- a/cloud_print/common/win/install_utils.cc
+++ b/cloud_print/common/win/install_utils.cc
@@ -43,8 +43,8 @@ const wchar_t kNoRepair[] = L"NoRepair";
} // namespace
-void SetGoogleUpdateKeys(const string16& product_id,
- const string16& product_name) {
+void SetGoogleUpdateKeys(const base::string16& product_id,
+ const base::string16& product_name) {
base::win::RegKey key;
if (key.Create(HKEY_LOCAL_MACHINE,
(cloud_print::kClientsKey + product_id).c_str(),
@@ -53,7 +53,7 @@ void SetGoogleUpdateKeys(const string16& product_id,
}
// Get the version from the resource file.
- string16 version_string;
+ base::string16 version_string;
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfoForCurrentModule());
@@ -73,7 +73,8 @@ void SetGoogleUpdateKeys(const string16& product_id,
}
}
-void SetGoogleUpdateError(const string16& product_id, const string16& message) {
+void SetGoogleUpdateError(const base::string16& product_id,
+ const base::string16& message) {
LOG(ERROR) << message;
base::win::RegKey key;
if (key.Create(HKEY_LOCAL_MACHINE,
@@ -90,7 +91,7 @@ void SetGoogleUpdateError(const string16& product_id, const string16& message) {
}
}
-void DeleteGoogleUpdateKeys(const string16& product_id) {
+void DeleteGoogleUpdateKeys(const base::string16& product_id) {
base::win::RegKey key;
if (key.Open(HKEY_LOCAL_MACHINE,
(cloud_print::kClientsKey + product_id).c_str(),
@@ -103,8 +104,8 @@ void DeleteGoogleUpdateKeys(const string16& product_id) {
}
}
-void CreateUninstallKey(const string16& uninstall_id,
- const string16& product_name,
+void CreateUninstallKey(const base::string16& uninstall_id,
+ const base::string16& product_name,
const std::string& uninstall_switch) {
// Now write the Windows Uninstall entries
// Minimal error checking here since the install can continue
@@ -146,12 +147,12 @@ void CreateUninstallKey(const string16& uninstall_id,
key.WriteValue(kNoRepair, 1);
}
-void DeleteUninstallKey(const string16& uninstall_id) {
+void DeleteUninstallKey(const base::string16& uninstall_id) {
::RegDeleteKey(HKEY_LOCAL_MACHINE,
(cloud_print::kUninstallKey + uninstall_id).c_str());
}
-base::FilePath GetInstallLocation(const string16& uninstall_id) {
+base::FilePath GetInstallLocation(const base::string16& uninstall_id) {
base::win::RegKey key;
if (key.Open(HKEY_LOCAL_MACHINE,
(cloud_print::kUninstallKey + uninstall_id).c_str(),
@@ -159,7 +160,7 @@ base::FilePath GetInstallLocation(const string16& uninstall_id) {
// Not installed.
return base::FilePath();
}
- string16 install_path_value;
+ base::string16 install_path_value;
key.ReadValue(kInstallLocation, &install_path_value);
return base::FilePath(install_path_value);
}
diff --git a/cloud_print/common/win/install_utils.h b/cloud_print/common/win/install_utils.h
index 1e484cf..541b4d9 100644
--- a/cloud_print/common/win/install_utils.h
+++ b/cloud_print/common/win/install_utils.h
@@ -14,25 +14,26 @@
namespace cloud_print {
// Sets Google Update registry keys after install or update.
-void SetGoogleUpdateKeys(const string16& product_id,
- const string16& product_name);
+void SetGoogleUpdateKeys(const base::string16& product_id,
+ const base::string16& product_name);
// Sets custom error message to show by Google Update installer
-void SetGoogleUpdateError(const string16& product_id, const string16& message);
+void SetGoogleUpdateError(const base::string16& product_id,
+ const base::string16& message);
// Deletes Google Update reg keys on product uninstall.
-void DeleteGoogleUpdateKeys(const string16& product_id);
+void DeleteGoogleUpdateKeys(const base::string16& product_id);
// Creates control panel uninstall item.
-void CreateUninstallKey(const string16& uninstall_id,
- const string16& product_name,
+void CreateUninstallKey(const base::string16& uninstall_id,
+ const base::string16& product_name,
const std::string& uninstall_switch);
// Deletes control panel uninstall item.
-void DeleteUninstallKey(const string16& uninstall_id);
+void DeleteUninstallKey(const base::string16& uninstall_id);
// Returns install location retrieved from control panel uninstall key.
-base::FilePath GetInstallLocation(const string16& uninstall_id);
+base::FilePath GetInstallLocation(const base::string16& uninstall_id);
// Returns install location retrieved from control panel uninstall key.
void DeleteProgramDir(const std::string& delete_switch);
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 35d760e..7f3717e 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -159,7 +159,7 @@ void DeleteAutorunKeys(const base::FilePath& user_data_dir) {
base::win::RegKey key(HKEY_CURRENT_USER, kAutoRunKeyPath, KEY_SET_VALUE);
if (!key.Valid())
return;
- std::vector<string16> to_delete;
+ std::vector<base::string16> to_delete;
base::FilePath abs_user_data_dir = base::MakeAbsoluteFilePath(user_data_dir);
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index 32fbe80..e0998f0c 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -80,12 +80,12 @@ void InvalidUsage() {
std::cout << "\n";
}
-string16 GetOption(int string_id, const string16& default,
+base::string16 GetOption(int string_id, const base::string16& default,
bool secure) {
- string16 prompt_format = cloud_print::LoadLocalString(string_id) ;
- std::vector<string16> substitutions(1, default);
+ base::string16 prompt_format = cloud_print::LoadLocalString(string_id);
+ std::vector<base::string16> substitutions(1, default);
std::cout << ReplaceStringPlaceholders(prompt_format, substitutions, NULL);
- string16 tmp;
+ base::string16 tmp;
if (secure) {
DWORD saved_mode = 0;
// Don't close.
@@ -110,7 +110,7 @@ HRESULT ReportError(HRESULT hr, int string_id) {
return hr;
}
-string16 StateAsString(ServiceController::State state) {
+base::string16 StateAsString(ServiceController::State state) {
DWORD string_id = 0;
switch(state) {
case ServiceController::STATE_NOT_FOUND:
@@ -123,7 +123,7 @@ string16 StateAsString(ServiceController::State state) {
string_id = IDS_SERVICE_RUNNING;
break;
}
- return string_id ? cloud_print::LoadLocalString(string_id) : string16();
+ return string_id ? cloud_print::LoadLocalString(string_id) : base::string16();
}
} // namespace
@@ -214,8 +214,8 @@ class CloudPrintServiceModule
return controller_->UninstallService();
if (command_line.HasSwitch(kInstallSwitch)) {
- string16 run_as_user;
- string16 run_as_password;
+ base::string16 run_as_user;
+ base::string16 run_as_password;
base::FilePath user_data_dir;
std::vector<std::string> printers;
HRESULT hr = SelectWindowsAccount(&run_as_user, &run_as_password,
@@ -262,7 +262,8 @@ class CloudPrintServiceModule
return S_FALSE;
}
- HRESULT SelectWindowsAccount(string16* run_as_user, string16* run_as_password,
+ HRESULT SelectWindowsAccount(base::string16* run_as_user,
+ base::string16* run_as_password,
base::FilePath* user_data_dir,
std::vector<std::string>* printers) {
*run_as_user = GetCurrentUserName();
@@ -339,7 +340,7 @@ class CloudPrintServiceModule
LOG(INFO) << file.value() << ": " << contents;
- string16 message =
+ base::string16 message =
cloud_print::LoadLocalString(IDS_ADD_PRINTERS_USING_CHROME);
std::cout << "\n" << message.c_str() << "\n" ;
std::string new_contents =
diff --git a/cloud_print/service/win/cloud_print_service_config.cc b/cloud_print/service/win/cloud_print_service_config.cc
index ce31e19..d7321f2 100644
--- a/cloud_print/service/win/cloud_print_service_config.cc
+++ b/cloud_print/service/win/cloud_print_service_config.cc
@@ -77,15 +77,15 @@ class SetupDialog : public base::RefCounted<SetupDialog>,
// Disables all controls after users actions.
void DisableControls();
// Updates state of controls after when we received service status.
- void SetState(ServiceController::State state, const string16& user,
+ void SetState(ServiceController::State state, const base::string16& user,
bool is_logging_enabled);
// Show message box with error.
- void ShowErrorMessageBox(const string16& error_message);
+ void ShowErrorMessageBox(const base::string16& error_message);
// Show use message box instructions how to deal with opened Chrome window.
void AskToCloseChrome();
- string16 GetDlgItemText(int id) const;
- string16 GetUser() const;
- string16 GetPassword() const;
+ base::string16 GetDlgItemText(int id) const;
+ base::string16 GetUser() const;
+ base::string16 GetPassword() const;
bool IsLoggingEnabled() const;
bool IsInstalled() const {
return state_ > ServiceController::STATE_NOT_FOUND;
@@ -93,7 +93,7 @@ class SetupDialog : public base::RefCounted<SetupDialog>,
// IO Calls.
// Installs service.
- void Install(const string16& user, const string16& password,
+ void Install(const base::string16& user, const base::string16& password,
bool enable_logging);
// Starts service.
void Start();
@@ -106,7 +106,7 @@ class SetupDialog : public base::RefCounted<SetupDialog>,
// Posts task to UI thread to show error using string id.
void ShowError(int string_id);
// Posts task to UI thread to show error using string.
- void ShowError(const string16& error_message);
+ void ShowError(const base::string16& error_message);
// Posts task to UI thread to show error using error code.
void ShowError(HRESULT hr);
@@ -139,7 +139,7 @@ void SetupDialog::PostIOTask(const base::Closure& task) {
io_loop_->PostTask(FROM_HERE, task);
}
-void SetupDialog::ShowErrorMessageBox(const string16& error_message) {
+void SetupDialog::ShowErrorMessageBox(const base::string16& error_message) {
DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_UI));
MessageBox(error_message.c_str(),
LoadLocalString(IDS_OPERATION_FAILED_TITLE).c_str(),
@@ -154,7 +154,7 @@ void SetupDialog::AskToCloseChrome() {
}
void SetupDialog::SetState(ServiceController::State status,
- const string16& user,
+ const base::string16& user,
bool is_logging_enabled) {
DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_UI));
state_ = status;
@@ -282,19 +282,19 @@ void SetupDialog::DisableControls() {
GetDlgItem(IDC_LOGGING).EnableWindow(FALSE);
}
-string16 SetupDialog::GetDlgItemText(int id) const {
+base::string16 SetupDialog::GetDlgItemText(int id) const {
const ATL::CWindow& item = GetDlgItem(id);
size_t length = item.GetWindowTextLength();
- string16 result(length + 1, L'\0');
+ base::string16 result(length + 1, L'\0');
result.resize(item.GetWindowText(&result[0], result.size()));
return result;
}
-string16 SetupDialog::GetUser() const {
+base::string16 SetupDialog::GetUser() const {
return GetDlgItemText(IDC_USER);
}
-string16 SetupDialog::GetPassword() const{
+base::string16 SetupDialog::GetPassword() const {
return GetDlgItemText(IDC_PASSWORD);
}
@@ -309,7 +309,7 @@ void SetupDialog::UpdateState() {
controller_.user(), controller_.is_logging_enabled()));
}
-void SetupDialog::ShowError(const string16& error_message) {
+void SetupDialog::ShowError(const base::string16& error_message) {
DCHECK(base::MessageLoop::current()->IsType(base::MessageLoop::TYPE_IO));
PostUITask(base::Bind(&SetupDialog::SetState,
this,
@@ -329,7 +329,8 @@ void SetupDialog::ShowError(HRESULT hr) {
ShowError(GetErrorMessage(hr));
}
-void SetupDialog::Install(const string16& user, const string16& password,
+void SetupDialog::Install(const base::string16& user,
+ const base::string16& password,
bool enable_logging) {
// Don't forget to update state on exit.
base::ScopedClosureRunner scoped_update_status(
diff --git a/cloud_print/service/win/local_security_policy.cc b/cloud_print/service/win/local_security_policy.cc
index 44c4e95..874498d 100644
--- a/cloud_print/service/win/local_security_policy.cc
+++ b/cloud_print/service/win/local_security_policy.cc
@@ -76,8 +76,9 @@ bool LocalSecurityPolicy::Open() {
&policy_);
}
-bool LocalSecurityPolicy::IsPrivilegeSet(const string16& username,
- const string16& privilage) const {
+bool LocalSecurityPolicy::IsPrivilegeSet(
+ const base::string16& username,
+ const base::string16& privilage) const {
DCHECK(policy_);
ATL::CSid user_sid;
if (!user_sid.LoadAccount(username.c_str())) {
@@ -97,8 +98,8 @@ bool LocalSecurityPolicy::IsPrivilegeSet(const string16& username,
return false;
}
-bool LocalSecurityPolicy::SetPrivilege(const string16& username,
- const string16& privilage) {
+bool LocalSecurityPolicy::SetPrivilege(const base::string16& username,
+ const base::string16& privilage) {
DCHECK(policy_);
ATL::CSid user_sid;
if (!user_sid.LoadAccount(username.c_str())) {
@@ -106,7 +107,7 @@ bool LocalSecurityPolicy::SetPrivilege(const string16& username,
return false;
}
LSA_UNICODE_STRING privilege_string;
- string16 privilage_copy(privilage);
+ base::string16 privilage_copy(privilage);
privilege_string.Buffer = &privilage_copy[0];
privilege_string.Length = wcslen(privilege_string.Buffer) *
sizeof(privilege_string.Buffer[0]);
diff --git a/cloud_print/service/win/local_security_policy.h b/cloud_print/service/win/local_security_policy.h
index 3e800a7..a0c58a0 100644
--- a/cloud_print/service/win/local_security_policy.h
+++ b/cloud_print/service/win/local_security_policy.h
@@ -21,9 +21,10 @@ class LocalSecurityPolicy {
bool Open();
void Close();
- bool IsPrivilegeSet(const string16& username,
- const string16& privilage) const;
- bool SetPrivilege(const string16& username, const string16& privilage);
+ bool IsPrivilegeSet(const base::string16& username,
+ const base::string16& privilage) const;
+ bool SetPrivilege(const base::string16& username,
+ const base::string16& privilage);
private:
LSA_HANDLE policy_;
diff --git a/cloud_print/service/win/service_controller.cc b/cloud_print/service/win/service_controller.cc
index c4b35e4..bdfc44d 100644
--- a/cloud_print/service/win/service_controller.cc
+++ b/cloud_print/service/win/service_controller.cc
@@ -61,7 +61,7 @@ HRESULT OpenServiceManager(ServiceHandle* service_manager) {
return S_OK;
}
-HRESULT OpenService(const string16& name, DWORD access,
+HRESULT OpenService(const base::string16& name, DWORD access,
ServiceHandle* service) {
if (!service)
return E_POINTER;
@@ -129,8 +129,8 @@ base::FilePath ServiceController::GetBinary() const {
}
HRESULT ServiceController::InstallConnectorService(
- const string16& user,
- const string16& password,
+ const base::string16& user,
+ const base::string16& password,
const base::FilePath& user_data_dir,
bool enable_logging) {
return InstallService(user, password, true, kServiceSwitch, user_data_dir,
@@ -138,15 +138,15 @@ HRESULT ServiceController::InstallConnectorService(
}
HRESULT ServiceController::InstallCheckService(
- const string16& user,
- const string16& password,
+ const base::string16& user,
+ const base::string16& password,
const base::FilePath& user_data_dir) {
return InstallService(user, password, false, kRequirementsSwitch,
user_data_dir, true);
}
-HRESULT ServiceController::InstallService(const string16& user,
- const string16& password,
+HRESULT ServiceController::InstallService(const base::string16& user,
+ const base::string16& password,
bool auto_start,
const std::string& run_switch,
const base::FilePath& user_data_dir,
@@ -193,7 +193,7 @@ HRESULT ServiceController::InstallService(const string16& user,
if (FAILED(hr))
return hr;
- string16 display_name =
+ base::string16 display_name =
cloud_print::LoadLocalString(IDS_SERVICE_DISPLAY_NAME);
ServiceHandle service(
::CreateService(
@@ -209,7 +209,7 @@ HRESULT ServiceController::InstallService(const string16& user,
return cloud_print::GetLastHResult();
}
- string16 description_string =
+ base::string16 description_string =
cloud_print::LoadLocalString(IDS_SERVICE_DESCRIPTION);
SERVICE_DESCRIPTION description = {0};
description.lpDescription = const_cast<wchar_t*>(description_string.c_str());
diff --git a/cloud_print/service/win/service_controller.h b/cloud_print/service/win/service_controller.h
index 167b0c1..3b1781e 100644
--- a/cloud_print/service/win/service_controller.h
+++ b/cloud_print/service/win/service_controller.h
@@ -32,13 +32,13 @@ class ServiceController {
~ServiceController();
// Installs temporarily service to check pre-requirements.
- HRESULT InstallCheckService(const string16& user,
- const string16& password,
+ HRESULT InstallCheckService(const base::string16& user,
+ const base::string16& password,
const base::FilePath& user_data_dir);
// Installs real service that will run connector.
- HRESULT InstallConnectorService(const string16& user,
- const string16& password,
+ HRESULT InstallConnectorService(const base::string16& user,
+ const base::string16& password,
const base::FilePath& user_data_dir,
bool enable_logging);
@@ -52,22 +52,22 @@ class ServiceController {
// Query service status and options. Results accessible with getters below.
void UpdateState();
State state() const { return state_; }
- const string16& user() const { return user_; }
+ const base::string16& user() const { return user_; }
bool is_logging_enabled() const;
base::FilePath GetBinary() const;
private:
- HRESULT InstallService(const string16& user,
- const string16& password,
+ HRESULT InstallService(const base::string16& user,
+ const base::string16& password,
bool auto_start,
const std::string& run_switch,
const base::FilePath& user_data_dir,
bool enable_logging);
- const string16 name_;
+ const base::string16 name_;
State state_;
- string16 user_;
+ base::string16 user_;
bool is_logging_enabled_;
CommandLine command_line_;
};
diff --git a/cloud_print/service/win/service_utils.cc b/cloud_print/service/win/service_utils.cc
index e63f2ab..cb791ad 100644
--- a/cloud_print/service/win/service_utils.cc
+++ b/cloud_print/service/win/service_utils.cc
@@ -12,20 +12,20 @@
#include "base/strings/string_util.h"
#include "chrome/common/chrome_switches.h"
-string16 GetLocalComputerName() {
+base::string16 GetLocalComputerName() {
DWORD size = 0;
- string16 result;
+ base::string16 result;
::GetComputerName(NULL, &size);
result.resize(size);
if (result.empty())
return result;
if (!::GetComputerName(&result[0], &size))
- return string16();
+ return base::string16();
result.resize(size);
return result;
}
-string16 ReplaceLocalHostInName(const string16& user_name) {
+base::string16 ReplaceLocalHostInName(const base::string16& user_name) {
static const wchar_t kLocalDomain[] = L".\\";
if (StartsWith(user_name, kLocalDomain, true)) {
return GetLocalComputerName() +
@@ -34,15 +34,15 @@ string16 ReplaceLocalHostInName(const string16& user_name) {
return user_name;
}
-string16 GetCurrentUserName() {
+base::string16 GetCurrentUserName() {
ULONG size = 0;
- string16 result;
+ base::string16 result;
::GetUserNameEx(::NameSamCompatible, NULL, &size);
result.resize(size);
if (result.empty())
return result;
if (!::GetUserNameEx(::NameSamCompatible, &result[0], &size))
- return string16();
+ return base::string16();
result.resize(size);
return result;
}
diff --git a/cloud_print/service/win/service_utils.h b/cloud_print/service/win/service_utils.h
index 083e091..d4faa8e 100644
--- a/cloud_print/service/win/service_utils.h
+++ b/cloud_print/service/win/service_utils.h
@@ -9,8 +9,8 @@ class CommandLine;
#include "base/strings/string16.h"
-string16 ReplaceLocalHostInName(const string16& user_name);
-string16 GetCurrentUserName();
+base::string16 ReplaceLocalHostInName(const base::string16& user_name);
+base::string16 GetCurrentUserName();
void CopyChromeSwitchesFromCurrentProcess(CommandLine* destination);
#endif // CLOUD_PRINT_SERVICE_SERVICE_UTILS_H_
diff --git a/cloud_print/service/win/setup_listener.cc b/cloud_print/service/win/setup_listener.cc
index 65c6e32..dd1cb37 100644
--- a/cloud_print/service/win/setup_listener.cc
+++ b/cloud_print/service/win/setup_listener.cc
@@ -26,7 +26,7 @@ const char SetupListener::kUserNameJsonValueName[] = "user_name";
const wchar_t SetupListener::kSetupPipeName[] =
L"\\\\.\\pipe\\CloudPrintServiceSetup";
-SetupListener::SetupListener(const string16& user)
+SetupListener::SetupListener(const base::string16& user)
: done_event_(new base::WaitableEvent(true, false)),
ipc_thread_(new base::Thread("ipc_thread")),
succeded_(false),
@@ -68,11 +68,11 @@ bool SetupListener::OnMessageReceived(const IPC::Message& msg) {
dictionary->GetBoolean(kXpsAvailableJsonValueName, &is_xps_available_);
dictionary->GetString(kUserNameJsonValueName, &user_name_);
- string16 chrome_path;
+ base::string16 chrome_path;
dictionary->GetString(kChromePathJsonValueName, &chrome_path);
chrome_path_ = base::FilePath(chrome_path);
- string16 user_data_dir;
+ base::string16 user_data_dir;
dictionary->GetString(kUserDataDirJsonValueName, &user_data_dir);
user_data_dir_ = base::FilePath(user_data_dir);
@@ -94,7 +94,7 @@ void SetupListener::Disconnect() {
ipc_thread_->message_loop()->QuitWhenIdle();
}
-void SetupListener::Connect(const string16& user) {
+void SetupListener::Connect(const base::string16& user) {
ATL::CDacl dacl;
ATL::CSid user_sid;
diff --git a/cloud_print/service/win/setup_listener.h b/cloud_print/service/win/setup_listener.h
index 9745c62..80223c7 100644
--- a/cloud_print/service/win/setup_listener.h
+++ b/cloud_print/service/win/setup_listener.h
@@ -35,7 +35,7 @@ class SetupListener : public IPC::Listener {
static const char kUserNameJsonValueName[];
static const wchar_t kSetupPipeName[];
- explicit SetupListener(const string16& user);
+ explicit SetupListener(const base::string16& user);
virtual ~SetupListener();
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
@@ -51,7 +51,7 @@ class SetupListener : public IPC::Listener {
return user_data_dir_;
}
- const string16& user_name() const {
+ const base::string16& user_name() const {
return user_name_;
}
@@ -65,11 +65,11 @@ class SetupListener : public IPC::Listener {
private:
void Disconnect();
- void Connect(const string16& user);
+ void Connect(const base::string16& user);
base::FilePath chrome_path_;
base::FilePath user_data_dir_;
- string16 user_name_;
+ base::string16 user_name_;
std::vector<std::string> printers_;
bool is_xps_available_;
bool succeded_;
diff --git a/cloud_print/virtual_driver/win/install/setup.cc b/cloud_print/virtual_driver/win/install/setup.cc
index 1c87ca2..2ac07ed 100644
--- a/cloud_print/virtual_driver/win/install/setup.cc
+++ b/cloud_print/virtual_driver/win/install/setup.cc
@@ -63,7 +63,7 @@ const char kRegisterSwitch[] = "register";
const char kUninstallSwitch[] = "uninstall";
const char kUnregisterSwitch[] = "unregister";
-base::FilePath GetSystemPath(const string16& binary) {
+base::FilePath GetSystemPath(const base::string16& binary) {
base::FilePath path;
if (!PathService::Get(base::DIR_SYSTEM, &path)) {
LOG(ERROR) << "Unable to get system path.";
@@ -72,7 +72,7 @@ base::FilePath GetSystemPath(const string16& binary) {
return path.Append(binary);
}
-base::FilePath GetNativeSystemPath(const string16& binary) {
+base::FilePath GetNativeSystemPath(const base::string16& binary) {
if (!IsSystem64Bit())
return GetSystemPath(binary);
base::FilePath path;
@@ -254,7 +254,7 @@ HRESULT InstallDriver(const base::FilePath& install_path) {
return HRESULT_FROM_WIN32(ERROR_CANNOT_MAKE);
ReadyDriverDependencies(temp_path.path());
- std::vector<string16> dependent_array;
+ std::vector<base::string16> dependent_array;
// Add all files. AddPrinterDriverEx will removes unnecessary.
for (size_t i = 0; i < arraysize(kDependencyList); ++i) {
base::FilePath file_path = temp_path.path().Append(kDependencyList[i]);
@@ -287,18 +287,18 @@ HRESULT InstallDriver(const base::FilePath& install_path) {
driver_info.pDriverPath = const_cast<LPWSTR>(xps_path.value().c_str());
driver_info.pConfigFile = const_cast<LPWSTR>(ui_path.value().c_str());
- string16 dependent_files(JoinString(dependent_array, L'\n'));
+ base::string16 dependent_files(JoinString(dependent_array, L'\n'));
dependent_files.push_back(L'\n');
std::replace(dependent_files.begin(), dependent_files.end(), L'\n', L'\0');
driver_info.pDependentFiles = &dependent_files[0];
// Set up user visible strings.
- string16 manufacturer = LoadLocalString(IDS_GOOGLE);
+ base::string16 manufacturer = LoadLocalString(IDS_GOOGLE);
driver_info.pszMfgName = const_cast<LPWSTR>(manufacturer.c_str());
driver_info.pszProvider = const_cast<LPWSTR>(manufacturer.c_str());
driver_info.pszOEMUrl = const_cast<LPWSTR>(kGcpUrl);
driver_info.dwlDriverVersion = GetVersionNumber();
- string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
+ base::string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
driver_info.pName = const_cast<LPWSTR>(driver_name.c_str());
if (!::AddPrinterDriverEx(NULL, 6, reinterpret_cast<BYTE*>(&driver_info),
@@ -311,7 +311,7 @@ HRESULT InstallDriver(const base::FilePath& install_path) {
HRESULT UninstallDriver() {
int tries = 3;
- string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
+ base::string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
while (!DeletePrinterDriverEx(NULL,
NULL,
const_cast<LPWSTR>(driver_name.c_str()),
@@ -340,12 +340,12 @@ HRESULT InstallPrinter(void) {
// None of the print API structures likes constant strings even though they
// don't modify the string. const_casting is the cleanest option.
- string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
+ base::string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
printer_info.pDriverName = const_cast<LPWSTR>(driver_name.c_str());
printer_info.pPrinterName = const_cast<LPWSTR>(driver_name.c_str());
printer_info.pComment = const_cast<LPWSTR>(driver_name.c_str());
printer_info.pLocation = const_cast<LPWSTR>(kGcpUrl);
- string16 port_name;
+ base::string16 port_name;
printer_info.pPortName = const_cast<LPWSTR>(kPortName);
printer_info.Attributes = PRINTER_ATTRIBUTE_DIRECT|PRINTER_ATTRIBUTE_LOCAL;
printer_info.pPrintProcessor = L"winprint";
@@ -363,7 +363,7 @@ HRESULT UninstallPrinter(void) {
HANDLE handle = NULL;
PRINTER_DEFAULTS printer_defaults = {0};
printer_defaults.DesiredAccess = PRINTER_ALL_ACCESS;
- string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
+ base::string16 driver_name = LoadLocalString(IDS_DRIVER_NAME);
if (!OpenPrinter(const_cast<LPWSTR>(driver_name.c_str()),
&handle,
&printer_defaults)) {
diff --git a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
index a68c29e..6171296 100644
--- a/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
+++ b/cloud_print/virtual_driver/win/port_monitor/port_monitor.cc
@@ -135,7 +135,7 @@ void DeleteLeakedFiles(const base::FilePath& dir) {
// On failure returns FALSE and title is unmodified.
bool GetJobTitle(HANDLE printer_handle,
DWORD job_id,
- string16 *title) {
+ base::string16 *title) {
DCHECK(printer_handle != NULL);
DCHECK(title != NULL);
DWORD bytes_needed = 0;
@@ -163,7 +163,7 @@ bool GetJobTitle(HANDLE printer_handle,
// Verifies that a valid parent Window exists and then just displays an
// error message to let the user know that there is no interactive
// configuration.
-void HandlePortUi(HWND hwnd, const string16& caption) {
+void HandlePortUi(HWND hwnd, const base::string16& caption) {
if (hwnd != NULL && IsWindow(hwnd)) {
DisplayWindowsMessage(hwnd, CO_E_NOT_SUPPORTED, cloud_print::kPortName);
}
@@ -196,7 +196,7 @@ bool GetUserToken(HANDLE* primary_token) {
// xps_path references a file to print.
// job_title is the title to be used for the resulting print job.
bool LaunchPrintDialog(const base::FilePath& xps_path,
- const string16& job_title) {
+ const base::string16& job_title) {
HANDLE token = NULL;
if (!GetUserToken(&token)) {
LOG(ERROR) << "Unable to get user token.";
@@ -286,7 +286,7 @@ bool ValidateCurrentUser() {
base::FilePath ReadPathFromRegistry(HKEY root, const wchar_t* path_name) {
base::win::RegKey gcp_key(HKEY_CURRENT_USER, kCloudPrintRegKey, KEY_READ);
- string16 data;
+ base::string16 data;
if (SUCCEEDED(gcp_key.ReadValue(path_name, &data)) &&
base::PathExists(base::FilePath(data))) {
return base::FilePath(data);
@@ -484,7 +484,7 @@ BOOL WINAPI Monitor2EndDocPort(HANDLE port_handle) {
int64 file_size = 0;
base::GetFileSize(port_data->file_path, &file_size);
if (file_size > 0) {
- string16 job_title;
+ base::string16 job_title;
if (port_data->printer_handle != NULL) {
GetJobTitle(port_data->printer_handle,
port_data->job_id,
diff --git a/cloud_print/virtual_driver/win/virtual_driver_helpers.cc b/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
index e214529..26a2bdf 100644
--- a/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
+++ b/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
@@ -17,15 +17,16 @@ namespace cloud_print {
const size_t kMaxMessageLen = 100;
-void DisplayWindowsMessage(HWND hwnd, HRESULT hr, const string16 &caption) {
+void DisplayWindowsMessage(HWND hwnd, HRESULT hr,
+ const base::string16 &caption) {
::MessageBox(hwnd, GetErrorMessage(hr).c_str(), caption.c_str(), MB_OK);
}
-string16 GetPortMonitorDllName() {
+base::string16 GetPortMonitorDllName() {
if (IsSystem64Bit()) {
- return string16(L"gcp_portmon64.dll");
+ return base::string16(L"gcp_portmon64.dll");
} else {
- return string16(L"gcp_portmon.dll");
+ return base::string16(L"gcp_portmon.dll");
}
}
diff --git a/cloud_print/virtual_driver/win/virtual_driver_helpers.h b/cloud_print/virtual_driver/win/virtual_driver_helpers.h
index 7a275ac..426265f 100644
--- a/cloud_print/virtual_driver/win/virtual_driver_helpers.h
+++ b/cloud_print/virtual_driver/win/virtual_driver_helpers.h
@@ -19,10 +19,11 @@ namespace cloud_print {
bool IsSystem64Bit();
// Convert an HRESULT to a localized string and display it in a message box.
-void DisplayWindowsMessage(HWND hwnd, HRESULT hr, const string16 &caption);
+void DisplayWindowsMessage(HWND hwnd, HRESULT hr,
+ const base::string16 &caption);
// Returns the correct port monitor DLL file name for the current machine.
-string16 GetPortMonitorDllName();
+base::string16 GetPortMonitorDllName();
// Gets the standard install path for "version 3" print drivers.
HRESULT GetPrinterDriverDir(base::FilePath* path);
diff --git a/components/autofill/content/browser/wallet/wallet_address.cc b/components/autofill/content/browser/wallet/wallet_address.cc
index 1e0c65e..e7ab050 100644
--- a/components/autofill/content/browser/wallet/wallet_address.cc
+++ b/components/autofill/content/browser/wallet/wallet_address.cc
@@ -31,26 +31,26 @@ Address* CreateAddressInternal(const base::DictionaryValue& dictionary,
return NULL;
}
- string16 recipient_name;
+ base::string16 recipient_name;
if (!dictionary.GetString("postal_address.recipient_name",
&recipient_name)) {
DLOG(ERROR) << "Response from Google Wallet missing recipient name";
return NULL;
}
- string16 postal_code_number;
+ base::string16 postal_code_number;
if (!dictionary.GetString("postal_address.postal_code_number",
&postal_code_number)) {
DLOG(ERROR) << "Response from Google Wallet missing postal code number";
return NULL;
}
- string16 phone_number;
+ base::string16 phone_number;
if (!dictionary.GetString("phone_number", &phone_number))
DVLOG(1) << "Response from Google Wallet missing phone number";
- string16 address_line_1;
- string16 address_line_2;
+ base::string16 address_line_1;
+ base::string16 address_line_2;
const ListValue* address_line_list;
if (dictionary.GetList("postal_address.address_line", &address_line_list)) {
if (!address_line_list->GetString(0, &address_line_1))
@@ -61,13 +61,13 @@ Address* CreateAddressInternal(const base::DictionaryValue& dictionary,
DVLOG(1) << "Response from Google Wallet missing address lines";
}
- string16 locality_name;
+ base::string16 locality_name;
if (!dictionary.GetString("postal_address.locality_name",
&locality_name)) {
DVLOG(1) << "Response from Google Wallet missing locality name";
}
- string16 administrative_area_name;
+ base::string16 administrative_area_name;
if (!dictionary.GetString("postal_address.administrative_area_name",
&administrative_area_name)) {
DVLOG(1) << "Response from Google Wallet missing administrative area name";
@@ -116,13 +116,13 @@ Address::Address(const AutofillProfile& profile)
}
Address::Address(const std::string& country_name_code,
- const string16& recipient_name,
- const string16& address_line_1,
- const string16& address_line_2,
- const string16& locality_name,
- const string16& administrative_area_name,
- const string16& postal_code_number,
- const string16& phone_number,
+ const base::string16& recipient_name,
+ const base::string16& address_line_1,
+ const base::string16& address_line_2,
+ const base::string16& locality_name,
+ const base::string16& administrative_area_name,
+ const base::string16& postal_code_number,
+ const base::string16& phone_number,
const std::string& object_id)
: country_name_code_(country_name_code),
recipient_name_(recipient_name),
@@ -166,35 +166,35 @@ scoped_ptr<Address> Address::CreateDisplayAddress(
return scoped_ptr<Address>();
}
- string16 name;
+ base::string16 name;
if (!dictionary.GetString("name", &name)) {
DLOG(ERROR) << "Reponse from Google Wallet missing name";
return scoped_ptr<Address>();
}
- string16 postal_code;
+ base::string16 postal_code;
if (!dictionary.GetString("postal_code", &postal_code)) {
DLOG(ERROR) << "Reponse from Google Wallet missing postal code";
return scoped_ptr<Address>();
}
- string16 address1;
+ base::string16 address1;
if (!dictionary.GetString("address1", &address1))
DVLOG(1) << "Reponse from Google Wallet missing address1";
- string16 address2;
+ base::string16 address2;
if (!dictionary.GetString("address2", &address2))
DVLOG(1) << "Reponse from Google Wallet missing address2";
- string16 city;
+ base::string16 city;
if (!dictionary.GetString("city", &city))
DVLOG(1) << "Reponse from Google Wallet missing city";
- string16 state;
+ base::string16 state;
if (!dictionary.GetString("state", &state))
DVLOG(1) << "Reponse from Google Wallet missing state";
- string16 phone_number;
+ base::string16 phone_number;
if (!dictionary.GetString("phone_number", &phone_number))
DVLOG(1) << "Reponse from Google Wallet missing phone number";
@@ -247,7 +247,7 @@ scoped_ptr<base::DictionaryValue> Address::ToDictionaryWithoutID() const {
return dict.Pass();
}
-string16 Address::DisplayName() const {
+base::string16 Address::DisplayName() const {
#if defined(OS_ANDROID)
// TODO(aruslan): improve this stub implementation.
return recipient_name();
@@ -257,16 +257,16 @@ string16 Address::DisplayName() const {
#endif
}
-string16 Address::DisplayNameDetail() const {
+base::string16 Address::DisplayNameDetail() const {
#if defined(OS_ANDROID)
// TODO(aruslan): improve this stub implementation.
return address_line_1();
#else
- return string16();
+ return base::string16();
#endif
}
-string16 Address::DisplayPhoneNumber() const {
+base::string16 Address::DisplayPhoneNumber() const {
// Return a formatted phone number. Wallet doesn't store user formatting, so
// impose our own. phone_number() always includes a country code, so using
// PhoneObject to format it would result in an internationalized format. Since
@@ -275,8 +275,8 @@ string16 Address::DisplayPhoneNumber() const {
GetNationallyFormattedNumber();
}
-string16 Address::GetInfo(const AutofillType& type,
- const std::string& app_locale) const {
+base::string16 Address::GetInfo(const AutofillType& type,
+ const std::string& app_locale) const {
if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
DCHECK(IsStringASCII(country_name_code()));
return ASCIIToUTF16(country_name_code());
@@ -326,7 +326,7 @@ string16 Address::GetInfo(const AutofillType& type,
// TODO(estade): implement more.
default:
NOTREACHED();
- return string16();
+ return base::string16();
}
}
diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc
index 4267990..3f412b3 100644
--- a/components/autofill/core/browser/autocomplete_history_manager.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -85,7 +85,7 @@ void AutocompleteHistoryManager::OnGetAutocompleteSuggestions(
const base::string16& prefix,
const std::vector<base::string16>& autofill_values,
const std::vector<base::string16>& autofill_labels,
- const std::vector<string16>& autofill_icons,
+ const std::vector<base::string16>& autofill_icons,
const std::vector<int>& autofill_unique_ids) {
CancelPendingQuery();
diff --git a/components/autofill/core/browser/phone_field_unittest.cc b/components/autofill/core/browser/phone_field_unittest.cc
index 44c3df6..fa04f5d 100644
--- a/components/autofill/core/browser/phone_field_unittest.cc
+++ b/components/autofill/core/browser/phone_field_unittest.cc
@@ -142,11 +142,11 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix) {
field.name = ASCIIToUTF16("area");
list_.push_back(new AutofillField(field, ASCIIToUTF16("areacode1")));
- field.label = string16();
+ field.label = base::string16();
field.name = ASCIIToUTF16("prefix");
list_.push_back(new AutofillField(field, ASCIIToUTF16("prefix2")));
- field.label = string16();
+ field.label = base::string16();
field.name = ASCIIToUTF16("suffix");
list_.push_back(new AutofillField(field, ASCIIToUTF16("suffix3")));
@@ -179,7 +179,7 @@ TEST_F(PhoneFieldTest, ThreePartPhoneNumberPrefixSuffix2) {
field.max_length = 3;
list_.push_back(new AutofillField(field, ASCIIToUTF16("phone2")));
- field.label = string16();
+ field.label = base::string16();
field.name = ASCIIToUTF16("phone3");
field.max_length = 4;
list_.push_back(new AutofillField(field, ASCIIToUTF16("phone3")));
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
index 57a096e..b4b3a5e 100644
--- a/components/autofill/core/browser/validation.cc
+++ b/components/autofill/core/browser/validation.cc
@@ -155,8 +155,8 @@ bool IsValidZip(const base::string16& text) {
return MatchesPattern(text, kZipPattern);
}
-bool IsSSN(const string16& text) {
- string16 number_string;
+bool IsSSN(const base::string16& text) {
+ base::string16 number_string;
base::RemoveChars(text, kSSNSeparators, &number_string);
// A SSN is of the form AAA-GG-SSSS (A = area number, G = group number, S =
diff --git a/components/autofill/core/browser/validation.h b/components/autofill/core/browser/validation.h
index bdb6574..ffc1c27 100644
--- a/components/autofill/core/browser/validation.h
+++ b/components/autofill/core/browser/validation.h
@@ -46,7 +46,7 @@ bool IsValidState(const base::string16& text);
bool IsValidZip(const base::string16& text);
// Returns true if |text| looks like an SSN, with or without separators.
-bool IsSSN(const string16& text);
+bool IsSSN(const base::string16& text);
} // namespace autofill
diff --git a/components/autofill/core/common/form_field_data.cc b/components/autofill/core/common/form_field_data.cc
index afa9f53..d89e66e 100644
--- a/components/autofill/core/common/form_field_data.cc
+++ b/components/autofill/core/common/form_field_data.cc
@@ -26,7 +26,7 @@ bool ReadStringVector(PickleIterator* iter,
if (!iter->ReadInt(&size))
return false;
- string16 pickle_data;
+ base::string16 pickle_data;
for (int i = 0; i < size; i++) {
if (!iter->ReadString16(&pickle_data))
return false;
diff --git a/components/autofill/core/common/password_form.h b/components/autofill/core/common/password_form.h
index 668adf6..0a3d801 100644
--- a/components/autofill/core/common/password_form.h
+++ b/components/autofill/core/common/password_form.h
@@ -95,42 +95,42 @@ struct PasswordForm {
// possible.
//
// When parsing an HTML form, this must always be set.
- string16 submit_element;
+ base::string16 submit_element;
// The name of the username input element. Optional (improves scoring).
//
// When parsing an HTML form, this must always be set.
- string16 username_element;
+ base::string16 username_element;
// The username. Optional.
//
// When parsing an HTML form, this is typically empty unless the site
// has implemented some form of autofill.
- string16 username_value;
+ base::string16 username_value;
// This member is populated in cases where we there are multiple input
// elements that could possibly be the username. Used when our heuristics for
// determining the username are incorrect. Optional.
//
// When parsing an HTML form, this is typically empty.
- std::vector<string16> other_possible_usernames;
+ std::vector<base::string16> other_possible_usernames;
// The name of the password input element, Optional (improves scoring).
//
// When parsing an HTML form, this must always be set.
- string16 password_element;
+ base::string16 password_element;
// The password. Required.
//
// When parsing an HTML form, this is typically empty.
- string16 password_value;
+ base::string16 password_value;
// If the form was a change password form, the name of the
// 'old password' input element. Optional.
- string16 old_password_element;
+ base::string16 old_password_element;
// The old password. Optional.
- string16 old_password_value;
+ base::string16 old_password_value;
// Whether or not this login was saved under an HTTPS session with a valid
// SSL cert. We will never match or autofill a PasswordForm where
@@ -196,7 +196,7 @@ struct PasswordForm {
};
// Map username to PasswordForm* for convenience. See password_form_manager.h.
-typedef std::map<string16, PasswordForm*> PasswordFormMap;
+typedef std::map<base::string16, PasswordForm*> PasswordFormMap;
// For testing.
std::ostream& operator<<(std::ostream& os,
diff --git a/components/breakpad/app/hard_error_handler_win.cc b/components/breakpad/app/hard_error_handler_win.cc
index 0b07edc..cf93adc 100644
--- a/components/breakpad/app/hard_error_handler_win.cc
+++ b/components/breakpad/app/hard_error_handler_win.cc
@@ -57,7 +57,7 @@ void RaiseHardErrorMsg(long nt_status, const std::string& p1,
if (!count)
return;
count += p1.size() + p2.size() + 1;
- string16 message;
+ base::string16 message;
::wsprintf(WriteInto(&message, count), msg_template, p1.c_str(), p2.c_str());
// The MB_SERVICE_NOTIFICATION causes this message to be displayed by
// csrss. This means that we are not creating windows or pumping WM messages
diff --git a/components/dom_distiller/content/distiller_page_web_contents.cc b/components/dom_distiller/content/distiller_page_web_contents.cc
index 0138d37..e81976e 100644
--- a/components/dom_distiller/content/distiller_page_web_contents.cc
+++ b/components/dom_distiller/content/distiller_page_web_contents.cc
@@ -52,7 +52,7 @@ void DistillerPageWebContents::ExecuteJavaScriptImpl(
content::RenderViewHost* host = web_contents_->GetRenderViewHost();
DCHECK(host);
host->ExecuteJavascriptInWebFrameCallbackResult(
- string16(), // frame_xpath
+ base::string16(), // frame_xpath
UTF8ToUTF16(script),
base::Bind(&DistillerPage::OnExecuteJavaScriptDone,
base::Unretained(this)));
@@ -65,12 +65,13 @@ void DistillerPageWebContents::DidFinishLoad(int64 frame_id,
content::WebContentsObserver::Observe(NULL);
OnLoadURLDone();
}
-void DistillerPageWebContents::DidFailLoad(int64 frame_id,
- const GURL& validated_url,
- bool is_main_frame,
- int error_code,
- const string16& error_description,
- RenderViewHost* render_view_host) {
+void DistillerPageWebContents::DidFailLoad(
+ int64 frame_id,
+ const GURL& validated_url,
+ bool is_main_frame,
+ int error_code,
+ const base::string16& error_description,
+ RenderViewHost* render_view_host) {
content::WebContentsObserver::Observe(NULL);
OnLoadURLFailed();
}
diff --git a/components/dom_distiller/content/distiller_page_web_contents.h b/components/dom_distiller/content/distiller_page_web_contents.h
index 65694ff..426bc2e 100644
--- a/components/dom_distiller/content/distiller_page_web_contents.h
+++ b/components/dom_distiller/content/distiller_page_web_contents.h
@@ -52,7 +52,7 @@ class DistillerPageWebContents : public DistillerPage,
const GURL& validated_url,
bool is_main_frame,
int error_code,
- const string16& error_description,
+ const base::string16& error_description,
RenderViewHost* render_view_host) OVERRIDE;
protected:
diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
index b4b725b..b8f050f 100644
--- a/components/plugins/renderer/plugin_placeholder.cc
+++ b/components/plugins/renderer/plugin_placeholder.cc
@@ -157,7 +157,7 @@ void PluginPlaceholder::HidePlugin() {
void PluginPlaceholder::WillDestroyPlugin() { delete this; }
-void PluginPlaceholder::SetMessage(const string16& message) {
+void PluginPlaceholder::SetMessage(const base::string16& message) {
message_ = message;
if (finished_loading_)
UpdateMessage();
diff --git a/components/plugins/renderer/plugin_placeholder.h b/components/plugins/renderer/plugin_placeholder.h
index 19d8c14..f317537 100644
--- a/components/plugins/renderer/plugin_placeholder.h
+++ b/components/plugins/renderer/plugin_placeholder.h
@@ -49,7 +49,7 @@ class PluginPlaceholder : public content::RenderViewObserver,
void OnLoadBlockedPlugins(const std::string& identifier);
void OnSetIsPrerendering(bool is_prerendering);
- void SetMessage(const string16& message);
+ void SetMessage(const base::string16& message);
void SetPluginInfo(const content::WebPluginInfo& plugin_info);
const content::WebPluginInfo& GetPluginInfo() const;
void SetIdentifier(const std::string& identifier);
@@ -100,7 +100,7 @@ class PluginPlaceholder : public content::RenderViewObserver,
content::WebPluginInfo plugin_info_;
- string16 message_;
+ base::string16 message_;
// True iff the plugin was blocked because the page was being prerendered.
// Plugin will automatically be loaded when the page is displayed.
diff --git a/components/policy/core/browser/policy_error_map.cc b/components/policy/core/browser/policy_error_map.cc
index 0c358c5..95708ac 100644
--- a/components/policy/core/browser/policy_error_map.cc
+++ b/components/policy/core/browser/policy_error_map.cc
@@ -92,10 +92,10 @@ void PolicyErrorMap::AddError(const std::string& policy,
AddError(PendingError(policy, std::string(), index, message_id, replacement));
}
-string16 PolicyErrorMap::GetErrors(const std::string& policy) {
+base::string16 PolicyErrorMap::GetErrors(const std::string& policy) {
CheckReadyAndConvert();
std::pair<const_iterator, const_iterator> range = map_.equal_range(policy);
- std::vector<string16> list;
+ std::vector<base::string16> list;
for (const_iterator it = range.first; it != range.second; ++it)
list.push_back(it->second);
return JoinString(list, '\n');
@@ -135,14 +135,14 @@ void PolicyErrorMap::AddError(const PendingError& error) {
}
void PolicyErrorMap::Convert(const PendingError& error) {
- string16 submessage;
+ base::string16 submessage;
if (error.has_replacement) {
submessage = l10n_util::GetStringFUTF16(error.message_id,
ASCIIToUTF16(error.replacement));
} else {
submessage = l10n_util::GetStringUTF16(error.message_id);
}
- string16 message;
+ base::string16 message;
if (!error.subkey.empty()) {
message = l10n_util::GetStringFUTF16(IDS_POLICY_SUBKEY_ERROR,
ASCIIToUTF16(error.subkey),
diff --git a/components/policy/core/browser/policy_error_map.h b/components/policy/core/browser/policy_error_map.h
index afc9706..d3cc747 100644
--- a/components/policy/core/browser/policy_error_map.h
+++ b/components/policy/core/browser/policy_error_map.h
@@ -18,7 +18,7 @@ namespace policy {
// Collects error messages and their associated policies.
class POLICY_EXPORT PolicyErrorMap {
public:
- typedef std::multimap<std::string, string16> PolicyMapType;
+ typedef std::multimap<std::string, base::string16> PolicyMapType;
typedef PolicyMapType::const_iterator const_iterator;
PolicyErrorMap();
@@ -70,7 +70,7 @@ class POLICY_EXPORT PolicyErrorMap {
// Returns all the error messages stored for |policy|, separated by a white
// space. Returns an empty string if there are no errors for |policy|.
- string16 GetErrors(const std::string& policy);
+ base::string16 GetErrors(const std::string& policy);
bool empty();
size_t size();
diff --git a/components/policy/core/common/registry_dict_win.cc b/components/policy/core/common/registry_dict_win.cc
index 7673079..a2bb688 100644
--- a/components/policy/core/common/registry_dict_win.cc
+++ b/components/policy/core/common/registry_dict_win.cc
@@ -295,7 +295,7 @@ void RegistryDict::Swap(RegistryDict* other) {
values_.swap(other->values_);
}
-void RegistryDict::ReadRegistry(HKEY hive, const string16& root) {
+void RegistryDict::ReadRegistry(HKEY hive, const base::string16& root) {
ClearKeys();
ClearValues();
diff --git a/components/policy/core/common/registry_dict_win.h b/components/policy/core/common/registry_dict_win.h
index 1cce59b..fb48091 100644
--- a/components/policy/core/common/registry_dict_win.h
+++ b/components/policy/core/common/registry_dict_win.h
@@ -67,7 +67,7 @@ class POLICY_EXPORT RegistryDict {
void Swap(RegistryDict* other);
// Read a Windows registry subtree into this registry dictionary object.
- void ReadRegistry(HKEY hive, const string16& root);
+ void ReadRegistry(HKEY hive, const base::string16& root);
// Converts the dictionary to base::Value representation. For key/value name
// collisions, the key wins. |schema| supplies an optional JSON schema that
diff --git a/components/sessions/serialized_navigation_entry.cc b/components/sessions/serialized_navigation_entry.cc
index be00bd7..5506220 100644
--- a/components/sessions/serialized_navigation_entry.cc
+++ b/components/sessions/serialized_navigation_entry.cc
@@ -176,19 +176,19 @@ void WriteStringToPickle(Pickle* pickle,
}
}
-// string16 version of WriteStringToPickle.
+// base::string16 version of WriteStringToPickle.
//
// TODO(akalin): Unify this, too.
void WriteString16ToPickle(Pickle* pickle,
int* bytes_written,
int max_bytes,
- const string16& str) {
+ const base::string16& str) {
int num_bytes = str.size() * sizeof(char16);
if (*bytes_written + num_bytes < max_bytes) {
*bytes_written += num_bytes;
pickle->WriteString16(str);
} else {
- pickle->WriteString16(string16());
+ pickle->WriteString16(base::string16());
}
}
diff --git a/components/sessions/serialized_navigation_entry.h b/components/sessions/serialized_navigation_entry.h
index 80581cd..d4d1fd9 100644
--- a/components/sessions/serialized_navigation_entry.h
+++ b/components/sessions/serialized_navigation_entry.h
@@ -96,9 +96,9 @@ class SESSIONS_EXPORT SerializedNavigationEntry {
// Accessors for some fields taken from NavigationEntry.
int unique_id() const { return unique_id_; }
const GURL& virtual_url() const { return virtual_url_; }
- const string16& title() const { return title_; }
+ const base::string16& title() const { return title_; }
const content::PageState& page_state() const { return page_state_; }
- const string16& search_terms() const { return search_terms_; }
+ const base::string16& search_terms() const { return search_terms_; }
const GURL& favicon_url() const { return favicon_url_; }
int http_status_code() const { return http_status_code_; }
const content::Referrer& referrer() const { return referrer_; }
@@ -140,7 +140,7 @@ class SESSIONS_EXPORT SerializedNavigationEntry {
int unique_id_;
content::Referrer referrer_;
GURL virtual_url_;
- string16 title_;
+ base::string16 title_;
content::PageState page_state_;
content::PageTransition transition_type_;
bool has_post_data_;
@@ -148,7 +148,7 @@ class SESSIONS_EXPORT SerializedNavigationEntry {
GURL original_request_url_;
bool is_overriding_user_agent_;
base::Time timestamp_;
- string16 search_terms_;
+ base::string16 search_terms_;
GURL favicon_url_;
int http_status_code_;
diff --git a/components/sessions/serialized_navigation_entry_unittest.cc b/components/sessions/serialized_navigation_entry_unittest.cc
index b96d3b4..f029b5b 100644
--- a/components/sessions/serialized_navigation_entry_unittest.cc
+++ b/components/sessions/serialized_navigation_entry_unittest.cc
@@ -33,7 +33,7 @@ const content::Referrer kReferrer =
content::Referrer(GURL("http://www.referrer.com"),
blink::WebReferrerPolicyAlways);
const GURL kVirtualURL("http://www.virtual-url.com");
-const string16 kTitle = ASCIIToUTF16("title");
+const base::string16 kTitle = ASCIIToUTF16("title");
const content::PageState kPageState =
content::PageState::CreateFromEncodedData("page state");
const content::PageTransition kTransitionType =
@@ -46,7 +46,7 @@ const int64 kPostID = 100;
const GURL kOriginalRequestURL("http://www.original-request.com");
const bool kIsOverridingUserAgent = true;
const base::Time kTimestamp = syncer::ProtoTimeToTime(100);
-const string16 kSearchTerms = ASCIIToUTF16("my search terms");
+const base::string16 kSearchTerms = ASCIIToUTF16("my search terms");
const GURL kFaviconURL("http://virtual-url.com/favicon.ico");
const int kHttpStatusCode = 404;
@@ -230,7 +230,7 @@ TEST(SerializedNavigationEntryTest, ToNavigationEntry) {
new_navigation_entry->GetOriginalRequestURL());
EXPECT_EQ(kIsOverridingUserAgent,
new_navigation_entry->GetIsOverridingUserAgent());
- string16 search_terms;
+ base::string16 search_terms;
new_navigation_entry->GetExtraData(kSearchTermsKey, &search_terms);
EXPECT_EQ(kSearchTerms, search_terms);
EXPECT_EQ(kHttpStatusCode, new_navigation_entry->GetHttpStatusCode());
diff --git a/components/webdata/common/web_data_results.h b/components/webdata/common/web_data_results.h
index 7a225e9..1878dc0 100644
--- a/components/webdata/common/web_data_results.h
+++ b/components/webdata/common/web_data_results.h
@@ -23,7 +23,7 @@ typedef enum {
#endif
WEB_APP_IMAGES, // WDResult<WDAppImagesResult>
TOKEN_RESULT, // WDResult<std::vector<std::string>>
- AUTOFILL_VALUE_RESULT, // WDResult<std::vector<string16>>
+ AUTOFILL_VALUE_RESULT, // WDResult<std::vector<base::string16>>
AUTOFILL_CHANGES, // WDResult<std::vector<AutofillChange>>
AUTOFILL_PROFILE_RESULT, // WDResult<AutofillProfile>
AUTOFILL_PROFILES_RESULT, // WDResult<std::vector<AutofillProfile*>>
diff --git a/components/wifi/wifi_service_win.cc b/components/wifi/wifi_service_win.cc
index f34e3b7..aeeed9c 100644
--- a/components/wifi/wifi_service_win.cc
+++ b/components/wifi/wifi_service_win.cc
@@ -838,7 +838,7 @@ DWORD WiFiServiceImpl::ResetDHCP() {
DWORD WiFiServiceImpl::FindAdapterIndexMapByGUID(
const GUID& interface_guid,
IP_ADAPTER_INDEX_MAP* adapter_index_map) {
- string16 guid_string;
+ base::string16 guid_string;
const int kGUIDSize = 39;
::StringFromGUID2(
interface_guid, WriteInto(&guid_string, kGUIDSize), kGUIDSize);