diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-31 17:29:25 +0000 |
commit | e83326f8400791e92875546b2fd1885a3a17d1b1 (patch) | |
tree | edbe773208b1a9f6965b45b55da10afd210ea7bb /webkit | |
parent | 8e0a03bf3b1aacaa7a2bc2561d8eb1b83eb9c2e5 (diff) | |
download | chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.zip chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.gz chromium_src-e83326f8400791e92875546b2fd1885a3a17d1b1.tar.bz2 |
Convert more callers of the integer/string functions to using
string_number_conversions.h
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3013046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/database/database_tracker.cc | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/test/plugin_geturl_test.cc | 5 | ||||
-rw-r--r-- | webkit/glue/plugins/test/plugin_test.h | 13 | ||||
-rw-r--r-- | webkit/tools/test_shell/event_sending_controller.cc | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/listener_leak_test.cc | 3 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_main.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 5 |
8 files changed, 24 insertions, 17 deletions
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc index d109064..a37c2a0 100644 --- a/webkit/database/database_tracker.cc +++ b/webkit/database/database_tracker.cc @@ -214,7 +214,8 @@ FilePath DatabaseTracker::GetFullDBFilePath( if (id < 0) return FilePath(); - FilePath file_name = FilePath::FromWStringHack(Int64ToWString(id)); + FilePath file_name = FilePath::FromWStringHack( + UTF8ToWide(base::Int64ToString(id))); return db_dir_.Append(FilePath::FromWStringHack( UTF16ToWide(GetOriginDirectory(origin_identifier)))).Append(file_name); } diff --git a/webkit/glue/plugins/test/plugin_geturl_test.cc b/webkit/glue/plugins/test/plugin_geturl_test.cc index f321b4b..e9b1c33 100644 --- a/webkit/glue/plugins/test/plugin_geturl_test.cc +++ b/webkit/glue/plugins/test/plugin_geturl_test.cc @@ -1,4 +1,4 @@ -// 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. @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/file_util.h" +#include "base/string_number_conversions.h" // url for "self". The %22%22 is to make a statement for javascript to // evaluate and return. @@ -357,7 +358,7 @@ void PluginGetURLTest::URLNotify(const char* url, NPReason reason, void* data) { case BOGUS_URL_STREAM_ID: if (reason != NPRES_NETWORK_ERR) { std::string err = "BOGUS_URL received unexpected URLNotify status: "; - err.append(IntToString(reason)); + err.append(base::IntToString(reason)); SetError(err); } tests_in_progress_--; diff --git a/webkit/glue/plugins/test/plugin_test.h b/webkit/glue/plugins/test/plugin_test.h index f06307ea..eed6e3f 100644 --- a/webkit/glue/plugins/test/plugin_test.h +++ b/webkit/glue/plugins/test/plugin_test.h @@ -1,12 +1,13 @@ -// 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. -#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ -#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ +#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_ +#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_ #include <string> +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/nphostapi.h" @@ -82,9 +83,9 @@ class PluginTest { if (val1 != val2) { std::string err; err = "Expected Equal for '"; - err.append(IntToString(val1)); + err.append(base::IntToString(val1)); err.append("' and '"); - err.append(IntToString(val2)); + err.append(base::IntToString(val2)); err.append("'"); SetError(err); } @@ -128,4 +129,4 @@ class PluginTest { } // namespace NPAPIClient -#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H__ +#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_ diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc index 10fb325..6104c72 100644 --- a/webkit/tools/test_shell/event_sending_controller.cc +++ b/webkit/tools/test_shell/event_sending_controller.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. @@ -26,6 +26,7 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/time.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "third_party/WebKit/WebKit/chromium/public/WebDragData.h" @@ -580,7 +581,7 @@ void EventSendingController::keyDown( for (int i = 1; i <= 24; ++i) { std::wstring function_key_name; function_key_name += L"F"; - function_key_name += IntToWString(i); + function_key_name += UTF8ToWide(base::IntToString(i)); if (function_key_name == code_str) { code = base::VKEY_F1 + (i - 1); break; diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 79d3dff..d6cc4b8 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -13,6 +13,7 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/path_service.h" +#include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" @@ -1021,7 +1022,7 @@ int32 LayoutTestController::CppVariantToInt32(const CppVariant& value) { return value.ToInt32(); else if (value.isString()) { int number; - if (StringToInt(value.ToString(), &number)) + if (base::StringToInt(value.ToString(), &number)) return number; } LogErrorToConsole("Invalid value for preference. Expected integer value."); diff --git a/webkit/tools/test_shell/listener_leak_test.cc b/webkit/tools/test_shell/listener_leak_test.cc index 12f336f..6f2fc4d 100644 --- a/webkit/tools/test_shell/listener_leak_test.cc +++ b/webkit/tools/test_shell/listener_leak_test.cc @@ -5,6 +5,7 @@ #include "base/file_path.h" #include "base/file_util.h" #include "base/path_service.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "testing/gtest/include/gtest/gtest.h" #include "v8/include/v8.h" @@ -43,7 +44,7 @@ static int GetNumObjects(int log_skip, const std::string& constructor) { size_t j = v8_log.find(",", i); CHECK(j != std::string::npos); int num_objects; - CHECK(StringToInt(v8_log.substr(i, j - i), &num_objects)); + CHECK(base::StringToInt(v8_log.substr(i, j - i), &num_objects)); return num_objects; } diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc index f71dc00..e5bdb85 100644 --- a/webkit/tools/test_shell/test_shell_main.cc +++ b/webkit/tools/test_shell/test_shell_main.cc @@ -206,8 +206,8 @@ int main(int argc, char* argv[]) { if (parsed_command_line.HasSwitch(test_shell::kTestShellTimeOut)) { const std::wstring timeout_str = parsed_command_line.GetSwitchValue( test_shell::kTestShellTimeOut); - int timeout_ms = - static_cast<int>(StringToInt64(WideToUTF16Hack(timeout_str.c_str()))); + int timeout_ms; + base::StringToInt(WideToUTF8(timeout_str), &timeout_ms); if (timeout_ms > 0) TestShell::SetFileTestTimeout(timeout_ms); } diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 25ebd83..e5e23c3 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -13,6 +13,7 @@ #include "base/process_util.h" #include "base/string_util.h" #include "base/trace_event.h" +#include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "gfx/native_widget_types.h" #include "gfx/point.h" @@ -255,13 +256,13 @@ std::string GetRangeDescription(const WebRange& range) { int exception = 0; std::string str = "range from "; int offset = range.startOffset(); - str.append(IntToString(offset)); + str.append(base::IntToString(offset)); str.append(" of "); WebNode container = range.startContainer(exception); str.append(GetNodeDescription(container, exception)); str.append(" to "); offset = range.endOffset(); - str.append(IntToString(offset)); + str.append(base::IntToString(offset)); str.append(" of "); container = range.endContainer(exception); str.append(GetNodeDescription(container, exception)); |