diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-29 00:54:13 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-29 00:54:13 +0000 |
commit | 1c32402767e49d21eea7470cd7b89f682755d391 (patch) | |
tree | d3a11c042eb63dcb1032002038a987d0c191926e /webkit/appcache | |
parent | d4bc96e84f87586da6a312a3c8eed3a12b3221d3 (diff) | |
download | chromium_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/appcache')
-rw-r--r-- | webkit/appcache/appcache_host.cc | 6 | ||||
-rw-r--r-- | webkit/appcache/appcache_update_job.cc | 21 | ||||
-rw-r--r-- | webkit/appcache/appcache_url_request_job.cc | 15 | ||||
-rw-r--r-- | webkit/appcache/web_application_cache_host_impl.cc | 11 |
4 files changed, 30 insertions, 23 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 |