summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-31 16:27:48 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-31 16:27:48 +0000
commit93f10522a6c5e0033ee521e2c853e9884c967c0f (patch)
treef75ef9a518efbe861ab90bd64ba3cfdd68b9b720
parent8e6771318da33c189f8057307d33faacd8e0806e (diff)
downloadchromium_src-93f10522a6c5e0033ee521e2c853e9884c967c0f.zip
chromium_src-93f10522a6c5e0033ee521e2c853e9884c967c0f.tar.gz
chromium_src-93f10522a6c5e0033ee521e2c853e9884c967c0f.tar.bz2
chrome/common: Append base:: in the StringPrintf calls.
(Note: This is a TODO in string_util.h) BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4111011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64567 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/child_process_info.cc6
-rw-r--r--chrome/common/common_param_traits.cc16
-rw-r--r--chrome/common/extensions/extension_file_util.cc18
-rw-r--r--chrome/common/extensions/extension_l10n_util.cc12
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc2
-rw-r--r--chrome/common/extensions/extension_message_bundle.cc34
-rw-r--r--chrome/common/extensions/extension_unittest.cc12
-rw-r--r--chrome/common/extensions/extension_unpacker.cc7
-rw-r--r--chrome/common/gpu_messages.cc10
-rw-r--r--chrome/common/gpu_video_common.cc14
-rw-r--r--chrome/common/logging_chrome.cc14
-rw-r--r--chrome/common/net/gaia/gaia_authenticator2.cc42
-rw-r--r--chrome/common/net/gaia/gaia_authenticator2_unittest.cc6
-rw-r--r--chrome/common/render_messages.h2
-rw-r--r--chrome/common/sandbox_policy.cc2
-rw-r--r--chrome/common/security_filter_peer.cc2
-rw-r--r--chrome/common/webkit_param_traits.cc7
17 files changed, 105 insertions, 101 deletions
diff --git a/chrome/common/child_process_info.cc b/chrome/common/child_process_info.cc
index 41d066b..bd94ff26 100644
--- a/chrome/common/child_process_info.cc
+++ b/chrome/common/child_process_info.cc
@@ -135,9 +135,9 @@ std::string ChildProcessInfo::GenerateRandomChannelID(void* instance) {
// parent browser process, an identifier for the child instance, and a random
// component. We use a random component so that a hacked child process can't
// cause denial of service by causing future named pipe creation to fail.
- return StringPrintf("%d.%p.%d",
- base::GetCurrentProcId(), instance,
- base::RandInt(0, std::numeric_limits<int>::max()));
+ return base::StringPrintf("%d.%p.%d",
+ base::GetCurrentProcId(), instance,
+ base::RandInt(0, std::numeric_limits<int>::max()));
}
// static
diff --git a/chrome/common/common_param_traits.cc b/chrome/common/common_param_traits.cc
index d18c6c5..2fd8bdd 100644
--- a/chrome/common/common_param_traits.cc
+++ b/chrome/common/common_param_traits.cc
@@ -138,7 +138,7 @@ bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter,
}
void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::string* l) {
- l->append(StringPrintf("(%d, %d)", p.x(), p.y()));
+ l->append(base::StringPrintf("(%d, %d)", p.x(), p.y()));
}
@@ -164,8 +164,8 @@ bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
}
void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::string* l) {
- l->append(StringPrintf("(%d, %d, %d, %d)", p.x(), p.y(),
- p.width(), p.height()));
+ l->append(base::StringPrintf("(%d, %d, %d, %d)", p.x(), p.y(),
+ p.width(), p.height()));
}
@@ -185,7 +185,7 @@ bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
}
void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::string* l) {
- l->append(StringPrintf("(%d, %d)", p.width(), p.height()));
+ l->append(base::StringPrintf("(%d, %d)", p.width(), p.height()));
}
void ParamTraits<ContentSetting>::Write(Message* m, const param_type& p) {
@@ -435,8 +435,8 @@ bool ParamTraits<ThumbnailScore>::Read(const Message* m, void** iter,
}
void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::string* l) {
- l->append(StringPrintf("(%f, %d, %d)",
- p.boring_score, p.good_clipping, p.at_top));
+ l->append(base::StringPrintf("(%f, %d, %d)",
+ p.boring_score, p.good_clipping, p.at_top));
}
template <>
@@ -454,7 +454,7 @@ struct ParamTraits<Geoposition::ErrorCode> {
}
static void Log(const param_type& p, std::string* l) {
int error_code = p;
- l->append(StringPrintf("<Geoposition::ErrorCode>%d", error_code));
+ l->append(base::StringPrintf("<Geoposition::ErrorCode>%d", error_code));
}
};
@@ -488,7 +488,7 @@ bool ParamTraits<Geoposition>::Read(
void ParamTraits<Geoposition>::Log(const Geoposition& p, std::string* l) {
l->append(
- StringPrintf(
+ base::StringPrintf(
"<Geoposition>"
"%.6f %.6f %.6f %.6f "
"%.6f %.6f %.6f ",
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index c7be522..f2350cc 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -54,7 +54,7 @@ FilePath InstallExtension(const FilePath& unpacked_source_dir,
const int kMaxAttempts = 100;
for (int i = 0; i < kMaxAttempts; ++i) {
FilePath candidate = extension_dir.AppendASCII(
- StringPrintf("%s_%u", version.c_str(), i));
+ base::StringPrintf("%s_%u", version.c_str(), i));
if (!file_util::PathExists(candidate)) {
version_dir = candidate;
break;
@@ -102,9 +102,9 @@ scoped_refptr<Extension> LoadExtension(const FilePath& extension_path,
// error->empty(). For now, be consistent.
*error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_UNREADABLE);
} else {
- *error = StringPrintf("%s %s",
- errors::kManifestParseError,
- error->c_str());
+ *error = base::StringPrintf("%s %s",
+ errors::kManifestParseError,
+ error->c_str());
}
return NULL;
}
@@ -406,7 +406,7 @@ static bool ValidateLocaleInfo(const Extension& extension, std::string* error) {
locale_path.Append(Extension::kMessagesFilename);
if (!file_util::PathExists(messages_path)) {
- *error = StringPrintf(
+ *error = base::StringPrintf(
"%s %s", errors::kLocalesMessagesFileMissing,
WideToUTF8(messages_path.ToWStringHack()).c_str());
return false;
@@ -475,10 +475,10 @@ bool CheckForIllegalFilenames(const FilePath& extension_path,
if (filename.find_first_of(FILE_PATH_LITERAL("_")) != 0) continue;
if (reserved_underscore_names.find(filename) ==
reserved_underscore_names.end()) {
- *error = StringPrintf(
- "Cannot load extension with file or directory name %s. "
- "Filenames starting with \"_\" are reserved for use by the system.",
- filename.c_str());
+ *error = base::StringPrintf(
+ "Cannot load extension with file or directory name %s. "
+ "Filenames starting with \"_\" are reserved for use by the system.",
+ filename.c_str());
return false;
}
}
diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc
index 53950cb..8c7826c 100644
--- a/chrome/common/extensions/extension_l10n_util.cc
+++ b/chrome/common/extensions/extension_l10n_util.cc
@@ -146,8 +146,8 @@ bool AddLocale(const std::set<std::string>& chrome_locales,
if (chrome_locales.find(locale_name) == chrome_locales.end()) {
// Warn if there is an extension locale that's not in the Chrome list,
// but don't fail.
- LOG(WARNING) << StringPrintf("Supplied locale %s is not supported.",
- locale_name.c_str());
+ LOG(WARNING) << base::StringPrintf("Supplied locale %s is not supported.",
+ locale_name.c_str());
return true;
}
// Check if messages file is actually present (but don't check content).
@@ -155,8 +155,8 @@ bool AddLocale(const std::set<std::string>& chrome_locales,
locale_folder.Append(Extension::kMessagesFilename))) {
valid_locales->insert(locale_name);
} else {
- *error = StringPrintf("Catalog file is missing for locale %s.",
- locale_name.c_str());
+ *error = base::StringPrintf("Catalog file is missing for locale %s.",
+ locale_name.c_str());
return false;
}
@@ -250,8 +250,8 @@ static DictionaryValue* LoadMessageFile(const FilePath& locale_path,
if (!dictionary && error->empty()) {
// JSONFileValueSerializer just returns NULL if file cannot be found. It
// doesn't set the error, so we have to do it.
- *error = StringPrintf("Catalog file is missing for locale %s.",
- extension_locale.c_str());
+ *error = base::StringPrintf("Catalog file is missing for locale %s.",
+ extension_locale.c_str());
}
return static_cast<DictionaryValue*>(dictionary);
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index c27e2dd..3a89166 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -307,7 +307,7 @@ TEST_F(ExtensionManifestTest, DisallowExtensionPermissions) {
StringValue* p = new StringValue(name);
permissions->Clear();
permissions->Append(p);
- std::string message_name = StringPrintf("permission-%s", name);
+ std::string message_name = base::StringPrintf("permission-%s", name);
if (Extension::IsHostedAppPermission(name)) {
scoped_refptr<Extension> extension;
extension = LoadAndExpectSuccess(manifest.get(), message_name);
diff --git a/chrome/common/extensions/extension_message_bundle.cc b/chrome/common/extensions/extension_message_bundle.cc
index 4de6b45..3f7c152 100644
--- a/chrome/common/extensions/extension_message_bundle.cc
+++ b/chrome/common/extensions/extension_message_bundle.cc
@@ -48,8 +48,10 @@ const char* ExtensionMessageBundle::kBidiRightEdgeValue = "right";
// Formats message in case we encounter a bad formed key in the JSON object.
// Returns false and sets |error| to actual error message.
static bool BadKeyMessage(const std::string& name, std::string* error) {
- *error = StringPrintf("Name of a key \"%s\" is invalid. Only ASCII [a-z], "
- "[A-Z], [0-9] and \"_\" are allowed.", name.c_str());
+ *error = base::StringPrintf(
+ "Name of a key \"%s\" is invalid. Only ASCII [a-z], "
+ "[A-Z], [0-9] and \"_\" are allowed.",
+ name.c_str());
return false;
}
@@ -134,13 +136,13 @@ bool ExtensionMessageBundle::GetMessageValue(const std::string& key,
// Get the top level tree for given key (name part).
DictionaryValue* name_tree;
if (!catalog.GetDictionaryWithoutPathExpansion(key, &name_tree)) {
- *error = StringPrintf("Not a valid tree for key %s.", key.c_str());
+ *error = base::StringPrintf("Not a valid tree for key %s.", key.c_str());
return false;
}
// Extract message from it.
if (!name_tree->GetString(kMessageKey, value)) {
- *error = StringPrintf("There is no \"%s\" element for key %s.", kMessageKey,
- key.c_str());
+ *error = base::StringPrintf(
+ "There is no \"%s\" element for key %s.", kMessageKey, key.c_str());
return false;
}
@@ -166,8 +168,8 @@ bool ExtensionMessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
DictionaryValue* placeholders_tree;
if (!name_tree.GetDictionary(kPlaceholdersKey, &placeholders_tree)) {
- *error = StringPrintf("Not a valid \"%s\" element for key %s.",
- kPlaceholdersKey, name_key.c_str());
+ *error = base::StringPrintf("Not a valid \"%s\" element for key %s.",
+ kPlaceholdersKey, name_key.c_str());
return false;
}
@@ -179,15 +181,15 @@ bool ExtensionMessageBundle::GetPlaceholders(const DictionaryValue& name_tree,
return BadKeyMessage(content_key, error);
if (!placeholders_tree->GetDictionaryWithoutPathExpansion(content_key,
&placeholder)) {
- *error = StringPrintf("Invalid placeholder %s for key %s",
- content_key.c_str(),
- name_key.c_str());
+ *error = base::StringPrintf("Invalid placeholder %s for key %s",
+ content_key.c_str(),
+ name_key.c_str());
return false;
}
std::string content;
if (!placeholder->GetString(kContentKey, &content)) {
- *error = StringPrintf("Invalid \"%s\" element for key %s.",
- kContentKey, name_key.c_str());
+ *error = base::StringPrintf("Invalid \"%s\" element for key %s.",
+ kContentKey, name_key.c_str());
return false;
}
(*placeholders)[StringToLowerASCII(content_key)] = content;
@@ -253,10 +255,10 @@ bool ExtensionMessageBundle::ReplaceVariables(
SubstitutionMap::const_iterator it =
variables.find(StringToLowerASCII(var_name));
if (it == variables.end()) {
- *error = StringPrintf("Variable %s%s%s used but not defined.",
- var_begin_delimiter.c_str(),
- var_name.c_str(),
- var_end_delimiter.c_str());
+ *error = base::StringPrintf("Variable %s%s%s used but not defined.",
+ var_begin_delimiter.c_str(),
+ var_name.c_str(),
+ var_end_delimiter.c_str());
return false;
}
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 3bad1dc..9aec5fe 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -427,9 +427,9 @@ TEST(ExtensionTest, GetResourceURLAndPath) {
TEST(ExtensionTest, LoadPageActionHelper) {
#if defined(OS_WIN)
- FilePath path(StringPrintf(L"c:\\extension"));
+ FilePath path(base::StringPrintf(L"c:\\extension"));
#else
- FilePath path(StringPrintf("/extension"));
+ FilePath path(base::StringPrintf("/extension"));
#endif
scoped_refptr<Extension> extension_ptr(new Extension(path,
Extension::INVALID));
@@ -661,9 +661,9 @@ TEST(ExtensionTest, UpdateUrls) {
#if defined(OS_WIN)
// (Why %Iu below? This is the single file in the whole code base that
// might make use of a WidePRIuS; let's not encourage any more.)
- FilePath path(StringPrintf(L"c:\\extension%Iu", i));
+ FilePath path(base::StringPrintf(L"c:\\extension%Iu", i));
#else
- FilePath path(StringPrintf("/extension%" PRIuS, i));
+ FilePath path(base::StringPrintf("/extension%" PRIuS, i));
#endif
std::string error;
@@ -686,9 +686,9 @@ TEST(ExtensionTest, UpdateUrls) {
#if defined(OS_WIN)
// (Why %Iu below? This is the single file in the whole code base that
// might make use of a WidePRIuS; let's not encourage any more.)
- FilePath path(StringPrintf(L"c:\\extension%Iu", i));
+ FilePath path(base::StringPrintf(L"c:\\extension%Iu", i));
#else
- FilePath path(StringPrintf("/extension%" PRIuS, i));
+ FilePath path(base::StringPrintf("/extension%" PRIuS, i));
#endif
std::string error;
input_value.SetString(keys::kVersion, "1.0");
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index 3f718c9..e270870 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -289,10 +289,11 @@ bool ExtensionUnpacker::ReadMessageCatalog(const FilePath& message_path) {
std::string messages_file = WideToASCII(message_path.ToWStringHack());
if (error.empty()) {
// If file is missing, Deserialize will fail with empty error.
- SetError(StringPrintf("%s %s", errors::kLocalesMessagesFileMissing,
- messages_file.c_str()));
+ SetError(base::StringPrintf("%s %s", errors::kLocalesMessagesFileMissing,
+ messages_file.c_str()));
} else {
- SetError(StringPrintf("%s: %s", messages_file.c_str(), error.c_str()));
+ SetError(base::StringPrintf("%s: %s", messages_file.c_str(),
+ error.c_str()));
}
return false;
}
diff --git a/chrome/common/gpu_messages.cc b/chrome/common/gpu_messages.cc
index db7f597..b8232b8 100644
--- a/chrome/common/gpu_messages.cc
+++ b/chrome/common/gpu_messages.cc
@@ -126,11 +126,11 @@ bool ParamTraits<GPUInfo> ::Read(const Message* m, void** iter, param_type* p) {
}
void ParamTraits<GPUInfo> ::Log(const param_type& p, std::string* l) {
- l->append(StringPrintf("<GPUInfo> %x %x %ls %d",
- p.vendor_id(),
- p.device_id(),
- p.driver_version().c_str(),
- p.can_lose_context()));
+ l->append(base::StringPrintf("<GPUInfo> %x %x %ls %d",
+ p.vendor_id(),
+ p.device_id(),
+ p.driver_version().c_str(),
+ p.can_lose_context()));
}
void ParamTraits<DxDiagNode> ::Write(Message* m, const param_type& p) {
diff --git a/chrome/common/gpu_video_common.cc b/chrome/common/gpu_video_common.cc
index 67466b9..9e25a5f 100644
--- a/chrome/common/gpu_video_common.cc
+++ b/chrome/common/gpu_video_common.cc
@@ -28,7 +28,7 @@ bool ParamTraits<GpuVideoDecoderInitParam>::Read(
void ParamTraits<GpuVideoDecoderInitParam>::Log(
const GpuVideoDecoderInitParam& p, std::string* l) {
- l->append(StringPrintf("(%d, %d %d)", p.codec_id, p.width, p.height));
+ l->append(base::StringPrintf("(%d, %d %d)", p.codec_id, p.width, p.height));
}
///////////////////////////////////////////////////////////////////////////////
@@ -51,7 +51,7 @@ bool ParamTraits<GpuVideoDecoderInitDoneParam>::Read(
void ParamTraits<GpuVideoDecoderInitDoneParam>::Log(
const GpuVideoDecoderInitDoneParam& p, std::string* l) {
- l->append(StringPrintf("(%d %d)", p.success, p.input_buffer_size));
+ l->append(base::StringPrintf("(%d %d)", p.success, p.input_buffer_size));
}
///////////////////////////////////////////////////////////////////////////////
@@ -74,9 +74,9 @@ bool ParamTraits<GpuVideoDecoderInputBufferParam>::Read(
void ParamTraits<GpuVideoDecoderInputBufferParam>::Log(
const GpuVideoDecoderInputBufferParam& p, std::string* l) {
- l->append(StringPrintf("(%d %d %d)",
- static_cast<int>(p.timestamp),
- p.offset, p.size));
+ l->append(base::StringPrintf("(%d %d %d)",
+ static_cast<int>(p.timestamp),
+ p.offset, p.size));
}
///////////////////////////////////////////////////////////////////////////////
@@ -95,7 +95,7 @@ bool ParamTraits<GpuVideoDecoderErrorInfoParam>::Read(
void ParamTraits<GpuVideoDecoderErrorInfoParam>::Log(
const GpuVideoDecoderErrorInfoParam& p, std::string* l) {
- l->append(StringPrintf("(%d)", p.error_id));
+ l->append(base::StringPrintf("(%d)", p.error_id));
}
///////////////////////////////////////////////////////////////////////////////
@@ -114,7 +114,7 @@ bool ParamTraits<GpuVideoDecoderFormatChangeParam>::Read(
void ParamTraits<GpuVideoDecoderFormatChangeParam>::Log(
const GpuVideoDecoderFormatChangeParam& p, std::string* l) {
- l->append(StringPrintf("%d", p.input_buffer_size));
+ l->append(base::StringPrintf("%d", p.input_buffer_size));
}
///////////////////////////////////////////////////////////////////////////////
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 116b37a..6106e43 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -140,13 +140,13 @@ FilePath GenerateTimestampedName(const FilePath& base_path,
base::Time timestamp) {
base::Time::Exploded time_deets;
timestamp.LocalExplode(&time_deets);
- std::string suffix = StringPrintf("_%02d%02d%02d-%02d%02d%02d",
- time_deets.year,
- time_deets.month,
- time_deets.day_of_month,
- time_deets.hour,
- time_deets.minute,
- time_deets.second);
+ std::string suffix = base::StringPrintf("_%02d%02d%02d-%02d%02d%02d",
+ time_deets.year,
+ time_deets.month,
+ time_deets.day_of_month,
+ time_deets.hour,
+ time_deets.minute,
+ time_deets.second);
return base_path.InsertBeforeExtension(suffix);
}
diff --git a/chrome/common/net/gaia/gaia_authenticator2.cc b/chrome/common/net/gaia/gaia_authenticator2.cc
index 108d76c..dfb84d8 100644
--- a/chrome/common/net/gaia/gaia_authenticator2.cc
+++ b/chrome/common/net/gaia/gaia_authenticator2.cc
@@ -149,24 +149,24 @@ std::string GaiaAuthenticator2::MakeClientLoginBody(
kAccountTypeGoogle;
if (login_token.empty() || login_captcha.empty()) {
- return StringPrintf(kClientLoginFormat,
- encoded_username.c_str(),
- encoded_password.c_str(),
- kCookiePersistence,
- account_type,
- source.c_str(),
- service);
+ return base::StringPrintf(kClientLoginFormat,
+ encoded_username.c_str(),
+ encoded_password.c_str(),
+ kCookiePersistence,
+ account_type,
+ source.c_str(),
+ service);
}
- return StringPrintf(kClientLoginCaptchaFormat,
- encoded_username.c_str(),
- encoded_password.c_str(),
- kCookiePersistence,
- account_type,
- source.c_str(),
- service,
- encoded_login_token.c_str(),
- encoded_login_captcha.c_str());
+ return base::StringPrintf(kClientLoginCaptchaFormat,
+ encoded_username.c_str(),
+ encoded_password.c_str(),
+ kCookiePersistence,
+ account_type,
+ source.c_str(),
+ service,
+ encoded_login_token.c_str(),
+ encoded_login_captcha.c_str());
}
@@ -178,16 +178,16 @@ std::string GaiaAuthenticator2::MakeIssueAuthTokenBody(
std::string encoded_sid = UrlEncodeString(sid);
std::string encoded_lsid = UrlEncodeString(lsid);
- return StringPrintf(kIssueAuthTokenFormat,
- encoded_sid.c_str(),
- encoded_lsid.c_str(),
- service);
+ return base::StringPrintf(kIssueAuthTokenFormat,
+ encoded_sid.c_str(),
+ encoded_lsid.c_str(),
+ service);
}
// static
std::string GaiaAuthenticator2::MakeGetUserInfoBody(const std::string& lsid) {
std::string encoded_lsid = UrlEncodeString(lsid);
- return StringPrintf(kGetUserInfoFormat, encoded_lsid.c_str());
+ return base::StringPrintf(kGetUserInfoFormat, encoded_lsid.c_str());
}
// Helper method that extracts tokens from a successful reply.
diff --git a/chrome/common/net/gaia/gaia_authenticator2_unittest.cc b/chrome/common/net/gaia/gaia_authenticator2_unittest.cc
index 44d1a17..6ef0a51 100644
--- a/chrome/common/net/gaia/gaia_authenticator2_unittest.cc
+++ b/chrome/common/net/gaia/gaia_authenticator2_unittest.cc
@@ -245,8 +245,8 @@ TEST_F(GaiaAuthenticator2Test, WorkingIssueAuthToken) {
TEST_F(GaiaAuthenticator2Test, CheckTwoFactorResponse) {
std::string response =
- StringPrintf("Error=BadAuthentication\n%s\n",
- GaiaAuthenticator2::kSecondFactor);
+ base::StringPrintf("Error=BadAuthentication\n%s\n",
+ GaiaAuthenticator2::kSecondFactor);
EXPECT_TRUE(GaiaAuthenticator2::IsSecondFactorSuccess(response));
}
@@ -256,7 +256,7 @@ TEST_F(GaiaAuthenticator2Test, CheckNormalErrorCode) {
}
TEST_F(GaiaAuthenticator2Test, TwoFactorLogin) {
- std::string response = StringPrintf("Error=BadAuthentication\n%s\n",
+ std::string response = base::StringPrintf("Error=BadAuthentication\n%s\n",
GaiaAuthenticator2::kSecondFactor);
GoogleServiceAuthError error =
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 9ce8930..6c15dd4 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -316,7 +316,7 @@ struct ParamTraits<gfx::NativeView> {
}
static void Log(const param_type& p, std::string* l) {
- l->append(StringPrintf("<gfx::NativeView>"));
+ l->append(base::StringPrintf("<gfx::NativeView>"));
}
};
diff --git a/chrome/common/sandbox_policy.cc b/chrome/common/sandbox_policy.cc
index 89bea60..0ab7563 100644
--- a/chrome/common/sandbox_policy.cc
+++ b/chrome/common/sandbox_policy.cc
@@ -513,7 +513,7 @@ base::ProcessHandle StartProcessWithAccess(CommandLine* cmd_line,
// Prefetch hints on windows:
// Using a different prefetch profile per process type will allow Windows
// to create separate pretetch settings for browser, renderer etc.
- cmd_line->AppendArg(StringPrintf("/prefetch:%d", type));
+ cmd_line->AppendArg(base::StringPrintf("/prefetch:%d", type));
if (!in_sandbox) {
base::LaunchApp(*cmd_line, false, false, &process);
diff --git a/chrome/common/security_filter_peer.cc b/chrome/common/security_filter_peer.cc
index 6fae4d3..3be8864 100644
--- a/chrome/common/security_filter_peer.cc
+++ b/chrome/common/security_filter_peer.cc
@@ -53,7 +53,7 @@ SecurityFilterPeer* SecurityFilterPeer::CreateSecurityFilterPeerForFrame(
webkit_glue::ResourceLoaderBridge::Peer* peer, int os_error) {
// TODO(jcampan): use a different message when getting a phishing/malware
// error.
- std::string html = StringPrintf(
+ std::string html = base::StringPrintf(
"<html><meta charset='UTF-8'>"
"<body style='background-color:#990000;color:white;'>"
"%s</body></html>",
diff --git a/chrome/common/webkit_param_traits.cc b/chrome/common/webkit_param_traits.cc
index 26465dd..909d7fd 100644
--- a/chrome/common/webkit_param_traits.cc
+++ b/chrome/common/webkit_param_traits.cc
@@ -40,7 +40,8 @@ void ParamTraits<WebKit::WebRect>::Log(const param_type& p, std::string* l) {
l->append(")");
}
-void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m, const param_type& p) {
+void ParamTraits<WebKit::WebScreenInfo>::Write(Message* m,
+ const param_type& p) {
WriteParam(m, p.depth);
WriteParam(m, p.depthPerComponent);
WriteParam(m, p.isMonochrome);
@@ -101,8 +102,8 @@ void ParamTraits<WebKit::WebFindOptions>::Log(const param_type& p,
void ParamTraits<WebKit::WebCache::ResourceTypeStat>::Log(
const param_type& p, std::string* l) {
- l->append(StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS,
- p.count, p.size, p.liveSize, p.decodedSize));
+ l->append(base::StringPrintf("%" PRIuS " %" PRIuS " %" PRIuS " %" PRIuS,
+ p.count, p.size, p.liveSize, p.decodedSize));
}
void ParamTraits<WebKit::WebMediaPlayerAction>::Write(Message* m,