diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 14:39:42 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 14:39:42 +0000 |
commit | c9c07779224d9dd320323943a569dbf2e416a411 (patch) | |
tree | a040e1ca03410c7cb37547b16b5a0fb8bea67dde /chrome_frame | |
parent | be1ce6a7b2fa7e9622e5b249abd5fab478b6ca05 (diff) | |
download | chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.zip chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.tar.gz chromium_src-c9c07779224d9dd320323943a569dbf2e416a411.tar.bz2 |
Remove number conversion functions from string_util. These moved to string_number_conversions.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/3054036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54747 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/chrome_tab.cc | 3 | ||||
-rw-r--r-- | chrome_frame/protocol_sink_wrap.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/mock_ie_event_sink_test.h | 3 | ||||
-rw-r--r-- | chrome_frame/test/test_server.cc | 9 | ||||
-rw-r--r-- | chrome_frame/utils.cc | 3 |
5 files changed, 15 insertions, 7 deletions
diff --git a/chrome_frame/chrome_tab.cc b/chrome_frame/chrome_tab.cc index 002d700..4f264a5 100644 --- a/chrome_frame/chrome_tab.cc +++ b/chrome_frame/chrome_tab.cc @@ -18,6 +18,7 @@ #include "base/logging_win.h" #include "base/path_service.h" #include "base/registry.h" +#include "base/string_number_conversions.h" #include "base/string_piece.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" @@ -99,7 +100,7 @@ class ChromeTabModule : public CAtlDllModuleT<ChromeTabModule> { if (SUCCEEDED(hr)) { SYSTEMTIME local_time; ::GetSystemTime(&local_time); - std::string hex(HexEncode(&local_time, sizeof(local_time))); + std::string hex(base::HexEncode(&local_time, sizeof(local_time))); base::StringPiece sp_hex(hex); hr = registrar->AddReplacement(L"SYSTIME", base::SysNativeMBToWide(sp_hex).c_str()); diff --git a/chrome_frame/protocol_sink_wrap.cc b/chrome_frame/protocol_sink_wrap.cc index 0c9a4ea..05b092d 100644 --- a/chrome_frame/protocol_sink_wrap.cc +++ b/chrome_frame/protocol_sink_wrap.cc @@ -189,7 +189,9 @@ ScopedComPtr<IBindCtx> BindCtxFromIBindInfo(IInternetBindInfo* bind_info) { bind_info->GetBindString(BINDSTRING_PTR_BIND_CONTEXT, &bind_ctx_string, 1, &count); if (bind_ctx_string) { - IBindCtx* pbc = reinterpret_cast<IBindCtx*>(StringToInt(bind_ctx_string)); + int bind_ctx_int; + base::StringToInt(bind_ctx_string, &bind_ctx_int); + IBindCtx* pbc = reinterpret_cast<IBindCtx*>(bind_ctx_int); bind_ctx.Attach(pbc); CoTaskMemFree(bind_ctx_string); } diff --git a/chrome_frame/test/mock_ie_event_sink_test.h b/chrome_frame/test/mock_ie_event_sink_test.h index e751073..73e8778 100644 --- a/chrome_frame/test/mock_ie_event_sink_test.h +++ b/chrome_frame/test/mock_ie_event_sink_test.h @@ -9,6 +9,7 @@ #include <atlcom.h> #include <string> +#include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #include "chrome_frame/test/chrome_frame_test_utils.h" #include "chrome_frame/test/ie_event_sink.h" @@ -213,7 +214,7 @@ class MockIEEventSinkTest { DCHECK_LT(index, 5); std::wstring base_name = L"anchor.html"; if (index > 0) - base_name += std::wstring(L"#a") + IntToWString(index); + base_name += std::wstring(L"#a") + base::IntToString16(index); return GetTestUrl(base_name); } diff --git a/chrome_frame/test/test_server.cc b/chrome_frame/test/test_server.cc index 8f0910d..623a044 100644 --- a/chrome_frame/test/test_server.cc +++ b/chrome_frame/test/test_server.cc @@ -4,6 +4,7 @@ #include "base/logging.h" #include "base/registry.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -44,8 +45,10 @@ void Request::ParseHeaders(const std::string& headers) { "\r\n"); while (it.GetNext()) { if (LowerCaseEqualsASCII(it.name(), "content-length")) { - content_length_ = StringToInt(it.values().c_str()); - break; + int int_content_length; + base::StringToInt(it.values().c_str(), &int_content_length); + content_length_ = int_content_length; + break; } } } @@ -362,4 +365,4 @@ void ConfigurableConnection::SendWithOptions(const std::string& headers, options.timeout_); } -} // namespace test_server
\ No newline at end of file +} // namespace test_server diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 6c1e33e..3cce0cd 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -16,6 +16,7 @@ #include "base/scoped_bstr_win.h" #include "base/scoped_comptr_win.h" #include "base/scoped_variant_win.h" +#include "base/string_number_conversions.h" #include "base/string_tokenizer.h" #include "base/string_util.h" #include "base/thread_local.h" @@ -1070,7 +1071,7 @@ int GetHttpResponseStatusFromBinding(IBinding* binding) { DWORD reserved = 0; if (SUCCEEDED(info->QueryInfo(HTTP_QUERY_STATUS_CODE, status, &buf_size, &flags, &reserved))) { - http_status = StringToInt(status); + base::StringToInt(status, &http_status); } else { NOTREACHED() << "Failed to get HTTP status"; } |