summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 01:55:40 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 01:55:40 +0000
commit1870d5cfa5ca359b44a32322c225cca1b2818e91 (patch)
tree410cfe2ee14081320dfbab6743ba85683e1aa6f3
parent2ba45d1412dd0bbfea931a497efad37540a8d9df (diff)
downloadchromium_src-1870d5cfa5ca359b44a32322c225cca1b2818e91.zip
chromium_src-1870d5cfa5ca359b44a32322c225cca1b2818e91.tar.gz
chromium_src-1870d5cfa5ca359b44a32322c225cca1b2818e91.tar.bz2
iwyu: Include stringprintf.h where appropriate, part 3.
BUG=82098 TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/7016011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85088 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/files/file_path_watcher_browsertest.cc4
-rw-r--r--base/i18n/break_iterator_unittest.cc8
-rw-r--r--base/metrics/stats_table_unittest.cc4
-rw-r--r--chrome/browser/autocomplete/autocomplete_browsertest.cc2
-rw-r--r--chrome/browser/browser_focus_uitest.cc11
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc16
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc6
-rw-r--r--chrome/browser/extensions/app_background_page_apitest.cc8
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc12
-rw-r--r--chrome/browser/media_uitest.cc7
-rw-r--r--chrome/browser/process_singleton_linux_uitest.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_test.cc34
-rw-r--r--chrome/browser/sync/engine/apply_updates_command_unittest.cc10
-rw-r--r--chrome/browser/sync/engine/process_commit_response_command_unittest.cc13
-rw-r--r--chrome/browser/sync/engine/syncapi_unittest.cc8
-rw-r--r--chrome/browser/sync/engine/syncer_unittest.cc3
-rw-r--r--chrome/browser/sync/syncable/syncable_unittest.cc6
-rw-r--r--chrome/browser/visitedlink/visitedlink_perftest.cc4
-rw-r--r--chrome/common/extensions/extension_manifests_unittest.cc1
-rw-r--r--chrome/common/extensions/extension_unittest.cc2
-rw-r--r--chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc2
-rw-r--r--chrome/renderer/safe_browsing/features_unittest.cc8
-rw-r--r--chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc6
-rw-r--r--chrome/service/cloud_print/cloud_print_helpers_unittest.cc48
-rw-r--r--chrome/test/live_sync/live_passwords_sync_test.cc9
-rw-r--r--chrome/test/live_sync/live_sync_test.cc3
-rw-r--r--chrome/test/live_sync/multiple_client_live_bookmarks_sync_test.cc4
-rw-r--r--chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc4
-rw-r--r--chrome/test/startup/feature_startup_test.cc2
-rw-r--r--chrome/test/startup/shutdown_test.cc2
-rw-r--r--chrome/test/startup/startup_test.cc2
-rw-r--r--chrome/test/sync/engine/mock_connection_manager.cc3
-rw-r--r--chrome/test/v8_unit_test.cc11
-rw-r--r--chrome/tools/convert_dict/convert_dict_unittest.cc16
-rw-r--r--content/browser/geolocation/network_location_provider_unittest.cc6
-rw-r--r--courgette/adjustment_method.cc3
-rw-r--r--courgette/adjustment_method_2.cc3
-rw-r--r--jingle/notifier/listener/push_notifications_send_update_task_unittest.cc4
-rw-r--r--jingle/notifier/listener/push_notifications_subscribe_task_unittest.cc4
-rw-r--r--media/audio/linux/alsa_output_unittest.cc4
-rw-r--r--media/base/video_frame_unittest.cc6
-rw-r--r--net/ftp/ftp_directory_listing_parser_unittest.cc2
-rw-r--r--net/http/http_transaction_unittest.cc2
-rw-r--r--net/socket/client_socket_pool_base_unittest.cc15
-rw-r--r--net/tools/flip_server/balsa_headers.cc3
-rw-r--r--printing/page_overlays_unittest.cc8
-rw-r--r--remoting/jingle_glue/iq_request_unittest.cc4
-rw-r--r--ui/base/clipboard/clipboard_util_win.cc8
-rw-r--r--ui/base/l10n/l10n_util.cc4
49 files changed, 190 insertions, 169 deletions
diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc
index d623c90..eb179c4 100644
--- a/base/files/file_path_watcher_browsertest.cc
+++ b/base/files/file_path_watcher_browsertest.cc
@@ -21,8 +21,8 @@
#include "base/message_loop.h"
#include "base/message_loop_proxy.h"
#include "base/path_service.h"
-#include "base/string_util.h"
#include "base/stl_util-inl.h"
+#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
@@ -335,7 +335,7 @@ TEST_F(FilePathWatcherTest, DirectoryChain) {
FilePath path(temp_dir_.path());
std::vector<std::string> dir_names;
for (int i = 0; i < 20; i++) {
- std::string dir(StringPrintf("d%d", i));
+ std::string dir(base::StringPrintf("d%d", i));
dir_names.push_back(dir);
path = path.AppendASCII(dir);
}
diff --git a/base/i18n/break_iterator_unittest.cc b/base/i18n/break_iterator_unittest.cc
index bf4fdc1..a0bcee1 100644
--- a/base/i18n/break_iterator_unittest.cc
+++ b/base/i18n/break_iterator_unittest.cc
@@ -4,8 +4,8 @@
#include "base/i18n/break_iterator.h"
+#include "base/stringprintf.h"
#include "base/string_piece.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -88,7 +88,7 @@ TEST(BreakIteratorTest, BreakWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
const char* very_wide_char = "\xF0\x9D\x92\x9C";
const string16 str(
- UTF8ToUTF16(StringPrintf("%s a", very_wide_char)));
+ UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 2));
base::BreakIterator iter(&str, base::BreakIterator::BREAK_WORD);
@@ -193,7 +193,7 @@ TEST(BreakIteratorTest, BreakSpaceWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
const char* very_wide_char = "\xF0\x9D\x92\x9C";
const string16 str(
- UTF8ToUTF16(StringPrintf("%s a", very_wide_char)));
+ UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 3));
base::BreakIterator iter(&str, base::BreakIterator::BREAK_SPACE);
@@ -291,7 +291,7 @@ TEST(BreakIteratorTest, BreakLineWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
const char* very_wide_char = "\xF0\x9D\x92\x9C";
const string16 str(
- UTF8ToUTF16(StringPrintf("%s\na", very_wide_char)));
+ UTF8ToUTF16(base::StringPrintf("%s\na", very_wide_char)));
const string16 very_wide_line(str.substr(0, 3));
base::BreakIterator iter(&str, base::BreakIterator::BREAK_NEWLINE);
ASSERT_TRUE(iter.Init());
diff --git a/base/metrics/stats_table_unittest.cc b/base/metrics/stats_table_unittest.cc
index 944813d..32484a6 100644
--- a/base/metrics/stats_table_unittest.cc
+++ b/base/metrics/stats_table_unittest.cc
@@ -5,8 +5,8 @@
#include "base/metrics/stats_counters.h"
#include "base/metrics/stats_table.h"
#include "base/shared_memory.h"
+#include "base/stringprintf.h"
#include "base/string_piece.h"
-#include "base/string_util.h"
#include "base/test/multiprocess_test.h"
#include "base/threading/platform_thread.h"
#include "base/threading/simple_thread.h"
@@ -42,7 +42,7 @@ TEST_F(StatsTableTest, VerifySlots) {
std::string counter_base_name = "counter";
for (int index = 0; index < kMaxCounter; index++) {
std::string counter_name = counter_base_name;
- StringAppendF(&counter_name, "counter.ctr%d", index);
+ base::StringAppendF(&counter_name, "counter.ctr%d", index);
int counter_id = table.FindCounter(counter_name);
EXPECT_GT(counter_id, 0);
}
diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc
index 888b5c5..d38b98c 100644
--- a/chrome/browser/autocomplete/autocomplete_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/format_macros.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 132655b..4ef0bec 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -8,8 +8,8 @@
#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
@@ -45,6 +45,7 @@
#if defined(OS_WIN)
#include <Psapi.h>
#include <windows.h>
+#include "base/string_util.h"
#endif
#if defined(OS_LINUX)
@@ -465,7 +466,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// Test forward focus traversal.
for (int i = 0; i < 3; ++i) {
- SCOPED_TRACE(StringPrintf("outer loop: %d", i));
+ SCOPED_TRACE(base::StringPrintf("outer loop: %d", i));
// Location bar should be focused.
ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR));
@@ -475,7 +476,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// Now let's press tab to move the focus.
for (size_t j = 0; j < arraysize(kExpElementIDs); ++j) {
- SCOPED_TRACE(StringPrintf("inner loop %" PRIuS, j));
+ SCOPED_TRACE(base::StringPrintf("inner loop %" PRIuS, j));
// Let's make sure the focus is on the expected element in the page.
std::string actual;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
@@ -515,7 +516,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// Now let's try reverse focus traversal.
for (int i = 0; i < 3; ++i) {
- SCOPED_TRACE(StringPrintf("outer loop: %d", i));
+ SCOPED_TRACE(base::StringPrintf("outer loop: %d", i));
// Location bar should be focused.
ASSERT_TRUE(IsViewFocused(VIEW_ID_LOCATION_BAR));
@@ -525,7 +526,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
// Now let's press shift-tab to move the focus in reverse.
for (size_t j = 0; j < arraysize(kExpElementIDs); ++j) {
- SCOPED_TRACE(StringPrintf("inner loop: %" PRIuS, j));
+ SCOPED_TRACE(base::StringPrintf("inner loop: %" PRIuS, j));
const char* next_element =
kExpElementIDs[arraysize(kExpElementIDs) - 1 - j];
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 4248912..bb0231d 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/dom_operation_notification_details.h"
@@ -144,7 +144,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
L"",
- StringPrintf(kSuppressEventJS, type, GetBoolString(!suppress)),
+ base::StringPrintf(kSuppressEventJS, type, GetBoolString(!suppress)),
&actual));
ASSERT_EQ(!suppress, actual);
}
@@ -181,7 +181,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
std::string actual;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
- L"", StringPrintf(kGetResultJS, i), &actual));
+ L"", base::StringPrintf(kGetResultJS, i), &actual));
// If more events were received than expected, then the additional events
// must be keyup events.
@@ -207,7 +207,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
L"",
- StringPrintf(kSetFocusedElementJS, focused),
+ base::StringPrintf(kSetFocusedElementJS, focused),
&actual));
ASSERT_TRUE(actual);
}
@@ -219,7 +219,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
L"",
- StringPrintf(kGetTextBoxValueJS, id),
+ base::StringPrintf(kGetTextBoxValueJS, id),
&actual));
ASSERT_EQ(WideToUTF8(value), actual);
}
@@ -231,7 +231,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
L"",
- StringPrintf(kSetTextBoxValueJS, id, value),
+ base::StringPrintf(kSetTextBoxValueJS, id, value),
&actual));
ASSERT_EQ(WideToUTF8(value), actual);
}
@@ -241,7 +241,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
bool actual;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
browser()->GetTabContentsAt(tab_index)->render_view_host(),
- L"", StringPrintf(kStartTestJS, result_length), &actual));
+ L"", base::StringPrintf(kStartTestJS, result_length), &actual));
ASSERT_TRUE(actual);
}
@@ -270,7 +270,7 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
}
std::string GetTestDataDescription(const KeyEventTestData& data) {
- std::string desc = StringPrintf(
+ std::string desc = base::StringPrintf(
" VKEY:0x%02x, ctrl:%d, shift:%d, alt:%d, command:%d\n"
" Suppress: keydown:%d, keypress:%d, keyup:%d, textInput:%d\n"
" Expected results(%d):\n",
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index 125c461..5c98288 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -4,7 +4,7 @@
#include "base/command_line.h"
#include "base/path_service.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/debugger/devtools_client_host.h"
#include "chrome/browser/debugger/devtools_manager.h"
@@ -85,8 +85,8 @@ class DevToolsSanityTest : public InProcessBrowserTest {
ui_test_utils::ExecuteJavaScriptAndExtractString(
client_contents_->render_view_host(),
L"",
- UTF8ToWide(StringPrintf("uiTests.runTest('%s')",
- test_name.c_str())),
+ UTF8ToWide(base::StringPrintf("uiTests.runTest('%s')",
+ test_name.c_str())),
&result));
EXPECT_EQ("[OK]", result);
} else {
diff --git a/chrome/browser/extensions/app_background_page_apitest.cc b/chrome/browser/extensions/app_background_page_apitest.cc
index 39319dd..a8c67ef 100644
--- a/chrome/browser/extensions/app_background_page_apitest.cc
+++ b/chrome/browser/extensions/app_background_page_apitest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/browser/background_contents_service.h"
#include "chrome/browser/background_contents_service_factory.h"
#include "chrome/browser/extensions/extension_apitest.h"
@@ -49,7 +49,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, Basic) {
host_resolver()->AddRule("a.com", "127.0.0.1");
ASSERT_TRUE(StartTestServer());
- std::string app_manifest = StringPrintf(
+ std::string app_manifest = base::StringPrintf(
"{"
" \"name\": \"App\","
" \"version\": \"0.1\","
@@ -76,7 +76,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, DISABLED_LacksPermission) {
host_resolver()->AddRule("a.com", "127.0.0.1");
ASSERT_TRUE(StartTestServer());
- std::string app_manifest = StringPrintf(
+ std::string app_manifest = base::StringPrintf(
"{"
" \"name\": \"App\","
" \"version\": \"0.1\","
@@ -102,7 +102,7 @@ IN_PROC_BROWSER_TEST_F(AppBackgroundPageApiTest, ManifestBackgroundPage) {
host_resolver()->AddRule("a.com", "127.0.0.1");
ASSERT_TRUE(StartTestServer());
- std::string app_manifest = StringPrintf(
+ std::string app_manifest = base::StringPrintf(
"{"
" \"name\": \"App\","
" \"version\": \"0.1\","
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 4f21a0a..38adc83 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -3,8 +3,8 @@
// found in the LICENSE file.
#include "base/compiler_specific.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/dom_operation_notification_details.h"
@@ -46,7 +46,7 @@ class IFrameLoader : public NotificationObserver {
Source<NavigationController>(controller));
registrar_.Add(this, NotificationType::DOM_OPERATION_RESPONSE,
NotificationService::AllSources());
- std::string script = StringPrintf(
+ std::string script = base::StringPrintf(
"window.domAutomationController.setAutomationId(0);"
"window.domAutomationController.send(addIFrame(%d, \"%s\"));",
iframe_id,
@@ -55,10 +55,10 @@ class IFrameLoader : public NotificationObserver {
ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(script));
ui_test_utils::RunMessageLoop();
- EXPECT_EQ(StringPrintf("\"%d\"", iframe_id), javascript_response_);
+ EXPECT_EQ(base::StringPrintf("\"%d\"", iframe_id), javascript_response_);
registrar_.RemoveAll();
// Now that we loaded the iframe, let's fetch its src.
- script = StringPrintf(
+ script = base::StringPrintf(
"window.domAutomationController.send(getIFrameSrc(%d))", iframe_id);
std::string iframe_src;
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
@@ -342,7 +342,7 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
void CheckStringValueFromJavascriptForTab(
const std::string& expected, const std::string& function,
TabContents* tab_contents) {
- std::string script = StringPrintf(
+ std::string script = base::StringPrintf(
"window.domAutomationController.send(%s)", function.c_str());
std::string result;
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
@@ -602,7 +602,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, TwoWatchesInOneFrame) {
ASSERT_TRUE(Initialize(INITIALIZATION_NONE));
// First, set the JavaScript to navigate when it receives |final_position|.
const Geoposition final_position = GeopositionFromLatLong(3.17, 4.23);
- std::string script = StringPrintf(
+ std::string script = base::StringPrintf(
"window.domAutomationController.send(geoSetFinalPosition(%f, %f))",
final_position.latitude, final_position.longitude);
std::string js_result;
diff --git a/chrome/browser/media_uitest.cc b/chrome/browser/media_uitest.cc
index 3a835a4..89ac5290 100644
--- a/chrome/browser/media_uitest.cc
+++ b/chrome/browser/media_uitest.cc
@@ -4,6 +4,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/stringprintf.h"
#include "base/string_util.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
@@ -35,10 +36,8 @@ class MediaTest : public UITest {
test_file = test_file.AppendASCII("media/player.html");
GURL player_gurl = net::FilePathToFileURL(test_file);
- std::string url = StringPrintf("%s?%s=%s",
- player_gurl.spec().c_str(),
- tag,
- media_file);
+ std::string url = base::StringPrintf(
+ "%s?%s=%s", player_gurl.spec().c_str(), tag, media_file);
NavigateToURL(GURL(url));
diff --git a/chrome/browser/process_singleton_linux_uitest.cc b/chrome/browser/process_singleton_linux_uitest.cc
index 2129ed0..bc69d0f 100644
--- a/chrome/browser/process_singleton_linux_uitest.cc
+++ b/chrome/browser/process_singleton_linux_uitest.cc
@@ -13,7 +13,7 @@
#include "base/eintr_wrapper.h"
#include "base/path_service.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/test/test_timeouts.h"
#include "base/threading/thread.h"
#include "base/utf_string_conversions.h"
@@ -187,7 +187,7 @@ TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessFailure) {
TEST_F(ProcessSingletonLinuxTest, NotifyOtherProcessNoSuicide) {
// Replace lockfile with one containing our own pid.
EXPECT_EQ(0, unlink(lock_path_.value().c_str()));
- std::string symlink_content = StringPrintf(
+ std::string symlink_content = base::StringPrintf(
"%s%c%u",
net::GetHostName().c_str(),
'-',
diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc
index 53c65fe..3c8a0aa2 100644
--- a/chrome/browser/safe_browsing/safe_browsing_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_test.cc
@@ -20,9 +20,9 @@
#include "base/environment.h"
#include "base/path_service.h"
#include "base/process_util.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
-#include "base/string_util.h"
#include "base/synchronization/lock.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
@@ -141,7 +141,7 @@ class SafeBrowsingTestServer {
CommandLine cmd_line(python_runtime);
FilePath datafile = testserver_path.Append(datafile_);
cmd_line.AppendArgPath(testserver);
- cmd_line.AppendSwitchASCII("port", StringPrintf("%d", kPort_));
+ cmd_line.AppendSwitchASCII("port", base::StringPrintf("%d", kPort_));
cmd_line.AppendSwitchPath("datafile", datafile);
if (!base::LaunchApp(cmd_line, false, true, &server_handle_)) {
@@ -303,15 +303,15 @@ class SafeBrowsingServiceTest : public InProcessBrowserTest {
// server. Although in real production, they are served from different
// servers.
std::string url_prefix =
- StringPrintf("http://%s:%d/safebrowsing",
- SafeBrowsingTestServer::Host(),
- SafeBrowsingTestServer::Port());
+ base::StringPrintf("http://%s:%d/safebrowsing",
+ SafeBrowsingTestServer::Host(),
+ SafeBrowsingTestServer::Port());
command_line->AppendSwitchASCII(switches::kSbInfoURLPrefix, url_prefix);
command_line->AppendSwitchASCII(switches::kSbMacKeyURLPrefix, url_prefix);
}
void SetTestStep(int step) {
- std::string test_step = StringPrintf("test_step=%d", step);
+ std::string test_step = base::StringPrintf("test_step=%d", step);
safe_browsing_service_->protocol_manager_->set_additional_query(test_step);
}
@@ -448,8 +448,8 @@ class SafeBrowsingServiceTestHelper
void WaitTillServerReady(const char* host, int port) {
response_status_ = net::URLRequestStatus::FAILED;
- GURL url(StringPrintf("http://%s:%d%s?test_step=0",
- host, port, kDBResetPath));
+ GURL url(base::StringPrintf("http://%s:%d%s?test_step=0",
+ host, port, kDBResetPath));
// TODO(lzheng): We should have a way to reliably tell when a server is
// ready so we could get rid of the Sleep and retry loop.
while (true) {
@@ -466,19 +466,21 @@ class SafeBrowsingServiceTestHelper
net::URLRequestStatus::Status FetchDBToVerify(const char* host, int port,
int test_step) {
// TODO(lzheng): Remove chunk_type=add once it is not needed by the server.
- GURL url(StringPrintf("http://%s:%d%s?"
- "client=chromium&appver=1.0&pver=2.2&test_step=%d&"
- "chunk_type=add",
- host, port, kDBVerifyPath, test_step));
+ GURL url(base::StringPrintf(
+ "http://%s:%d%s?"
+ "client=chromium&appver=1.0&pver=2.2&test_step=%d&"
+ "chunk_type=add",
+ host, port, kDBVerifyPath, test_step));
return FetchUrl(url);
}
// Calls test server to fetch URLs for verification.
net::URLRequestStatus::Status FetchUrlsToVerify(const char* host, int port,
int test_step) {
- GURL url(StringPrintf("http://%s:%d%s?"
- "client=chromium&appver=1.0&pver=2.2&test_step=%d",
- host, port, kUrlVerifyPath, test_step));
+ GURL url(base::StringPrintf(
+ "http://%s:%d%s?"
+ "client=chromium&appver=1.0&pver=2.2&test_step=%d",
+ host, port, kUrlVerifyPath, test_step));
return FetchUrl(url);
}
@@ -565,7 +567,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingServiceTest, SafeBrowsingSystemTest) {
// This repeats till there is no update data.
for (int step = 1;; step++) {
// Every step should be a fresh start.
- SCOPED_TRACE(StringPrintf("step=%d", step));
+ SCOPED_TRACE(base::StringPrintf("step=%d", step));
EXPECT_TRUE(is_database_ready());
EXPECT_FALSE(is_update_scheduled());
diff --git a/chrome/browser/sync/engine/apply_updates_command_unittest.cc b/chrome/browser/sync/engine/apply_updates_command_unittest.cc
index db2321a..e876113 100644
--- a/chrome/browser/sync/engine/apply_updates_command_unittest.cc
+++ b/chrome/browser/sync/engine/apply_updates_command_unittest.cc
@@ -5,7 +5,7 @@
#include <string>
#include "base/format_macros.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/browser/sync/engine/apply_updates_command.h"
#include "chrome/browser/sync/engine/syncer.h"
#include "chrome/browser/sync/engine/syncer_util.h"
@@ -408,13 +408,13 @@ TEST_F(ApplyUpdatesCommandTest, EncryptUnsyncedChanges) {
size_t batch_s = 5;
for (i = 0; i < batch_s; ++i) {
CreateUnsyncedItem(id_factory_.NewLocalId(), folder_id,
- StringPrintf("Item %"PRIuS"", i), false,
+ base::StringPrintf("Item %"PRIuS"", i), false,
syncable::BOOKMARKS, NULL);
}
// Next five items are children of the root.
for (; i < 2*batch_s; ++i) {
CreateUnsyncedItem(id_factory_.NewLocalId(), id_factory_.root(),
- StringPrintf("Item %"PRIuS"", i), false,
+ base::StringPrintf("Item %"PRIuS"", i), false,
syncable::BOOKMARKS, NULL);
}
@@ -504,13 +504,13 @@ TEST_F(ApplyUpdatesCommandTest, CannotEncryptUnsyncedChanges) {
size_t batch_s = 5;
for (i = 0; i < batch_s; ++i) {
CreateUnsyncedItem(id_factory_.NewLocalId(), folder_id,
- StringPrintf("Item %"PRIuS"", i), false,
+ base::StringPrintf("Item %"PRIuS"", i), false,
syncable::BOOKMARKS, NULL);
}
// Next five items are children of the root.
for (; i < 2*batch_s; ++i) {
CreateUnsyncedItem(id_factory_.NewLocalId(), id_factory_.root(),
- StringPrintf("Item %"PRIuS"", i), false,
+ base::StringPrintf("Item %"PRIuS"", i), false,
syncable::BOOKMARKS, NULL);
}
diff --git a/chrome/browser/sync/engine/process_commit_response_command_unittest.cc b/chrome/browser/sync/engine/process_commit_response_command_unittest.cc
index b80a3cd..9e1c914 100644
--- a/chrome/browser/sync/engine/process_commit_response_command_unittest.cc
+++ b/chrome/browser/sync/engine/process_commit_response_command_unittest.cc
@@ -4,7 +4,7 @@
#include <vector>
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/browser/sync/engine/mock_model_safe_workers.h"
#include "chrome/browser/sync/engine/process_commit_response_command.h"
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
@@ -297,8 +297,8 @@ TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) {
for (; i < batch_size; ++i) {
// Alternate between new and old child items, just for kicks.
Id id = (i % 4 < 2) ? id_factory_.NewLocalId() : id_factory_.NewServerId();
- CreateUnprocessedCommitResult(id, folder_id, StringPrintf("Item %d", i),
- syncable::BOOKMARKS);
+ CreateUnprocessedCommitResult(
+ id, folder_id, base::StringPrintf("Item %d", i), syncable::BOOKMARKS);
}
// The second 25 children will be unsynced items but NOT part of the commit
// batch. When the ID of the parent folder changes during the commit,
@@ -307,8 +307,8 @@ TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) {
for (; i < 2*batch_size; ++i) {
// Alternate between new and old child items, just for kicks.
Id id = (i % 4 < 2) ? id_factory_.NewLocalId() : id_factory_.NewServerId();
- CreateUnsyncedItem(id, folder_id, StringPrintf("Item %d", i), false,
- syncable::BOOKMARKS, NULL);
+ CreateUnsyncedItem(id, folder_id, base::StringPrintf("Item %d", i),
+ false, syncable::BOOKMARKS, NULL);
}
// Process the commit response for the parent folder and the first
@@ -343,7 +343,8 @@ TEST_F(ProcessCommitResponseCommandTest, NewFolderCommitKeepsChildOrder) {
SCOPED_TRACE(::testing::Message("Examining item #") << child_count);
Entry c(&trans, syncable::GET_BY_ID, cid);
DCHECK(c.good());
- ASSERT_EQ(StringPrintf("Item %d", child_count), c.Get(NON_UNIQUE_NAME));
+ ASSERT_EQ(base::StringPrintf("Item %d", child_count),
+ c.Get(NON_UNIQUE_NAME));
ASSERT_EQ(new_fid, c.Get(syncable::PARENT_ID));
if (child_count < batch_size) {
ASSERT_FALSE(c.Get(IS_UNSYNCED)) << "Item should be committed";
diff --git a/chrome/browser/sync/engine/syncapi_unittest.cc b/chrome/browser/sync/engine/syncapi_unittest.cc
index 56373e4..1087005 100644
--- a/chrome/browser/sync/engine/syncapi_unittest.cc
+++ b/chrome/browser/sync/engine/syncapi_unittest.cc
@@ -13,8 +13,8 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_temp_dir.h"
#include "base/message_loop.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/sync/engine/http_post_provider_factory.h"
@@ -1077,18 +1077,18 @@ TEST_F(SyncManagerTest, EncryptDataTypesWithData) {
size_t i;
for (i = 0; i < batch_size; ++i) {
MakeNodeWithParent(sync_manager_.GetUserShare(), syncable::BOOKMARKS,
- StringPrintf("%"PRIuS"", i), folder);
+ base::StringPrintf("%"PRIuS"", i), folder);
}
// Next batch_size nodes are a different type and on their own.
for (; i < 2*batch_size; ++i) {
MakeNodeWithParent(sync_manager_.GetUserShare(), syncable::SESSIONS,
- StringPrintf("%"PRIuS"", i),
+ base::StringPrintf("%"PRIuS"", i),
GetIdForDataType(syncable::SESSIONS));
}
// Last batch_size nodes are a third type that will not need encryption.
for (; i < 3*batch_size; ++i) {
MakeNodeWithParent(sync_manager_.GetUserShare(), syncable::THEMES,
- StringPrintf("%"PRIuS"", i),
+ base::StringPrintf("%"PRIuS"", i),
GetIdForDataType(syncable::THEMES));
}
diff --git a/chrome/browser/sync/engine/syncer_unittest.cc b/chrome/browser/sync/engine/syncer_unittest.cc
index 704e5ce..e21fbb4a 100644
--- a/chrome/browser/sync/engine/syncer_unittest.cc
+++ b/chrome/browser/sync/engine/syncer_unittest.cc
@@ -14,6 +14,7 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "build/build_config.h"
#include "chrome/browser/sync/engine/conflict_resolver.h"
@@ -2188,7 +2189,7 @@ TEST_F(SyncerTest, CommitManyItemsInOneGo) {
{
WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
for (uint32 i = 0; i < items_to_commit; i++) {
- string nameutf8 = StringPrintf("%d", i);
+ string nameutf8 = base::StringPrintf("%d", i);
string name(nameutf8.begin(), nameutf8.end());
MutableEntry e(&trans, CREATE, trans.root_id(), name);
e.Put(IS_UNSYNCED, true);
diff --git a/chrome/browser/sync/syncable/syncable_unittest.cc b/chrome/browser/sync/syncable/syncable_unittest.cc
index d7cda70..ebd912b 100644
--- a/chrome/browser/sync/syncable/syncable_unittest.cc
+++ b/chrome/browser/sync/syncable/syncable_unittest.cc
@@ -25,7 +25,7 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_temp_dir.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
#include "chrome/browser/sync/engine/syncproto.h"
@@ -1645,8 +1645,8 @@ class StressTransactionsDelegate : public base::PlatformThread::Delegate {
CHECK(1 == CountEntriesWithName(&trans, trans.root_id(), path_name));
base::PlatformThread::Sleep(rand() % 10);
} else {
- std::string unique_name = StringPrintf("%d.%d", thread_number_,
- entry_count++);
+ std::string unique_name =
+ base::StringPrintf("%d.%d", thread_number_, entry_count++);
path_name.assign(unique_name.begin(), unique_name.end());
WriteTransaction trans(dir, UNITTEST, __FILE__, __LINE__);
MutableEntry e(&trans, CREATE, trans.root_id(), path_name);
diff --git a/chrome/browser/visitedlink/visitedlink_perftest.cc b/chrome/browser/visitedlink/visitedlink_perftest.cc
index 299515f..661a3fe 100644
--- a/chrome/browser/visitedlink/visitedlink_perftest.cc
+++ b/chrome/browser/visitedlink/visitedlink_perftest.cc
@@ -10,7 +10,7 @@
#include "base/file_util.h"
#include "base/perftimer.h"
#include "base/shared_memory.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/test/test_file_util.h"
#include "chrome/browser/visitedlink/visitedlink_master.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -27,7 +27,7 @@ const char unadded_prefix[] = "http://www.google.org/stuff/something/foo?session
// Returns a URL with the given prefix and index
GURL TestURL(const char* prefix, int i) {
- return GURL(StringPrintf("%s%d", prefix, i));
+ return GURL(base::StringPrintf("%s%d", prefix, i));
}
// We have no slaves, so all methods on this listener are a no-ops.
diff --git a/chrome/common/extensions/extension_manifests_unittest.cc b/chrome/common/extensions/extension_manifests_unittest.cc
index 641cd66..ae3379a 100644
--- a/chrome/common/extensions/extension_manifests_unittest.cc
+++ b/chrome/common/extensions/extension_manifests_unittest.cc
@@ -7,6 +7,7 @@
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc
index 62544d3..ade872e 100644
--- a/chrome/common/extensions/extension_unittest.cc
+++ b/chrome/common/extensions/extension_unittest.cc
@@ -13,8 +13,8 @@
#include "base/file_util.h"
#include "base/i18n/rtl.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/extensions/extension_action.h"
diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
index 2e4e28b..3ba1c67 100644
--- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
+++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc
@@ -8,7 +8,7 @@
#include <string>
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/common/net/gaia/gaia_auth_consumer.h"
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h"
diff --git a/chrome/renderer/safe_browsing/features_unittest.cc b/chrome/renderer/safe_browsing/features_unittest.cc
index ac5cb55..e08de78 100644
--- a/chrome/renderer/safe_browsing/features_unittest.cc
+++ b/chrome/renderer/safe_browsing/features_unittest.cc
@@ -5,7 +5,7 @@
#include "chrome/renderer/safe_browsing/features.h"
#include "base/format_macros.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,13 +14,15 @@ namespace safe_browsing {
TEST(PhishingFeaturesTest, TooManyFeatures) {
FeatureMap features;
for (size_t i = 0; i < FeatureMap::kMaxFeatureMapSize; ++i) {
- EXPECT_TRUE(features.AddBooleanFeature(StringPrintf("Feature%" PRIuS, i)));
+ EXPECT_TRUE(features.AddBooleanFeature(
+ base::StringPrintf("Feature%" PRIuS, i)));
}
EXPECT_EQ(FeatureMap::kMaxFeatureMapSize, features.features().size());
// Attempting to add more features should fail.
for (size_t i = 0; i < 3; ++i) {
- EXPECT_FALSE(features.AddBooleanFeature(StringPrintf("Extra%" PRIuS, i)));
+ EXPECT_FALSE(features.AddBooleanFeature(
+ base::StringPrintf("Extra%" PRIuS, i)));
}
EXPECT_EQ(FeatureMap::kMaxFeatureMapSize, features.features().size());
}
diff --git a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
index d82734c..9e62db4 100644
--- a/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
+++ b/chrome/renderer/spellchecker/spellcheck_worditerator_unittest.cc
@@ -6,8 +6,8 @@
#include <vector>
#include "base/format_macros.h"
+#include "base/stringprintf.h"
#include "base/string_split.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/renderer/spellchecker/spellcheck_worditerator.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -113,8 +113,8 @@ TEST(SpellcheckWordIteratorTest, SplitWord) {
};
for (size_t i = 0; i < arraysize(kTestCases); ++i) {
- SCOPED_TRACE(StringPrintf("kTestCases[%" PRIuS "]: language=%s", i,
- kTestCases[i].language));
+ SCOPED_TRACE(base::StringPrintf("kTestCases[%" PRIuS "]: language=%s", i,
+ kTestCases[i].language));
SpellcheckCharAttribute attributes;
attributes.SetDefaultLanguage(kTestCases[i].language);
diff --git a/chrome/service/cloud_print/cloud_print_helpers_unittest.cc b/chrome/service/cloud_print/cloud_print_helpers_unittest.cc
index cb1999a..6fdd3b4 100644
--- a/chrome/service/cloud_print/cloud_print_helpers_unittest.cc
+++ b/chrome/service/cloud_print/cloud_print_helpers_unittest.cc
@@ -4,7 +4,7 @@
#include "chrome/service/cloud_print/cloud_print_helpers.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -15,50 +15,51 @@ void CheckURLs(const GURL& server_base_url) {
if (expected_url_base[expected_url_base.length() - 1] != '/') {
expected_url_base += "/";
}
- std::string expected_url = StringPrintf("%sregister",
- expected_url_base.c_str());
+ std::string expected_url = base::StringPrintf("%sregister",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForPrinterUpdate(server_base_url,
"printeridfoo");
- expected_url = StringPrintf("%supdate?printerid=printeridfoo",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%supdate?printerid=printeridfoo",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForPrinterDelete(server_base_url,
"printeridbar");
- expected_url = StringPrintf("%sdelete?printerid=printeridbar",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%sdelete?printerid=printeridbar",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForPrinterList(server_base_url, "demoproxy");
- expected_url = StringPrintf("%slist?proxy=demoproxy",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%slist?proxy=demoproxy",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForJobFetch(server_base_url,
"myprinter",
"nogoodreason");
- expected_url = StringPrintf("%sfetch?printerid=myprinter&deb=nogoodreason",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf(
+ "%sfetch?printerid=myprinter&deb=nogoodreason",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForJobStatusUpdate(
server_base_url, "12345678", cloud_print::PRINT_JOB_STATUS_IN_PROGRESS);
- expected_url = StringPrintf("%scontrol?jobid=12345678&status=in_progress",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf(
+ "%scontrol?jobid=12345678&status=in_progress", expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForJobStatusUpdate(
server_base_url, "12345678", cloud_print::PRINT_JOB_STATUS_ERROR);
- expected_url = StringPrintf("%scontrol?jobid=12345678&status=error",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%scontrol?jobid=12345678&status=error",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForJobStatusUpdate(
server_base_url, "12345678", cloud_print::PRINT_JOB_STATUS_COMPLETED);
- expected_url = StringPrintf("%scontrol?jobid=12345678&status=done",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%scontrol?jobid=12345678&status=done",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
cloud_print::PrintJobDetails details;
@@ -69,22 +70,23 @@ void CheckURLs(const GURL& server_base_url) {
details.pages_printed = 47;
url = CloudPrintHelpers::GetUrlForJobStatusUpdate(server_base_url,
"87654321", details);
- expected_url = StringPrintf("%scontrol?jobid=87654321&status=in_progress&"
- "code=2&message=Out%%20of%%20Paper&numpages=345&"
- "pagesprinted=47", expected_url_base.c_str());
+ expected_url = base::StringPrintf(
+ "%scontrol?jobid=87654321&status=in_progress&code=2"
+ "&message=Out%%20of%%20Paper&numpages=345&pagesprinted=47",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForUserMessage(server_base_url,
"blahmessageid");
- expected_url = StringPrintf("%suser/message?code=blahmessageid",
- expected_url_base.c_str());
+ expected_url = base::StringPrintf("%suser/message?code=blahmessageid",
+ expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
url = CloudPrintHelpers::GetUrlForGetAuthCode(
server_base_url,
"fooclientid.apps.googleusercontent.com",
"test_proxy");
- expected_url = StringPrintf(
+ expected_url = base::StringPrintf(
"%screaterobot?oauth_client_id=fooclientid.apps.googleusercontent.com&"
"proxy=test_proxy", expected_url_base.c_str());
EXPECT_EQ(expected_url, url.spec());
diff --git a/chrome/test/live_sync/live_passwords_sync_test.cc b/chrome/test/live_sync/live_passwords_sync_test.cc
index b56f56e..ba67b4e 100644
--- a/chrome/test/live_sync/live_passwords_sync_test.cc
+++ b/chrome/test/live_sync/live_passwords_sync_test.cc
@@ -4,7 +4,7 @@
#include "chrome/test/live_sync/live_passwords_sync_test.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/password_manager/password_store_consumer.h"
@@ -105,9 +105,10 @@ PasswordStore* LivePasswordsSyncTest::GetVerifierPasswordStore() {
PasswordForm LivePasswordsSyncTest::CreateTestPasswordForm(int index) {
PasswordForm form;
form.signon_realm = kFakeSignonRealm;
- form.origin = GURL(StringPrintf("http://fake-domain%d.google.com/", index));
- form.username_value = ASCIIToUTF16(StringPrintf("username%d", index));
- form.password_value = ASCIIToUTF16(StringPrintf("password%d", index));
+ form.origin =
+ GURL(base::StringPrintf("http://fake-domain%d.google.com/", index));
+ form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index));
+ form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index));
return form;
}
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index fa2bf8c..f6ce1b9 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -10,6 +10,7 @@
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_util.h"
#include "base/synchronization/waitable_event.h"
#include "base/task.h"
@@ -265,7 +266,7 @@ bool LiveSyncTest::SetupClients() {
// Create the required number of sync profiles and clients.
for (int i = 0; i < num_clients_; ++i) {
profiles_.push_back(MakeProfile(
- StringPrintf(FILE_PATH_LITERAL("Profile%d"), i)));
+ base::StringPrintf(FILE_PATH_LITERAL("Profile%d"), i)));
EXPECT_FALSE(GetProfile(i) == NULL) << "GetProfile(" << i << ") failed.";
clients_.push_back(
new ProfileSyncServiceHarness(GetProfile(i), username_, password_, i));
diff --git a/chrome/test/live_sync/multiple_client_live_bookmarks_sync_test.cc b/chrome/test/live_sync/multiple_client_live_bookmarks_sync_test.cc
index f6931e0..541a748 100644
--- a/chrome/test/live_sync/multiple_client_live_bookmarks_sync_test.cc
+++ b/chrome/test/live_sync/multiple_client_live_bookmarks_sync_test.cc
@@ -4,14 +4,14 @@
#include "chrome/test/live_sync/live_bookmarks_sync_test.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/browser/profiles/profile.h"
IN_PROC_BROWSER_TEST_F(MultipleClientLiveBookmarksSyncTest, Sanity) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
DisableVerifier();
for (int i = 0; i < num_clients(); ++i) {
- ASSERT_TRUE(AddURL(i, StringPrintf(L"Google URL %d", i),
+ ASSERT_TRUE(AddURL(i, base::StringPrintf(L"Google URL %d", i),
GURL(StringPrintf("http://www.google.com/%d", i))) != NULL);
}
ASSERT_TRUE(AwaitQuiescence());
diff --git a/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc b/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
index 00d370c..748b9422 100644
--- a/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
+++ b/chrome/test/live_sync/multiple_client_live_preferences_sync_test.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/browser/sync/profile_sync_service_harness.h"
#include "chrome/common/pref_names.h"
@@ -14,7 +14,7 @@ IN_PROC_BROWSER_TEST_F(MultipleClientLivePreferencesSyncTest, Sanity) {
for (int i = 0; i < num_clients(); ++i) {
ListPrefUpdate update(GetPrefs(i), prefs::kURLsToRestoreOnStartup);
ListValue* client_urls = update.Get();
- client_urls->Append(Value::CreateStringValue(StringPrintf(
+ client_urls->Append(Value::CreateStringValue(base::StringPrintf(
"http://www.google.com/%d", i)));
}
for (int i = 0; i < num_clients(); ++i) {
diff --git a/chrome/test/startup/feature_startup_test.cc b/chrome/test/startup/feature_startup_test.cc
index c8a377f..2ea8979 100644
--- a/chrome/test/startup/feature_startup_test.cc
+++ b/chrome/test/startup/feature_startup_test.cc
@@ -5,7 +5,7 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/perftimer.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/time.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/common/chrome_paths.h"
diff --git a/chrome/test/startup/shutdown_test.cc b/chrome/test/startup/shutdown_test.cc
index dc0a454..2d27573 100644
--- a/chrome/test/startup/shutdown_test.cc
+++ b/chrome/test/startup/shutdown_test.cc
@@ -5,8 +5,8 @@
#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/time.h"
#include "chrome/common/chrome_constants.h"
diff --git a/chrome/test/startup/startup_test.cc b/chrome/test/startup/startup_test.cc
index 9cc8541..b65583c 100644
--- a/chrome/test/startup/startup_test.cc
+++ b/chrome/test/startup/startup_test.cc
@@ -5,9 +5,9 @@
#include "base/environment.h"
#include "base/file_util.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
-#include "base/string_util.h"
#include "base/sys_info.h"
#include "base/test/test_file_util.h"
#include "base/time.h"
diff --git a/chrome/test/sync/engine/mock_connection_manager.cc b/chrome/test/sync/engine/mock_connection_manager.cc
index 76c13f1..1240270 100644
--- a/chrome/test/sync/engine/mock_connection_manager.cc
+++ b/chrome/test/sync/engine/mock_connection_manager.cc
@@ -8,6 +8,7 @@
#include <map>
+#include "base/stringprintf.h"
#include "chrome/browser/sync/engine/syncer_proto_util.h"
#include "chrome/browser/sync/protocol/bookmark_specifics.pb.h"
#include "chrome/test/sync/engine/test_id_factory.h"
@@ -508,7 +509,7 @@ void MockConnectionManager::ProcessCommit(ClientToServerMessage* csm,
if (entry.has_version() && 0 != entry.version()) {
er->set_id_string(id); // Allows verification.
} else {
- string new_id = StringPrintf("mock_server:%d", next_new_id_++);
+ string new_id = base::StringPrintf("mock_server:%d", next_new_id_++);
changed_ids[id] = new_id;
er->set_id_string(new_id);
}
diff --git a/chrome/test/v8_unit_test.cc b/chrome/test/v8_unit_test.cc
index aee85c2..281bacc 100644
--- a/chrome/test/v8_unit_test.cc
+++ b/chrome/test/v8_unit_test.cc
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/string_util.h"
+#include "base/stringprintf.h"
+#include "base/string_piece.h"
#include "chrome/test/v8_unit_test.h"
V8UnitTest::V8UnitTest() {}
@@ -51,15 +52,15 @@ std::string V8UnitTest::ExceptionToString(v8::TryCatch* try_catch) {
v8::String::Utf8Value exception(try_catch->Exception());
v8::Handle<v8::Message> message = try_catch->Message();
if (message.IsEmpty()) {
- str.append(StringPrintf("%s\n", *exception));
+ str.append(base::StringPrintf("%s\n", *exception));
} else {
v8::String::Utf8Value filename(message->GetScriptResourceName());
int linenum = message->GetLineNumber();
int colnum = message->GetStartColumn();
- str.append(StringPrintf("%s:%i:%i %s\n", *filename, linenum, colnum,
- *exception));
+ str.append(base::StringPrintf(
+ "%s:%i:%i %s\n", *filename, linenum, colnum, *exception));
v8::String::Utf8Value sourceline(message->GetSourceLine());
- str.append(StringPrintf("%s\n", *sourceline));
+ str.append(base::StringPrintf("%s\n", *sourceline));
}
return str;
}
diff --git a/chrome/tools/convert_dict/convert_dict_unittest.cc b/chrome/tools/convert_dict/convert_dict_unittest.cc
index f8d1971..9cf996e 100644
--- a/chrome/tools/convert_dict/convert_dict_unittest.cc
+++ b/chrome/tools/convert_dict/convert_dict_unittest.cc
@@ -8,7 +8,7 @@
#include "base/file_util.h"
#include "base/format_macros.h"
#include "base/i18n/icu_string_conversions.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "chrome/tools/convert_dict/aff_reader.h"
#include "chrome/tools/convert_dict/dic_reader.h"
@@ -35,8 +35,8 @@ bool VerifyWords(const convert_dict::DicReader::WordList& org_words,
static const int kBufSize = 128;
char buf[kBufSize];
for (size_t i = 0; i < org_words.size(); i++) {
- SCOPED_TRACE(StringPrintf("org_words[%" PRIuS "]: %s",
- i, org_words[i].first.c_str()));
+ SCOPED_TRACE(base::StringPrintf(
+ "org_words[%" PRIuS "]: %s", i, org_words[i].first.c_str()));
int affix_matches = iter.Advance(buf, kBufSize, affix_ids);
EXPECT_NE(0, affix_matches);
@@ -64,9 +64,9 @@ bool VerifyWords(const convert_dict::DicReader::WordList& org_words,
void RunDictionaryTest(const char* codepage,
const std::map<string16, bool>& word_list) {
// Create an affix data and a dictionary data.
- std::string aff_data(StringPrintf("SET %s\n", codepage));
+ std::string aff_data(base::StringPrintf("SET %s\n", codepage));
- std::string dic_data(StringPrintf("%" PRIuS "\n", word_list.size()));
+ std::string dic_data(base::StringPrintf("%" PRIuS "\n", word_list.size()));
for (std::map<string16, bool>::const_iterator it = word_list.begin();
it != word_list.end(); ++it) {
std::string encoded_word;
@@ -99,8 +99,8 @@ void RunDictionaryTest(const char* codepage,
// Verify this DicReader includes all the input words.
EXPECT_EQ(word_list.size(), dic_reader.words().size());
for (size_t i = 0; i < dic_reader.words().size(); ++i) {
- SCOPED_TRACE(StringPrintf("dic_reader.words()[%" PRIuS "]: %s",
- i, dic_reader.words()[i].first.c_str()));
+ SCOPED_TRACE(base::StringPrintf("dic_reader.words()[%" PRIuS "]: %s",
+ i, dic_reader.words()[i].first.c_str()));
string16 word(UTF8ToUTF16(dic_reader.words()[i].first));
EXPECT_TRUE(word_list.find(word) != word_list.end());
}
@@ -121,7 +121,7 @@ void RunDictionaryTest(const char* codepage,
// Trim the end of this BDICT and verify our verifier tells these trimmed
// BDICTs are corrupted.
for (size_t i = 1; i < bdict_data.size(); ++i) {
- SCOPED_TRACE(StringPrintf("i = %" PRIuS, i));
+ SCOPED_TRACE(base::StringPrintf("i = %" PRIuS, i));
EXPECT_FALSE(hunspell::BDict::Verify(bdict_data.data(),
bdict_data.size() - i));
}
diff --git a/content/browser/geolocation/network_location_provider_unittest.cc b/content/browser/geolocation/network_location_provider_unittest.cc
index 6fa0546..a4983e0 100644
--- a/content/browser/geolocation/network_location_provider_unittest.cc
+++ b/content/browser/geolocation/network_location_provider_unittest.cc
@@ -4,6 +4,7 @@
#include "base/json/json_reader.h"
#include "base/memory/scoped_ptr.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/common/net/test_url_fetcher_factory.h"
@@ -172,7 +173,8 @@ class GeolocationNetworkProviderTest : public testing::Test {
WifiData data;
for (int i = 0; i < ap_count; ++i) {
AccessPointData ap;
- ap.mac_address = ASCIIToUTF16(StringPrintf("%02d-34-56-78-54-32", i));
+ ap.mac_address =
+ ASCIIToUTF16(base::StringPrintf("%02d-34-56-78-54-32", i));
ap.radio_signal_strength = i;
ap.channel = IndexToChannal(i);
ap.signal_to_noise = i + 42;
@@ -189,7 +191,7 @@ class GeolocationNetworkProviderTest : public testing::Test {
for (int i = 0; i < router_count; ++i) {
RouterData router;
router.mac_address =
- ASCIIToUTF16(StringPrintf("%02d-34-56-78-54-32", i));
+ ASCIIToUTF16(base::StringPrintf("%02d-34-56-78-54-32", i));
data.router_data.insert(router);
}
return data;
diff --git a/courgette/adjustment_method.cc b/courgette/adjustment_method.cc
index 520f2a0..f967093 100644
--- a/courgette/adjustment_method.cc
+++ b/courgette/adjustment_method.cc
@@ -14,8 +14,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
-
+#include "base/stringprintf.h"
#include "courgette/assembly_program.h"
#include "courgette/courgette.h"
#include "courgette/encoded_program.h"
diff --git a/courgette/adjustment_method_2.cc b/courgette/adjustment_method_2.cc
index e4fd716..b039e63 100644
--- a/courgette/adjustment_method_2.cc
+++ b/courgette/adjustment_method_2.cc
@@ -15,9 +15,8 @@
#include "base/basictypes.h"
#include "base/format_macros.h"
#include "base/logging.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/time.h"
-
#include "courgette/assembly_program.h"
#include "courgette/courgette.h"
#include "courgette/encoded_program.h"
diff --git a/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc b/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
index c817cb7..811b888 100644
--- a/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
+++ b/jingle/notifier/listener/push_notifications_send_update_task_unittest.cc
@@ -6,7 +6,7 @@
#include "base/base64.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "jingle/notifier/listener/xml_element_util.h"
#include "talk/xmpp/jid.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -43,7 +43,7 @@ TEST_F(PushNotificationsSendUpdateTaskTest, MakeUpdateMessage) {
notification, to_jid_bare_));
std::string expected_xml_string =
- StringPrintf(
+ base::StringPrintf(
"<cli:message to=\"%s\" type=\"headline\" "
"xmlns:cli=\"jabber:client\">"
"<push xmlns=\"google:push\" channel=\"%s\">"
diff --git a/jingle/notifier/listener/push_notifications_subscribe_task_unittest.cc b/jingle/notifier/listener/push_notifications_subscribe_task_unittest.cc
index ef76010..8c177c9 100644
--- a/jingle/notifier/listener/push_notifications_subscribe_task_unittest.cc
+++ b/jingle/notifier/listener/push_notifications_subscribe_task_unittest.cc
@@ -5,7 +5,7 @@
#include "jingle/notifier/listener/push_notifications_subscribe_task.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "jingle/notifier/listener/xml_element_util.h"
#include "talk/xmpp/jid.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -45,7 +45,7 @@ TEST_F(PushNotificationsSubscribeTaskTest, MakeSubscriptionMessage) {
PushNotificationsSubscribeTask::MakeSubscriptionMessage(
subscriptions, jid_, task_id_));
std::string expected_xml_string =
- StringPrintf(
+ base::StringPrintf(
"<cli:iq type=\"set\" to=\"%s\" id=\"%s\" "
"xmlns:cli=\"jabber:client\">"
"<subscribe xmlns=\"google:push\">"
diff --git a/media/audio/linux/alsa_output_unittest.cc b/media/audio/linux/alsa_output_unittest.cc
index 911a8c8..f7c3b5d 100644
--- a/media/audio/linux/alsa_output_unittest.cc
+++ b/media/audio/linux/alsa_output_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "media/audio/linux/alsa_output.h"
#include "media/audio/linux/alsa_wrapper.h"
#include "media/audio/linux/audio_manager_linux.h"
@@ -649,7 +649,7 @@ TEST_F(AlsaPcmOutputStreamTest, AutoSelectDevice_DeviceSelect) {
for (int i = 1; i <= 9; ++i) {
if (i == 3 || i == 4 || i == 5) // invalid number of channels
continue;
- SCOPED_TRACE(StringPrintf("Attempting %d Channel", i));
+ SCOPED_TRACE(base::StringPrintf("Attempting %d Channel", i));
// Hints will only be grabbed for channel numbers that have non-default
// devices associated with them.
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 82012c9..a889271 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -6,7 +6,7 @@
#include "base/format_macros.h"
#include "base/memory/scoped_ptr.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "media/base/buffers.h"
#include "media/base/mock_filters.h"
#include "media/base/yuv_convert.h"
@@ -79,8 +79,8 @@ void ExpectFrameColor(media::VideoFrame* yv12_frame, uint32 expect_rgb_color) {
rgb_frame->data(VideoFrame::kRGBPlane) +
(rgb_frame->stride(VideoFrame::kRGBPlane) * row));
for (size_t col = 0; col < rgb_frame->width(); ++col) {
- SCOPED_TRACE(StringPrintf("Checking (%" PRIuS ", %" PRIuS ")",
- row, col));
+ SCOPED_TRACE(
+ base::StringPrintf("Checking (%" PRIuS ", %" PRIuS ")", row, col));
EXPECT_EQ(expect_rgb_color, rgb_row_data[col]);
}
}
diff --git a/net/ftp/ftp_directory_listing_parser_unittest.cc b/net/ftp/ftp_directory_listing_parser_unittest.cc
index a0a58d2..8d2d79c 100644
--- a/net/ftp/ftp_directory_listing_parser_unittest.cc
+++ b/net/ftp/ftp_directory_listing_parser_unittest.cc
@@ -7,9 +7,9 @@
#include "base/file_util.h"
#include "base/format_macros.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
-#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "net/base/net_errors.h"
#include "net/ftp/ftp_directory_listing_parser.h"
diff --git a/net/http/http_transaction_unittest.cc b/net/http/http_transaction_unittest.cc
index fabfb01..c900247 100644
--- a/net/http/http_transaction_unittest.cc
+++ b/net/http/http_transaction_unittest.cc
@@ -7,7 +7,7 @@
#include <algorithm>
#include "base/message_loop.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "net/base/net_errors.h"
#include "net/base/load_flags.h"
#include "net/disk_cache/disk_cache.h"
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc
index 366af45..fd6a423 100644
--- a/net/socket/client_socket_pool_base_unittest.cc
+++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -9,8 +9,8 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/message_loop.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
-#include "base/string_util.h"
#include "base/threading/platform_thread.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
@@ -1071,12 +1071,13 @@ TEST_F(ClientSocketPoolBaseTest, WaitForStalledSocketAtSocketLimit) {
ClientSocketHandle handles[kDefaultMaxSockets];
for (int i = 0; i < kDefaultMaxSockets; ++i) {
TestCompletionCallback callback;
- EXPECT_EQ(OK, handles[i].Init(base::StringPrintf("Take 2: %d", i),
- params_,
- kDefaultPriority,
- &callback,
- pool_.get(),
- BoundNetLog()));
+ EXPECT_EQ(OK, handles[i].Init(base::StringPrintf(
+ "Take 2: %d", i),
+ params_,
+ kDefaultPriority,
+ &callback,
+ pool_.get(),
+ BoundNetLog()));
}
EXPECT_EQ(kDefaultMaxSockets, client_socket_factory_.allocation_count());
diff --git a/net/tools/flip_server/balsa_headers.cc b/net/tools/flip_server/balsa_headers.cc
index a8e90fb..0fe68c2 100644
--- a/net/tools/flip_server/balsa_headers.cc
+++ b/net/tools/flip_server/balsa_headers.cc
@@ -4,6 +4,7 @@
#include "net/tools/flip_server/balsa_headers.h"
+#include <stdio.h>
#include <algorithm>
#include <ext/hash_set>
#include <string>
@@ -12,8 +13,8 @@
#include "base/logging.h"
#include "base/port.h"
+#include "base/stringprintf.h"
#include "base/string_piece.h"
-#include "base/string_util.h"
#include "net/tools/flip_server/balsa_enums.h"
#include "net/tools/flip_server/buffer_interface.h"
#include "net/tools/flip_server/simple_buffer.h"
diff --git a/printing/page_overlays_unittest.cc b/printing/page_overlays_unittest.cc
index 3ff8be1..03c7f70 100644
--- a/printing/page_overlays_unittest.cc
+++ b/printing/page_overlays_unittest.cc
@@ -4,7 +4,7 @@
#include "base/message_loop.h"
#include "base/string16.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "printing/page_overlays.h"
#include "printing/print_settings.h"
@@ -66,14 +66,14 @@ TEST_F(PageOverlaysTest, StringConversion) {
std::wstring input;
std::wstring out;
for (size_t i = 0; i < arraysize(kOverlayKeys); ++i) {
- input = StringPrintf(L"foo%lsbar", kOverlayKeys[i].key);
+ input = base::StringPrintf(L"foo%lsbar", kOverlayKeys[i].key);
out = printing::PageOverlays::ReplaceVariables(input, *doc.get(),
*page.get());
EXPECT_FALSE(out.empty());
if (wcslen(kOverlayKeys[i].expected) == 0)
continue;
- std::wstring expected = StringPrintf(L"foo%lsbar",
- kOverlayKeys[i].expected);
+ std::wstring expected =
+ base::StringPrintf(L"foo%lsbar", kOverlayKeys[i].expected);
EXPECT_EQ(expected, out) << kOverlayKeys[i].key;
}
diff --git a/remoting/jingle_glue/iq_request_unittest.cc b/remoting/jingle_glue/iq_request_unittest.cc
index 9b17c76..4b323fb 100644
--- a/remoting/jingle_glue/iq_request_unittest.cc
+++ b/remoting/jingle_glue/iq_request_unittest.cc
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/memory/ref_counted.h"
-#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "remoting/jingle_glue/iq_request.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,7 +20,7 @@ TEST(IqRequestTest, MakeIqStanza) {
const char* kTo = "user@domain.com";
std::string expected_xml_string =
- StringPrintf(
+ base::StringPrintf(
"<cli:iq type=\"%s\" to=\"%s\" id=\"%s\" "
"xmlns:cli=\"jabber:client\">"
"<%s:%s xmlns:%s=\"%s\"/>"
diff --git a/ui/base/clipboard/clipboard_util_win.cc b/ui/base/clipboard/clipboard_util_win.cc
index 43b1d5f..6c44740 100644
--- a/ui/base/clipboard/clipboard_util_win.cc
+++ b/ui/base/clipboard/clipboard_util_win.cc
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/memory/scoped_handle.h"
+#include "base/stringprintf.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "base/win/scoped_hglobal.h"
@@ -466,8 +467,11 @@ std::string ClipboardUtil::HtmlToCFHtml(const std::string& html,
size_t end_fragment_offset = start_fragment_offset + html.length();
size_t end_html_offset = end_fragment_offset + strlen(end_markup);
- std::string result = StringPrintf(header, start_html_offset,
- end_html_offset, start_fragment_offset, end_fragment_offset);
+ std::string result = base::StringPrintf(header,
+ start_html_offset,
+ end_html_offset,
+ start_fragment_offset,
+ end_fragment_offset);
if (!base_url.empty()) {
result.append(source_url_prefix);
result.append(base_url);
diff --git a/ui/base/l10n/l10n_util.cc b/ui/base/l10n/l10n_util.cc
index e39cfbe..dc5f8d6 100644
--- a/ui/base/l10n/l10n_util.cc
+++ b/ui/base/l10n/l10n_util.cc
@@ -18,6 +18,7 @@
#include "base/i18n/rtl.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/sys_string_conversions.h"
@@ -602,7 +603,8 @@ static string16 GetStringF(int message_id,
for (size_t i = 0; i < 9; ++i) {
bool placeholder_should_exist = replacements.size() > i;
- std::string placeholder = StringPrintf("$%d", static_cast<int>(i + 1));
+ std::string placeholder =
+ base::StringPrintf("$%d", static_cast<int>(i + 1));
size_t pos = utf8_string.find(placeholder.c_str());
if (placeholder_should_exist) {
DCHECK_NE(std::string::npos, pos) <<