diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-25 00:53:42 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-25 00:53:42 +0000 |
commit | c91b9d414c56955f3ca405fd66c6f567fc16d9fc (patch) | |
tree | 293205b4a78c5ce8571edcb4ae26e1b9880d8e51 /chrome/service | |
parent | 036a5f386e1204a861f3b24201bd0f89d359f29c (diff) | |
download | chromium_src-c91b9d414c56955f3ca405fd66c6f567fc16d9fc.zip chromium_src-c91b9d414c56955f3ca405fd66c6f567fc16d9fc.tar.gz chromium_src-c91b9d414c56955f3ca405fd66c6f567fc16d9fc.tar.bz2 |
Update uses of UTF conversions in chrome/installer, chrome/renderer, chrome/service, chrome/test, chrome/third_party, chrome/tools, chrome/utility to use the base:: namespace.
BUG=330556
TEST=no change
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/119103004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242472 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service')
-rw-r--r-- | chrome/service/cloud_print/cloud_print_connector.cc | 2 | ||||
-rw-r--r-- | chrome/service/cloud_print/print_system_win.cc | 8 | ||||
-rw-r--r-- | chrome/service/cloud_print/print_system_xps_win.cc | 11 | ||||
-rw-r--r-- | chrome/service/cloud_print/printer_job_handler.cc | 6 | ||||
-rw-r--r-- | chrome/service/service_process.cc | 4 |
5 files changed, 16 insertions, 15 deletions
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc index f202cf7..03687d8 100644 --- a/chrome/service/cloud_print/cloud_print_connector.cc +++ b/chrome/service/cloud_print/cloud_print_connector.cc @@ -589,7 +589,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 = UTF8ToUTF16(printer_name); + base::string16 printer_name_utf16 = base::UTF8ToUTF16(printer_name); std::string status_message = l10n_util::GetStringFUTF8( IDS_CLOUD_PRINT_REGISTER_PRINTER_FAILED, printer_name_utf16, diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc index 0ad8c0b..f46c2af 100644 --- a/chrome/service/cloud_print/print_system_win.cc +++ b/chrome/service/cloud_print/print_system_win.cc @@ -44,7 +44,7 @@ class PrintSystemWatcherWin : public base::win::ObjectWatcher::Delegate { LPTSTR printer_name_to_use = NULL; std::wstring printer_name_wide; if (!printer_name.empty()) { - printer_name_wide = UTF8ToWide(printer_name); + printer_name_wide = base::UTF8ToWide(printer_name); printer_name_to_use = const_cast<LPTSTR>(printer_name_wide.c_str()); } bool ret = false; @@ -223,7 +223,7 @@ bool PrintSystemWin::GetJobDetails(const std::string& printer_name, print_backend_->GetPrinterDriverInfo(printer_name)); DCHECK(job_details); printing::ScopedPrinterHandle printer_handle; - std::wstring printer_name_wide = UTF8ToWide(printer_name); + std::wstring printer_name_wide = base::UTF8ToWide(printer_name); printer_handle.OpenPrinter(printer_name_wide.c_str()); DCHECK(printer_handle.IsValid()); bool ret = false; @@ -240,8 +240,8 @@ bool PrintSystemWin::GetJobDetails(const std::string& printer_name, JOB_INFO_1 *job_info = reinterpret_cast<JOB_INFO_1 *>(job_info_buffer.get()); if (job_info->pStatus) { - WideToUTF8(job_info->pStatus, wcslen(job_info->pStatus), - &job_details->status_message); + base::WideToUTF8(job_info->pStatus, wcslen(job_info->pStatus), + &job_details->status_message); } job_details->platform_status_flags = job_info->Status; if ((job_info->Status & JOB_STATUS_COMPLETE) || diff --git a/chrome/service/cloud_print/print_system_xps_win.cc b/chrome/service/cloud_print/print_system_xps_win.cc index e15f224..5fc722d 100644 --- a/chrome/service/cloud_print/print_system_xps_win.cc +++ b/chrome/service/cloud_print/print_system_xps_win.cc @@ -77,7 +77,7 @@ HRESULT PrintTicketToDevMode(const std::string& printer_name, return hr; HPTPROVIDER provider = NULL; - hr = printing::XPSModule::OpenProvider(UTF8ToWide(printer_name), 1, + hr = printing::XPSModule::OpenProvider(base::UTF8ToWide(printer_name), 1, &provider); if (SUCCEEDED(hr)) { ULONG size = 0; @@ -166,7 +166,7 @@ class JobSpoolerWin : public PrintSystem::JobSpooler { return false; } - HDC dc = CreateDC(L"WINSPOOL", UTF8ToWide(printer_name).c_str(), + HDC dc = CreateDC(L"WINSPOOL", base::UTF8ToWide(printer_name).c_str(), NULL, pt_dev_mode.dm_); if (!dc) { NOTREACHED(); @@ -175,7 +175,7 @@ class JobSpoolerWin : public PrintSystem::JobSpooler { hr = E_FAIL; DOCINFO di = {0}; di.cbSize = sizeof(DOCINFO); - base::string16 doc_name = UTF8ToUTF16(job_title); + base::string16 doc_name = base::UTF8ToUTF16(job_title); DCHECK(printing::SimplifyDocumentTitle(doc_name) == doc_name); di.lpszDocName = doc_name.c_str(); job_id_ = StartDoc(dc, &di); @@ -360,7 +360,8 @@ class JobSpoolerWin : public PrintSystem::JobSpooler { base::win::ScopedComPtr<IXpsPrintJobStream> doc_stream; base::win::ScopedComPtr<IXpsPrintJobStream> print_ticket_stream; if (FAILED(printing::XPSPrintModule::StartXpsPrintJob( - UTF8ToWide(printer_name).c_str(), UTF8ToWide(job_title).c_str(), + base::UTF8ToWide(printer_name).c_str(), + base::UTF8ToWide(job_title).c_str(), NULL, job_progress_event_.Get(), NULL, NULL, NULL, xps_print_job_.Receive(), doc_stream.Receive(), print_ticket_stream.Receive()))) @@ -537,7 +538,7 @@ bool PrintSystemWinXPS::ValidatePrintTicket( } bool ret = false; HPTPROVIDER provider = NULL; - printing::XPSModule::OpenProvider(UTF8ToWide(printer_name.c_str()), + printing::XPSModule::OpenProvider(base::UTF8ToWide(printer_name.c_str()), 1, &provider); if (provider) { diff --git a/chrome/service/cloud_print/printer_job_handler.cc b/chrome/service/cloud_print/printer_job_handler.cc index b99c75b..33375d1 100644 --- a/chrome/service/cloud_print/printer_job_handler.cc +++ b/chrome/service/cloud_print/printer_job_handler.cc @@ -773,8 +773,8 @@ void PrinterJobHandler::DoPrint(const JobDetails& job_details, DCHECK(job_spooler_.get()); if (!job_spooler_.get()) return; - base::string16 document_name = - printing::SimplifyDocumentTitle(UTF8ToUTF16(job_details.job_title_)); + base::string16 document_name = printing::SimplifyDocumentTitle( + base::UTF8ToUTF16(job_details.job_title_)); if (document_name.empty()) { document_name = printing::SimplifyDocumentTitle( l10n_util::GetStringUTF16(IDS_DEFAULT_PRINT_DOCUMENT_TITLE)); @@ -786,7 +786,7 @@ void PrinterJobHandler::DoPrint(const JobDetails& job_details, job_details.print_data_file_path_, job_details.print_data_mime_type_, printer_name, - UTF16ToUTF8(document_name), + base::UTF16ToUTF8(document_name), job_details.tags_, this)) { OnJobSpoolFailed(); diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc index c8816ef..3facd59 100644 --- a/chrome/service/service_process.cc +++ b/chrome/service/service_process.cc @@ -110,10 +110,10 @@ void PrepareRestartOnCrashEnviroment( base::i18n::AdjustStringForLocaleDirection(&adjusted_string); dlg_strings.append(adjusted_string); dlg_strings.push_back('|'); - dlg_strings.append(ASCIIToUTF16( + dlg_strings.append(base::ASCIIToUTF16( base::i18n::IsRTL() ? env_vars::kRtlLocale : env_vars::kLtrLocale)); - env->SetVar(env_vars::kRestartInfo, UTF16ToUTF8(dlg_strings)); + env->SetVar(env_vars::kRestartInfo, base::UTF16ToUTF8(dlg_strings)); } } // namespace |