diff options
author | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
---|---|---|
committer | mmentovai@google.com <mmentovai@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-14 00:41:45 +0000 |
commit | 5115474e2e2c773b53fc1e111426e8924deeadb7 (patch) | |
tree | 6bdd56cdd544a3b331db7612781ae347739c4e82 /chrome/browser | |
parent | 609990b5b4254601504935427483e3fc22cfde80 (diff) | |
download | chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.zip chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.gz chromium_src-5115474e2e2c773b53fc1e111426e8924deeadb7.tar.bz2 |
Use %ls instead of %s in wprintf format strings for wchar_t fields.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@846 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 4 | ||||
-rw-r--r-- | chrome/browser/history/text_database.cc | 2 | ||||
-rw-r--r-- | chrome/browser/printing/page_overlays_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/render_view_host.cc | 2 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc | 4 | ||||
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/save_package.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/options/language_combobox_model.cc | 2 | ||||
-rw-r--r-- | chrome/browser/visitedlink_master.cc | 2 |
9 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index f710c33..0461b6a 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -177,8 +177,8 @@ void ReadLastShutdownInfo() { prefs->SetInteger(prefs::kShutdownNumProcessesSlow, 0); if (type > NOT_VALID && shutdown_ms > 0 && num_procs > 0) { - const wchar_t *time_fmt = L"Shutdown.%s.time"; - const wchar_t *time_per_fmt = L"Shutdown.%s.time_per_process"; + const wchar_t *time_fmt = L"Shutdown.%ls.time"; + const wchar_t *time_per_fmt = L"Shutdown.%ls.time_per_process"; std::wstring time; std::wstring time_per; if (type == WINDOW_CLOSE) { diff --git a/chrome/browser/history/text_database.cc b/chrome/browser/history/text_database.cc index 0c1242f..0eab85a 100644 --- a/chrome/browser/history/text_database.cc +++ b/chrome/browser/history/text_database.cc @@ -130,7 +130,7 @@ std::wstring TextDatabase::IDToFileName(DBIdent id) { // "History Index 2008-01". However, we don't make assumptions about this // scheme: the caller should assign IDs as it feels fit with the knowledge // that they will apppear on disk in this form. - return StringPrintf(L"%s%d-%02d", file_base(), id / 100, id % 100); + return StringPrintf(L"%ls%d-%02d", file_base(), id / 100, id % 100); } // static diff --git a/chrome/browser/printing/page_overlays_unittest.cc b/chrome/browser/printing/page_overlays_unittest.cc index d1b3bc6..d15453a 100644 --- a/chrome/browser/printing/page_overlays_unittest.cc +++ b/chrome/browser/printing/page_overlays_unittest.cc @@ -88,7 +88,7 @@ TEST(PageOverlaysTest, StringConversion) { std::wstring input; std::wstring out; for (int i = 0; i < arraysize(kOverlayKeys); ++i) { - input = StringPrintf(L"foo%sbar", kOverlayKeys[i].key); + input = StringPrintf(L"foo%lsbar", kOverlayKeys[i].key); out = printing::PageOverlays::ReplaceVariables(input, *doc.get(), *page.get()); EXPECT_FALSE(out.empty()); diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc index d8ade00..00116b4 100644 --- a/chrome/browser/render_view_host.cc +++ b/chrome/browser/render_view_host.cc @@ -1071,7 +1071,7 @@ void RenderViewHost::DidPrintPage( void RenderViewHost::OnAddMessageToConsole(const std::wstring& message, int32 line_no, const std::wstring& source_id) { - std::wstring msg = StringPrintf(L"\"%s,\" source: %s (%d)", message.c_str(), + std::wstring msg = StringPrintf(L"\"%ls,\" source: %ls (%d)", message.c_str(), source_id.c_str(), line_no); logging::LogMessage("CONSOLE", 0).stream() << msg; if (debugger_attached_) diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index ec6f671..bb817df 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc @@ -51,13 +51,13 @@ // diagnostic page. // TODO(paulg): Change 'googleclient' to a proper client name before launch. static const char* const kSbDiagnosticUrl = - "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%s&client=googleclient"; + "http://safebrowsing.clients.google.com/safebrowsing/diagnostic?site=%ls&client=googleclient"; static const char* const kSbReportPhishingUrl = "http://www.google.com/safebrowsing/report_error/"; static const wchar_t* const kSbDiagnosticHtml = - L"<a href=\"\" onClick=\"sendCommand(4); return false;\">%s</a>"; + L"<a href=\"\" onClick=\"sendCommand(4); return false;\">%ls</a>"; // Created on the io_thread. SafeBrowsingBlockingPage::SafeBrowsingBlockingPage( diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index b4a05952..41adebc 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -477,7 +477,7 @@ TEST(SafeBrowsing, HashCaching) { void PrintStat(const wchar_t* name) { int value = StatsTable::current()->GetCounterValue(name); - std::wstring out = StringPrintf(L"%s %d\r\n", name, value); + std::wstring out = StringPrintf(L"%ls %d\r\n", name, value); OutputDebugStringW(out.c_str()); } @@ -650,4 +650,4 @@ TEST(SafeBrowsing, DISABLED_DatabaseOldLotsofDeletesIO) { del.chunk_del.push_back(ChunkRange(3539, 3579)); deletes->push_back(del); PeformUpdate(L"old\\SafeBrowsing", chunks, deletes); -}
\ No newline at end of file +} diff --git a/chrome/browser/save_package.cc b/chrome/browser/save_package.cc index 3aac7a8..d615e32 100644 --- a/chrome/browser/save_package.cc +++ b/chrome/browser/save_package.cc @@ -303,7 +303,7 @@ bool SavePackage::GenerateFilename(const std::string& disposition, uint32 i; for (i = ordinal_number; i < kMaxFileOrdinalNumber; ++i) { std::wstring new_name = - StringPrintf(L"%s(%d)", base_file_name.c_str(), i) + file_name_ext; + StringPrintf(L"%ls(%d)", base_file_name.c_str(), i) + file_name_ext; if (file_name_set_.find(new_name) == file_name_set_.end()) { // Resolved name conflict. file_name = new_name; diff --git a/chrome/browser/views/options/language_combobox_model.cc b/chrome/browser/views/options/language_combobox_model.cc index 7743a8c..29a6659 100644 --- a/chrome/browser/views/options/language_combobox_model.cc +++ b/chrome/browser/views/options/language_combobox_model.cc @@ -137,7 +137,7 @@ std::wstring LanguageComboboxModel::GetItemAt(ChromeViews::ComboBox* source, // changed the format. We also want to switch the order of locale_name // and native_name without going back to translators. std::wstring formatted_item; - SStringPrintf(&formatted_item, L"%s - %s", locale_name.c_str(), + SStringPrintf(&formatted_item, L"%ls - %ls", locale_name.c_str(), native_name.c_str()); if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) // Somehow combo box (even with LAYOUTRTL flag) doesn't get this diff --git a/chrome/browser/visitedlink_master.cc b/chrome/browser/visitedlink_master.cc index 81796aa..4519bfc 100644 --- a/chrome/browser/visitedlink_master.cc +++ b/chrome/browser/visitedlink_master.cc @@ -287,7 +287,7 @@ std::wstring VisitedLinkMaster::GetSharedMemoryName() const { if (profile_) profile_id = profile_->GetID().c_str(); - return StringPrintf(L"GVisitedLinks_%lu_%lu_%s", + return StringPrintf(L"GVisitedLinks_%lu_%lu_%ls", GetCurrentProcessId(), shared_memory_serial_, profile_id.c_str()); } |