summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 00:54:13 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-29 00:54:13 +0000
commit1c32402767e49d21eea7470cd7b89f682755d391 (patch)
treed3a11c042eb63dcb1032002038a987d0c191926e /webkit
parentd4bc96e84f87586da6a312a3c8eed3a12b3221d3 (diff)
downloadchromium_src-1c32402767e49d21eea7470cd7b89f682755d391.zip
chromium_src-1c32402767e49d21eea7470cd7b89f682755d391.tar.gz
chromium_src-1c32402767e49d21eea7470cd7b89f682755d391.tar.bz2
webkit: Append base:: in the StringPrintf calls.
(Note: This is a TODO in string_util.h) BUG=None TEST=None Review URL: http://codereview.chromium.org/3404027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache_host.cc6
-rw-r--r--webkit/appcache/appcache_update_job.cc21
-rw-r--r--webkit/appcache/appcache_url_request_job.cc15
-rw-r--r--webkit/appcache/web_application_cache_host_impl.cc11
-rw-r--r--webkit/glue/cpp_variant.cc3
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc25
-rw-r--r--webkit/glue/media/media_resource_loader_bridge_factory.cc12
-rw-r--r--webkit/glue/plugins/test/plugin_arguments_test.cc5
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_win.cc3
-rw-r--r--webkit/glue/plugins/webplugin_impl.cc3
-rw-r--r--webkit/glue/user_agent.cc4
-rw-r--r--webkit/glue/webkit_glue.cc3
-rw-r--r--webkit/support/webkit_support.cc3
-rw-r--r--webkit/tools/test_shell/mock_spellcheck_unittest.cc3
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc11
-rw-r--r--webkit/tools/test_shell/text_input_controller.cc9
16 files changed, 80 insertions, 57 deletions
diff --git a/webkit/appcache/appcache_host.cc b/webkit/appcache/appcache_host.cc
index 1f1b5da..f11293d 100644
--- a/webkit/appcache/appcache_host.cc
+++ b/webkit/appcache/appcache_host.cc
@@ -6,6 +6,7 @@
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "webkit/appcache/appcache.h"
#include "webkit/appcache/appcache_backend_impl.h"
#include "webkit/appcache/appcache_request_handler.h"
@@ -357,7 +358,7 @@ void AppCacheHost::FinishCacheSelection(
"Document was loaded from Application Cache with manifest %s";
frontend_->OnLogMessage(
host_id_, LOG_INFO,
- StringPrintf(
+ base::StringPrintf(
kFormatString, owing_group->manifest_url().spec().c_str()));
AssociateCache(cache);
if (!owing_group->is_obsolete() && !owing_group->is_being_deleted()) {
@@ -377,7 +378,8 @@ void AppCacheHost::FinishCacheSelection(
"Creating Application Cache with manifest %s";
frontend_->OnLogMessage(
host_id_, LOG_INFO,
- StringPrintf(kFormatString, group->manifest_url().spec().c_str()));
+ base::StringPrintf(kFormatString,
+ group->manifest_url().spec().c_str()));
AssociateCache(NULL); // The UpdateJob may produce one for us later.
group->StartUpdateWithNewMasterEntry(this, new_master_entry_url_);
ObserveGroupBeingUpdated(group);
diff --git a/webkit/appcache/appcache_update_job.cc b/webkit/appcache/appcache_update_job.cc
index 4aa9328..5433e55 100644
--- a/webkit/appcache/appcache_update_job.cc
+++ b/webkit/appcache/appcache_update_job.cc
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
@@ -532,13 +533,13 @@ void AppCacheUpdateJob::HandleManifestFetchCompleted(URLRequest* request) {
std::string message;
if (!is_valid_response_code) {
const char* kFormatString = "Manifest fetch failed (%d) %s";
- message = StringPrintf(kFormatString, response_code,
- manifest_url_.spec().c_str());
+ message = base::StringPrintf(kFormatString, response_code,
+ manifest_url_.spec().c_str());
} else {
DCHECK(!is_valid_mime_type);
const char* kFormatString = "Invalid manifest mime type (%s) %s";
- message = StringPrintf(kFormatString, mime_type.c_str(),
- manifest_url_.spec().c_str());
+ message = base::StringPrintf(kFormatString, mime_type.c_str(),
+ manifest_url_.spec().c_str());
}
HandleCacheFailure(message);
}
@@ -576,8 +577,8 @@ void AppCacheUpdateJob::ContinueHandleManifestFetchCompleted(bool changed) {
if (!ParseManifest(manifest_url_, manifest_data_.data(),
manifest_data_.length(), manifest)) {
const char* kFormatString = "Failed to parse manifest %s";
- const std::string message = StringPrintf(kFormatString,
- manifest_url_.spec().c_str());
+ const std::string message = base::StringPrintf(kFormatString,
+ manifest_url_.spec().c_str());
HandleCacheFailure(message);
LOG(INFO) << message;
return;
@@ -645,8 +646,8 @@ void AppCacheUpdateJob::HandleUrlFetchCompleted(URLRequest* request) {
inprogress_cache_->AddOrModifyEntry(url, entry);
} else {
const char* kFormatString = "Resource fetch failed (%d) %s";
- const std::string message = StringPrintf(kFormatString, response_code,
- request->url().spec().c_str());
+ const std::string message = base::StringPrintf(kFormatString,
+ response_code, request->url().spec().c_str());
HandleCacheFailure(message);
return;
}
@@ -729,8 +730,8 @@ void AppCacheUpdateJob::HandleMasterEntryFetchCompleted(URLRequest* request) {
hosts.clear();
const char* kFormatString = "Master entry fetch failed (%d) %s";
- const std::string message = StringPrintf(kFormatString, response_code,
- request->url().spec().c_str());
+ const std::string message = base::StringPrintf(kFormatString,
+ response_code, request->url().spec().c_str());
host_notifier.SendErrorNotifications(message);
// In downloading case, update result is different if all master entries
diff --git a/webkit/appcache/appcache_url_request_job.cc b/webkit/appcache/appcache_url_request_job.cc
index 50549e5..88b19d2 100644
--- a/webkit/appcache/appcache_url_request_job.cc
+++ b/webkit/appcache/appcache_url_request_job.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
@@ -8,6 +8,7 @@
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
#include "net/http/http_request_headers.h"
@@ -171,13 +172,13 @@ void AppCacheURLRequestJob::SetupRangeResponse() {
headers->RemoveHeader(kRangeHeader);
headers->ReplaceStatusLine(kPartialStatusLine);
headers->AddHeader(
- StringPrintf("%s: %d", kLengthHeader, length));
+ base::StringPrintf("%s: %d", kLengthHeader, length));
headers->AddHeader(
- StringPrintf("%s: bytes %d-%d/%d",
- kRangeHeader,
- offset,
- offset + length - 1,
- resource_size));
+ base::StringPrintf("%s: bytes %d-%d/%d",
+ kRangeHeader,
+ offset,
+ offset + length - 1,
+ resource_size));
}
void AppCacheURLRequestJob::OnReadComplete(int result) {
diff --git a/webkit/appcache/web_application_cache_host_impl.cc b/webkit/appcache/web_application_cache_host_impl.cc
index 82f8eb3..f65bed6 100644
--- a/webkit/appcache/web_application_cache_host_impl.cc
+++ b/webkit/appcache/web_application_cache_host_impl.cc
@@ -7,6 +7,7 @@
#include "base/compiler_specific.h"
#include "base/id_map.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/singleton.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
@@ -108,7 +109,8 @@ void WebApplicationCacheHostImpl::OnEventRaised(appcache::EventID event_id) {
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
const char* kFormatString = "Application Cache %s event";
- std::string message = StringPrintf(kFormatString, kEventNames[event_id]);
+ std::string message = base::StringPrintf(kFormatString,
+ kEventNames[event_id]);
OnLogMessage(LOG_INFO, message);
// Most events change the status. Clear out what we know so that the latest
@@ -123,8 +125,8 @@ void WebApplicationCacheHostImpl::OnProgressEventRaised(
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
const char* kFormatString = "Application Cache Progress event (%d of %d) %s";
- std::string message = StringPrintf(kFormatString, num_complete,
- num_total, url.spec().c_str());
+ std::string message = base::StringPrintf(kFormatString, num_complete,
+ num_total, url.spec().c_str());
OnLogMessage(LOG_INFO, message);
client_->notifyProgressEventListener(url, num_total, num_complete);
@@ -135,7 +137,8 @@ void WebApplicationCacheHostImpl::OnErrorEventRaised(
// Emit logging output prior to calling out to script as we can get
// deleted within the script event handler.
const char* kFormatString = "Application Cache Error event: %s";
- std::string full_message = StringPrintf(kFormatString, message.c_str());
+ std::string full_message = base::StringPrintf(kFormatString,
+ message.c_str());
OnLogMessage(LOG_ERROR, full_message);
// Most events change the status. Clear out what we know so that the latest
diff --git a/webkit/glue/cpp_variant.cc b/webkit/glue/cpp_variant.cc
index bf995fc..8545bc1 100644
--- a/webkit/glue/cpp_variant.cc
+++ b/webkit/glue/cpp_variant.cc
@@ -9,6 +9,7 @@
#include "webkit/glue/cpp_variant.h"
#include "base/logging.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
using WebKit::WebBindings;
@@ -232,7 +233,7 @@ std::vector<std::wstring> CppVariant::ToStringVector() const {
length = std::min(60000, length);
for (int i = 0; i < length; ++i) {
// Get each of the items.
- std::string index = StringPrintf("%d", i);
+ std::string index = base::StringPrintf("%d", i);
NPIdentifier index_id = WebBindings::getStringIdentifier(index.c_str());
if (WebBindings::hasProperty(NULL, np_value, index_id)) {
NPVariant index_value;
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index 636819c..7254c92 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -8,6 +8,7 @@
#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "media/base/filters.h"
#include "media/base/mock_filter_host.h"
#include "media/base/mock_filters.h"
@@ -99,9 +100,9 @@ class BufferedResourceLoaderTest : public testing::Test {
void FullResponse(int64 instance_size) {
EXPECT_CALL(*this, StartCallback(net::OK));
ResourceLoaderBridge::ResponseInfo info;
- std::string header = StringPrintf("HTTP/1.1 200 OK\n"
- "Content-Length: %" PRId64,
- instance_size);
+ std::string header = base::StringPrintf("HTTP/1.1 200 OK\n"
+ "Content-Length: %" PRId64,
+ instance_size);
replace(header.begin(), header.end(), '\n', '\0');
info.headers = new net::HttpResponseHeaders(header);
info.content_length = instance_size;
@@ -116,12 +117,12 @@ class BufferedResourceLoaderTest : public testing::Test {
EXPECT_CALL(*this, StartCallback(net::OK));
int64 content_length = last_position - first_position + 1;
ResourceLoaderBridge::ResponseInfo info;
- std::string header = StringPrintf("HTTP/1.1 206 Partial Content\n"
- "Content-Range: bytes "
- "%" PRId64 "-%" PRId64 "/%" PRId64,
- first_position,
- last_position,
- instance_size);
+ std::string header = base::StringPrintf("HTTP/1.1 206 Partial Content\n"
+ "Content-Range: bytes "
+ "%" PRId64 "-%" PRId64 "/%" PRId64,
+ first_position,
+ last_position,
+ instance_size);
replace(header.begin(), header.end(), '\n', '\0');
info.headers = new net::HttpResponseHeaders(header);
info.content_length = content_length;
@@ -268,9 +269,9 @@ TEST_F(BufferedResourceLoaderTest, InvalidPartialResponse) {
.WillOnce(Invoke(this, &BufferedResourceLoaderTest::ReleaseBridge));
ResourceLoaderBridge::ResponseInfo info;
- std::string header = StringPrintf("HTTP/1.1 206 Partial Content\n"
- "Content-Range: bytes %d-%d/%d",
- 1, 10, 1024);
+ std::string header = base::StringPrintf("HTTP/1.1 206 Partial Content\n"
+ "Content-Range: bytes %d-%d/%d",
+ 1, 10, 1024);
replace(header.begin(), header.end(), '\n', '\0');
info.headers = new net::HttpResponseHeaders(header);
info.content_length = 10;
diff --git a/webkit/glue/media/media_resource_loader_bridge_factory.cc b/webkit/glue/media/media_resource_loader_bridge_factory.cc
index 1961bcc..9d8d547 100644
--- a/webkit/glue/media/media_resource_loader_bridge_factory.cc
+++ b/webkit/glue/media/media_resource_loader_bridge_factory.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
@@ -6,6 +6,7 @@
#include "base/format_macros.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
namespace {
@@ -61,12 +62,13 @@ const std::string MediaResourceLoaderBridgeFactory::GenerateHeaders (
if (first_byte_position > kPositionNotSpecified &&
last_byte_position > kPositionNotSpecified) {
if (first_byte_position <= last_byte_position) {
- header = StringPrintf("Range: bytes=%" PRId64 "-%" PRId64,
- first_byte_position,
- last_byte_position);
+ header = base::StringPrintf("Range: bytes=%" PRId64 "-%" PRId64,
+ first_byte_position,
+ last_byte_position);
}
} else if (first_byte_position > kPositionNotSpecified) {
- header = StringPrintf("Range: bytes=%" PRId64 "-", first_byte_position);
+ header = base::StringPrintf("Range: bytes=%" PRId64 "-",
+ first_byte_position);
} else if (last_byte_position > kPositionNotSpecified) {
NOTIMPLEMENTED() << "Suffix range not implemented";
}
diff --git a/webkit/glue/plugins/test/plugin_arguments_test.cc b/webkit/glue/plugins/test/plugin_arguments_test.cc
index ee6d2c0..46ccf43 100644
--- a/webkit/glue/plugins/test/plugin_arguments_test.cc
+++ b/webkit/glue/plugins/test/plugin_arguments_test.cc
@@ -1,9 +1,10 @@
-// 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.
#include "base/basictypes.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "webkit/glue/plugins/test/plugin_arguments_test.h"
@@ -45,7 +46,7 @@ NPError PluginArgumentsTest::New(uint16 mode, int16 argc,
int size = atoi(size_string);
for (int index = 1; index <= max_args; index++) {
- std::string arg_name = StringPrintf("%s%d", "val", index);
+ std::string arg_name = base::StringPrintf("%s%d", "val", index);
const char *val_string = GetArgValue(arg_name.c_str(), argc, argn,
argv);
ExpectAsciiStringNotEqual(val_string, (const char*)NULL);
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
index 3289a29..9cdc7db 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc
+++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc
@@ -18,6 +18,7 @@
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/win_util.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
@@ -1195,7 +1196,7 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
parent_thread_id_ = GetWindowThreadProcessId(parent_, NULL);
HKL parent_layout = GetKeyboardLayout(parent_thread_id_);
if (keyboard_layout_ != parent_layout) {
- std::wstring layout_name(StringPrintf(L"%08x", parent_layout));
+ std::wstring layout_name(base::StringPrintf(L"%08x", parent_layout));
LoadKeyboardLayout(layout_name.c_str(), KLF_ACTIVATE);
keyboard_layout_ = parent_layout;
}
diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/glue/plugins/webplugin_impl.cc
index 9e90e5b..80bc197 100644
--- a/webkit/glue/plugins/webplugin_impl.cc
+++ b/webkit/glue/plugins/webplugin_impl.cc
@@ -7,6 +7,7 @@
#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 "gfx/rect.h"
#include "googleurl/src/gurl.h"
@@ -160,7 +161,7 @@ std::string GetAllHeaders(const WebURLResponse& response) {
return result;
// TODO(darin): Shouldn't we also report HTTP version numbers?
- result = StringPrintf("HTTP %d ", response.httpStatusCode());
+ result = base::StringPrintf("HTTP %d ", response.httpStatusCode());
result.append(status.utf8());
result.append("\n");
diff --git a/webkit/glue/user_agent.cc b/webkit/glue/user_agent.cc
index df4c3f5..2babb49 100644
--- a/webkit/glue/user_agent.cc
+++ b/webkit/glue/user_agent.cc
@@ -9,6 +9,7 @@
#endif
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/sys_info.h"
// Generated
@@ -21,7 +22,8 @@ namespace webkit_glue {
std::string GetProductVersion();
std::string GetWebKitVersion() {
- return StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR, WEBKIT_VERSION_MINOR);
+ return base::StringPrintf("%d.%d", WEBKIT_VERSION_MAJOR,
+ WEBKIT_VERSION_MINOR);
}
std::string BuildOSCpuInfo() {
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index 53f238f..33eff1a 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -16,6 +16,7 @@
#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
@@ -256,7 +257,7 @@ void ResetBeforeTestRun(WebView* view) {
// code here what that would have inlined.
void DumpLeakedObject(const char* file, int line, const char* object,
int count) {
- std::string msg = StringPrintf("%s LEAKED %d TIMES", object, count);
+ std::string msg = base::StringPrintf("%s LEAKED %d TIMES", object, count);
AppendToLog(file, line, msg.c_str());
}
#endif
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 744205a..f955d78 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -18,6 +18,7 @@
#include "base/process_util.h"
#include "base/string_piece.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/sys_string_conversions.h"
#include "base/time.h"
#include "base/utf_string_conversions.h"
@@ -468,7 +469,7 @@ std::string MakeURLErrorDescription(const WebKit::WebURLError& error) {
} else
DLOG(WARNING) << "Unknown error domain";
- return StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">",
+ return base::StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">",
domain.c_str(), code, error.unreachableURL.spec().data());
}
diff --git a/webkit/tools/test_shell/mock_spellcheck_unittest.cc b/webkit/tools/test_shell/mock_spellcheck_unittest.cc
index 17912bb..bcf3742 100644
--- a/webkit/tools/test_shell/mock_spellcheck_unittest.cc
+++ b/webkit/tools/test_shell/mock_spellcheck_unittest.cc
@@ -4,6 +4,7 @@
#include "base/format_macros.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "webkit/tools/test_shell/mock_spellcheck.h"
@@ -63,7 +64,7 @@ TEST_F(MockSpellCheckTest, SpellCheckStrings) {
MockSpellCheck spellchecker;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
- SCOPED_TRACE(StringPrintf("kTestCases[%" PRIuS "]", i));
+ SCOPED_TRACE(base::StringPrintf("kTestCases[%" PRIuS "]", i));
std::wstring input(kTestCases[i].input);
int misspelling_start;
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index f4b4684..b454496 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -12,6 +12,7 @@
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "base/trace_event.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
@@ -210,9 +211,9 @@ std::string GetResponseDescription(const WebURLResponse& response) {
return "(null)";
const std::string url = GURL(response.url()).possibly_invalid_spec();
- return StringPrintf("<NSURLResponse %s, http status code %d>",
- DescriptionSuitableForTestResult(url).c_str(),
- response.httpStatusCode());
+ return base::StringPrintf("<NSURLResponse %s, http status code %d>",
+ DescriptionSuitableForTestResult(url).c_str(),
+ response.httpStatusCode());
}
std::string GetErrorDescription(const WebURLError& error) {
@@ -240,7 +241,7 @@ std::string GetErrorDescription(const WebURLError& error) {
DLOG(WARNING) << "Unknown error domain";
}
- return StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">",
+ return base::StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">",
domain.c_str(), code, error.unreachableURL.spec().data());
}
@@ -907,7 +908,7 @@ void TestWebViewDelegate::didFailProvisionalLoad(
bool replace = extra_data && extra_data->pending_page_id != -1;
const std::string& error_text =
- StringPrintf("Error %d when loading url %s", error.reason,
+ base::StringPrintf("Error %d when loading url %s", error.reason,
failed_ds->request().url().spec().data());
// Make sure we never show errors in view source mode.
diff --git a/webkit/tools/test_shell/text_input_controller.cc b/webkit/tools/test_shell/text_input_controller.cc
index 0faa523..3f38932 100644
--- a/webkit/tools/test_shell/text_input_controller.cc
+++ b/webkit/tools/test_shell/text_input_controller.cc
@@ -1,10 +1,11 @@
-// Copyright (c) 2006-2009 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.
#include "webkit/tools/test_shell/text_input_controller.h"
#include "base/string_util.h"
+#include "base/stringprintf.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
@@ -140,7 +141,8 @@ void TextInputController::markedRange(
WebRange range = main_frame->markedRange();
std::string range_str;
- SStringPrintf(&range_str, "%d,%d", range.startOffset(), range.endOffset());
+ base::SStringPrintf(&range_str, "%d,%d", range.startOffset(),
+ range.endOffset());
result->Set(range_str);
}
@@ -155,7 +157,8 @@ void TextInputController::selectedRange(
WebRange range = main_frame->selectionRange();
std::string range_str;
- SStringPrintf(&range_str, "%d,%d", range.startOffset(), range.endOffset());
+ base::SStringPrintf(&range_str, "%d,%d", range.startOffset(),
+ range.endOffset());
result->Set(range_str);
}