diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 04:06:00 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 04:06:00 +0000 |
commit | 6782f83869465c17f57b2b1decdda56cdc36f72f (patch) | |
tree | f5f29830c3bcb4112263f1db75e5b1b684ccecc4 /chrome | |
parent | 8b43b064460283034234dde05695ad08ce12e5d7 (diff) | |
download | chromium_src-6782f83869465c17f57b2b1decdda56cdc36f72f.zip chromium_src-6782f83869465c17f57b2b1decdda56cdc36f72f.tar.gz chromium_src-6782f83869465c17f57b2b1decdda56cdc36f72f.tar.bz2 |
iwyu: Include stringprintf.h where appropriate, part 1.
BUG=82098
TEST=none
R=thakis@chromium.org
Review URL: http://codereview.chromium.org/6997006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser_about_handler.h | 5 | ||||
-rw-r--r-- | chrome/browser/debugger/debugger_remote_service.cc | 1 | ||||
-rw-r--r-- | chrome/browser/debugger/devtools_http_protocol_handler.cc | 7 | ||||
-rw-r--r-- | chrome/browser/debugger/devtools_window.cc | 1 | ||||
-rw-r--r-- | chrome/browser/sync/engine/syncer_proto_util.cc | 29 | ||||
-rw-r--r-- | chrome/browser/sync/syncable/directory_backing_store.cc | 12 | ||||
-rw-r--r-- | chrome/common/extensions/extension_file_util.cc | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension_l10n_util.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension_message_bundle.cc | 2 | ||||
-rw-r--r-- | chrome/common/net/gaia/gaia_auth_fetcher.cc | 1 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 1 | ||||
-rw-r--r-- | chrome/renderer/extensions/bindings_utils.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/extensions/user_script_slave.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/security_filter_peer.cc | 1 |
14 files changed, 41 insertions, 31 deletions
diff --git a/chrome/browser/browser_about_handler.h b/chrome/browser/browser_about_handler.h index d319fbe..caaeba3 100644 --- a/chrome/browser/browser_about_handler.h +++ b/chrome/browser/browser_about_handler.h @@ -13,7 +13,7 @@ #include <vector> #include "base/process.h" -#include "base/string_util.h" +#include "base/stringprintf.h" template <typename T> struct DefaultSingletonTraits; class GURL; @@ -60,7 +60,8 @@ class AboutTcmallocOutputs { // the output for a canonical renderer header string that // incorporates the pid. void RendererCallback(base::ProcessId pid, const std::string& output) { - SetOutput(StringPrintf("Renderer PID %d", static_cast<int>(pid)), output); + SetOutput( + base::StringPrintf("Renderer PID %d", static_cast<int>(pid)), output); } private: diff --git a/chrome/browser/debugger/debugger_remote_service.cc b/chrome/browser/debugger/debugger_remote_service.cc index 6c21e2e..5847191 100644 --- a/chrome/browser/debugger/debugger_remote_service.cc +++ b/chrome/browser/debugger/debugger_remote_service.cc @@ -9,6 +9,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" +#include "base/stringprintf.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "base/values.h" diff --git a/chrome/browser/debugger/devtools_http_protocol_handler.cc b/chrome/browser/debugger/devtools_http_protocol_handler.cc index 6e55da0..90e95e0 100644 --- a/chrome/browser/debugger/devtools_http_protocol_handler.cc +++ b/chrome/browser/debugger/devtools_http_protocol_handler.cc @@ -10,6 +10,7 @@ #include "base/json/json_writer.h" #include "base/logging.h" #include "base/message_loop_proxy.h" +#include "base/stringprintf.h" #include "base/string_number_conversions.h" #include "base/threading/thread.h" #include "base/utf_string_conversions.h" @@ -152,11 +153,11 @@ void DevToolsHttpProtocolHandler::OnHttpRequest( net::URLRequest* request; - if (info.path.find("/devtools/") == 0) + if (info.path.find("/devtools/") == 0) { request = new net::URLRequest(GURL("chrome-devtools:/" + info.path), this); - else if (info.path.find("/thumb/") == 0) + } else if (info.path.find("/thumb/") == 0) { request = new net::URLRequest(GURL("chrome:/" + info.path), this); - else { + } else { server_->Send404(connection_id); return; } diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index f824768..1d7e5a9f 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -4,6 +4,7 @@ #include "base/command_line.h" #include "base/json/json_writer.h" +#include "base/stringprintf.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "base/values.h" diff --git a/chrome/browser/sync/engine/syncer_proto_util.cc b/chrome/browser/sync/engine/syncer_proto_util.cc index a3a6177..e96af94 100644 --- a/chrome/browser/sync/engine/syncer_proto_util.cc +++ b/chrome/browser/sync/engine/syncer_proto_util.cc @@ -5,7 +5,7 @@ #include "chrome/browser/sync/engine/syncer_proto_util.h" #include "base/format_macros.h" -#include "base/string_util.h" +#include "base/stringprintf.h" #include "chrome/browser/sync/engine/net/server_connection_manager.h" #include "chrome/browser/sync/engine/syncer.h" #include "chrome/browser/sync/engine/syncer_types.h" @@ -342,19 +342,20 @@ const std::string& SyncerProtoUtil::NameFromCommitEntryResponse( std::string SyncerProtoUtil::SyncEntityDebugString( const sync_pb::SyncEntity& entry) { - return StringPrintf("id: %s, parent_id: %s, " - "version: %"PRId64"d, " - "mtime: %" PRId64"d (client: %" PRId64"d), " - "ctime: %" PRId64"d (client: %" PRId64"d), " - "name: %s, sync_timestamp: %" PRId64"d, " - "%s ", - entry.id_string().c_str(), - entry.parent_id_string().c_str(), - entry.version(), - entry.mtime(), ServerTimeToClientTime(entry.mtime()), - entry.ctime(), ServerTimeToClientTime(entry.ctime()), - entry.name().c_str(), entry.sync_timestamp(), - entry.deleted() ? "deleted, ":""); + return base::StringPrintf( + "id: %s, parent_id: %s, " + "version: %"PRId64"d, " + "mtime: %" PRId64"d (client: %" PRId64"d), " + "ctime: %" PRId64"d (client: %" PRId64"d), " + "name: %s, sync_timestamp: %" PRId64"d, " + "%s ", + entry.id_string().c_str(), + entry.parent_id_string().c_str(), + entry.version(), + entry.mtime(), ServerTimeToClientTime(entry.mtime()), + entry.ctime(), ServerTimeToClientTime(entry.ctime()), + entry.name().c_str(), entry.sync_timestamp(), + entry.deleted() ? "deleted, ":""); } namespace { diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc index 7983c73..dce65ba0 100644 --- a/chrome/browser/sync/syncable/directory_backing_store.cc +++ b/chrome/browser/sync/syncable/directory_backing_store.cc @@ -17,8 +17,8 @@ #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/stl_util-inl.h" +#include "base/stringprintf.h" #include "base/string_number_conversions.h" -#include "base/string_util.h" #include "chrome/browser/sync/protocol/bookmark_specifics.pb.h" #include "chrome/browser/sync/protocol/service_constants.h" #include "chrome/browser/sync/protocol/sync.pb.h" @@ -740,9 +740,9 @@ bool DirectoryBackingStore::MigrateToSpecifics( void (*handler_function)(SQLStatement* old_value_query, int old_value_column, sync_pb::EntitySpecifics* mutable_new_value)) { - std::string query_sql = StringPrintf("SELECT metahandle, %s, %s FROM metas", - specifics_column, old_columns); - std::string update_sql = StringPrintf( + std::string query_sql = base::StringPrintf( + "SELECT metahandle, %s, %s FROM metas", specifics_column, old_columns); + std::string update_sql = base::StringPrintf( "UPDATE metas SET %s = ? WHERE metahandle = ?", specifics_column); SQLStatement query; query.prepare(load_dbhandle_, query_sql.c_str()); @@ -769,8 +769,8 @@ bool DirectoryBackingStore::MigrateToSpecifics( bool DirectoryBackingStore::AddColumn(const ColumnSpec* column) { SQLStatement add_column; - std::string sql = StringPrintf("ALTER TABLE metas ADD COLUMN %s %s", - column->name, column->spec); + std::string sql = base::StringPrintf( + "ALTER TABLE metas ADD COLUMN %s %s", column->name, column->spec); add_column.prepare(load_dbhandle_, sql.c_str()); return add_column.step() == SQLITE_DONE; } diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc index d378d85..1c8b9fc 100644 --- a/chrome/common/extensions/extension_file_util.cc +++ b/chrome/common/extensions/extension_file_util.cc @@ -12,6 +12,7 @@ #include "base/memory/scoped_temp_dir.h" #include "base/metrics/histogram.h" #include "base/path_service.h" +#include "base/stringprintf.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "chrome/common/chrome_paths.h" diff --git a/chrome/common/extensions/extension_l10n_util.cc b/chrome/common/extensions/extension_l10n_util.cc index 14b9178..dff7938 100644 --- a/chrome/common/extensions/extension_l10n_util.cc +++ b/chrome/common/extensions/extension_l10n_util.cc @@ -12,7 +12,7 @@ #include "base/file_util.h" #include "base/logging.h" #include "base/memory/linked_ptr.h" -#include "base/string_util.h" +#include "base/stringprintf.h" #include "base/values.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" diff --git a/chrome/common/extensions/extension_message_bundle.cc b/chrome/common/extensions/extension_message_bundle.cc index 26e9c97..a3740a9 100644 --- a/chrome/common/extensions/extension_message_bundle.cc +++ b/chrome/common/extensions/extension_message_bundle.cc @@ -13,7 +13,7 @@ #include "base/memory/linked_ptr.h" #include "base/memory/scoped_ptr.h" #include "base/stl_util-inl.h" -#include "base/string_util.h" +#include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension_constants.h" diff --git a/chrome/common/net/gaia/gaia_auth_fetcher.cc b/chrome/common/net/gaia/gaia_auth_fetcher.cc index 664c73d..2448c12 100644 --- a/chrome/common/net/gaia/gaia_auth_fetcher.cc +++ b/chrome/common/net/gaia/gaia_auth_fetcher.cc @@ -8,6 +8,7 @@ #include <utility> #include <vector> +#include "base/stringprintf.h" #include "base/string_split.h" #include "base/string_util.h" #include "chrome/common/net/gaia/gaia_auth_consumer.h" diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 2cbcc37..3681e40 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -15,6 +15,7 @@ #include "base/process.h" #include "base/shared_memory.h" #include "base/string16.h" +#include "base/stringprintf.h" #include "base/values.h" #include "build/build_config.h" #include "chrome/common/common_param_traits.h" diff --git a/chrome/renderer/extensions/bindings_utils.cc b/chrome/renderer/extensions/bindings_utils.cc index d563319..89fa70b 100644 --- a/chrome/renderer/extensions/bindings_utils.cc +++ b/chrome/renderer/extensions/bindings_utils.cc @@ -5,8 +5,8 @@ #include "chrome/renderer/extensions/bindings_utils.h" #include "base/lazy_instance.h" +#include "base/stringprintf.h" #include "base/string_split.h" -#include "base/string_util.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_set.h" #include "chrome/renderer/extensions/extension_dispatcher.h" @@ -71,7 +71,7 @@ bool ExtensionBase::CheckPermissionForCurrentContext( static const char kMessage[] = "You do not have permission to use '%s'. Be sure to declare" " in your manifest what permissions you need."; - std::string error_msg = StringPrintf(kMessage, function_name.c_str()); + std::string error_msg = base::StringPrintf(kMessage, function_name.c_str()); v8::ThrowException(v8::Exception::Error(v8::String::New(error_msg.c_str()))); return false; diff --git a/chrome/renderer/extensions/user_script_slave.cc b/chrome/renderer/extensions/user_script_slave.cc index 48c0fb8..3757fc8c 100644 --- a/chrome/renderer/extensions/user_script_slave.cc +++ b/chrome/renderer/extensions/user_script_slave.cc @@ -180,8 +180,9 @@ void UserScriptSlave::InsertInitExtensionCode( DCHECK(sources); bool incognito = ChromeRenderProcessObserver::is_incognito_process(); sources->insert(sources->begin(), WebScriptSource(WebString::fromUTF8( - StringPrintf(kInitExtension, extension_id.c_str(), - incognito ? "true" : "false")))); + base::StringPrintf(kInitExtension, + extension_id.c_str(), + incognito ? "true" : "false")))); } void UserScriptSlave::InjectScripts(WebFrame* frame, diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc index 88a1091..bf9a946 100644 --- a/chrome/renderer/security_filter_peer.cc +++ b/chrome/renderer/security_filter_peer.cc @@ -4,6 +4,7 @@ #include "chrome/renderer/security_filter_peer.h" +#include "base/stringprintf.h" #include "grit/generated_resources.h" #include "net/base/net_errors.h" #include "net/http/http_response_headers.h" |