diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-08 23:04:26 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-08 23:04:26 +0000 |
commit | 2594c2bef91a8a25e5bfb2c5685d3d9653ddd376 (patch) | |
tree | e793c8eb85a91c4004a589ddf9862671fddcd7c3 | |
parent | 042e15a81d4953d124a9bad49209bef7f3f6e4d7 (diff) | |
download | chromium_src-2594c2bef91a8a25e5bfb2c5685d3d9653ddd376.zip chromium_src-2594c2bef91a8a25e5bfb2c5685d3d9653ddd376.tar.gz chromium_src-2594c2bef91a8a25e5bfb2c5685d3d9653ddd376.tar.bz2 |
base: Remove 'using' declaration of SStringPrintf.
Update the callers to append base:: when calling SStringPrintf.
BUG=None
TEST=locally and trybots
Review URL: http://codereview.chromium.org/4330002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65446 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/stringprintf.h | 1 | ||||
-rw-r--r-- | chrome/browser/automation/testing_automation_provider.cc | 7 | ||||
-rw-r--r-- | chrome/browser/download/download_manager.cc | 7 | ||||
-rw-r--r-- | chrome/browser/download/download_util.cc | 7 | ||||
-rw-r--r-- | chrome/browser/gtk/options/fonts_page_gtk.cc | 5 | ||||
-rw-r--r-- | chrome/browser/language_combobox_model.cc | 5 | ||||
-rw-r--r-- | chrome/service/cloud_print/cloud_print_helpers.cc | 3 | ||||
-rw-r--r-- | chrome/test/automation/automation_proxy_uitest.cc | 7 | ||||
-rw-r--r-- | chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp | 12 |
9 files changed, 33 insertions, 21 deletions
diff --git a/base/stringprintf.h b/base/stringprintf.h index 8d0a33d..3608f9d 100644 --- a/base/stringprintf.h +++ b/base/stringprintf.h @@ -49,7 +49,6 @@ void StringAppendV(std::wstring* dst, const wchar_t* format, va_list ap) // // TODO(brettw) remove these when calling code is converted. using base::StringPrintf; -using base::SStringPrintf; using base::StringAppendV; using base::StringAppendF; using base::StringAppendV; diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 6fc58d3..7cf19da 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -13,6 +13,7 @@ #include "base/stringprintf.h" #include "base/time.h" #include "base/utf_string_conversions.h" +#include "base/stringprintf.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/app_modal_dialog.h" #include "chrome/browser/app_modal_dialog_queue.h" @@ -1178,9 +1179,9 @@ void TestingAutomationProvider::ExecuteJavascript( // communication while sending back the response of // this javascript execution. std::wstring set_automation_id; - SStringPrintf(&set_automation_id, - L"window.domAutomationController.setAutomationId(%d);", - reply_message->routing_id()); + base::SStringPrintf(&set_automation_id, + L"window.domAutomationController.setAutomationId(%d);", + reply_message->routing_id()); DCHECK(reply_message_ == NULL); reply_message_ = reply_message; diff --git a/chrome/browser/download/download_manager.cc b/chrome/browser/download/download_manager.cc index 88a7e6a..59476b47 100644 --- a/chrome/browser/download/download_manager.cc +++ b/chrome/browser/download/download_manager.cc @@ -12,6 +12,7 @@ #include "base/path_service.h" #include "base/rand_util.h" #include "base/stl_util-inl.h" +#include "base/stringprintf.h" #include "base/sys_string_conversions.h" #include "base/task.h" #include "base/utf_string_conversions.h" @@ -341,8 +342,10 @@ void DownloadManager::CheckIfSuggestedPathExists(DownloadCreateInfo* info, FilePath::StringType file_name; FilePath path; while (path.empty()) { - SStringPrintf(&file_name, FILE_PATH_LITERAL("unconfirmed %d.crdownload"), - base::RandInt(0, 100000)); + base::SStringPrintf( + &file_name, + FILE_PATH_LITERAL("unconfirmed %d.crdownload"), + base::RandInt(0, 100000)); path = dir.Append(file_name); if (file_util::PathExists(path)) path = FilePath(); diff --git a/chrome/browser/download/download_util.cc b/chrome/browser/download/download_util.cc index db509c8..1235285 100644 --- a/chrome/browser/download/download_util.cc +++ b/chrome/browser/download/download_util.cc @@ -20,6 +20,7 @@ #include "base/singleton.h" #include "base/string16.h" #include "base/string_number_conversions.h" +#include "base/stringprintf.h" #include "base/sys_string_conversions.h" #include "base/thread_restrictions.h" #include "base/utf_string_conversions.h" @@ -715,8 +716,10 @@ int GetUniquePathNumberWithCrDownload(const FilePath& path) { FilePath GetCrDownloadPath(const FilePath& suggested_path) { FilePath::StringType file_name; - SStringPrintf(&file_name, PRFilePathLiteral FILE_PATH_LITERAL(".crdownload"), - suggested_path.value().c_str()); + base::SStringPrintf( + &file_name, + PRFilePathLiteral FILE_PATH_LITERAL(".crdownload"), + suggested_path.value().c_str()); return FilePath(file_name); } diff --git a/chrome/browser/gtk/options/fonts_page_gtk.cc b/chrome/browser/gtk/options/fonts_page_gtk.cc index 15ebf9b..555f098 100644 --- a/chrome/browser/gtk/options/fonts_page_gtk.cc +++ b/chrome/browser/gtk/options/fonts_page_gtk.cc @@ -5,6 +5,7 @@ #include "chrome/browser/gtk/options/fonts_page_gtk.h" #include "app/l10n_util.h" +#include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/default_encoding_combo_model.h" @@ -28,8 +29,8 @@ std::string MakeFontName(std::string family_name, int pixel_size) { // TODO(mattm): We can pass in the size in pixels (px), and the font button // actually honors it, but when you open the selector it interprets it as // points. See crbug.com/17857 - SStringPrintf(&fontname, "%s, %dpx", WideToUTF8(actual_family_name).c_str(), - pixel_size); + base::SStringPrintf(&fontname, "%s, %dpx", + WideToUTF8(actual_family_name).c_str(), pixel_size); return fontname; } diff --git a/chrome/browser/language_combobox_model.cc b/chrome/browser/language_combobox_model.cc index ceb8fb4..55b98d4 100644 --- a/chrome/browser/language_combobox_model.cc +++ b/chrome/browser/language_combobox_model.cc @@ -7,6 +7,7 @@ #include "app/l10n_util.h" #include "base/i18n/rtl.h" #include "base/string_split.h" +#include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/metrics/user_metrics.h" @@ -109,8 +110,8 @@ std::wstring LanguageList::GetLanguageNameAt(int index) const { // 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"%ls - %ls", locale_name.c_str(), - native_name.c_str()); + base::SStringPrintf(&formatted_item, L"%ls - %ls", locale_name.c_str(), + native_name.c_str()); if (base::i18n::IsRTL()) // Somehow combo box (even with LAYOUTRTL flag) doesn't get this // right so we add RTL BDO (U+202E) to set the direction diff --git a/chrome/service/cloud_print/cloud_print_helpers.cc b/chrome/service/cloud_print/cloud_print_helpers.cc index d03ddd0..6143e7a 100644 --- a/chrome/service/cloud_print/cloud_print_helpers.cc +++ b/chrome/service/cloud_print/cloud_print_helpers.cc @@ -9,6 +9,7 @@ #include "base/rand_util.h" #include "base/scoped_ptr.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/task.h" #include "base/utf_string_conversions.h" #include "base/values.h" @@ -175,7 +176,7 @@ void CloudPrintHelpers::AddMultipartValueForUpload( void CloudPrintHelpers::CreateMimeBoundaryForUpload(std::string* out) { int r1 = base::RandInt(0, kint32max); int r2 = base::RandInt(0, kint32max); - SStringPrintf(out, "---------------------------%08X%08X", r1, r2); + base::SStringPrintf(out, "---------------------------%08X%08X", r1, r2); } std::string CloudPrintHelpers::GenerateHashOfStringMap( diff --git a/chrome/test/automation/automation_proxy_uitest.cc b/chrome/test/automation/automation_proxy_uitest.cc index e2e494c..654c10d 100644 --- a/chrome/test/automation/automation_proxy_uitest.cc +++ b/chrome/test/automation/automation_proxy_uitest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -11,6 +11,7 @@ #include "base/file_path.h" #include "base/i18n/rtl.h" #include "base/string_util.h" +#include "base/stringprintf.h" #include "base/sys_info.h" #include "base/utf_string_conversions.h" #include "build/build_config.h" @@ -491,7 +492,7 @@ class AutomationProxyTest4 : public UITest { std::wstring CreateJSString(const std::wstring& value) { std::wstring jscript; - SStringPrintf(&jscript, + base::SStringPrintf(&jscript, L"window.domAutomationController.send(%ls);", value.c_str()); return jscript; @@ -543,7 +544,7 @@ TEST_F(AutomationProxyTest4, NumberValueIsEchoedByDomAutomationController) { int expected = 1; int actual = 0; std::wstring expected_string; - SStringPrintf(&expected_string, L"%d", expected); + base::SStringPrintf(&expected_string, L"%d", expected); std::wstring jscript = CreateJSString(expected_string); ASSERT_TRUE(tab->ExecuteAndExtractInt(L"", jscript, &actual)); ASSERT_EQ(expected, actual); diff --git a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp index cf0d7f7..626da92 100644 --- a/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp +++ b/chrome/third_party/mozilla_security_manager/nsNSSCertHelper.cpp @@ -47,6 +47,7 @@ #include "app/l10n_util.h" #include "base/i18n/number_formatting.h" #include "base/string_number_conversions.h" +#include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/common/net/x509_certificate_model.h" #include "grit/generated_resources.h" @@ -466,11 +467,12 @@ std::string ProcessGeneralName(PRArenaPool* arena, ¤t->name.OthName.name) == SECSuccess && guid.len == 16) { unsigned char* d = guid.data; - SStringPrintf(&value, - "{%.2x%.2x%.2x%.2x-%.2x%.2x-%.2x%.2x-" - "%.2x%.2x-%.2x%.2x%.2x%.2x%.2x%.2x}", - d[3], d[2], d[1], d[0], d[5], d[4], d[7], d[6], - d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); + base::SStringPrintf( + &value, + "{%.2x%.2x%.2x%.2x-%.2x%.2x-%.2x%.2x-" + "%.2x%.2x-%.2x%.2x%.2x%.2x%.2x%.2x}", + d[3], d[2], d[1], d[0], d[5], d[4], d[7], d[6], + d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]); } else { value = ProcessRawBytes(¤t->name.OthName.name); } |