diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 21:21:36 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 21:21:36 +0000 |
commit | 4bf413576fa9c6e19a16119b007112f7a32c6ffc (patch) | |
tree | 4f001c33aff643657dbea57da0f944e01c36fa9b | |
parent | 2f4a6c55fc37dc085adaf808d1f436be91c82a09 (diff) | |
download | chromium_src-4bf413576fa9c6e19a16119b007112f7a32c6ffc.zip chromium_src-4bf413576fa9c6e19a16119b007112f7a32c6ffc.tar.gz chromium_src-4bf413576fa9c6e19a16119b007112f7a32c6ffc.tar.bz2 |
chrome 1: string_util.h -> utf_string_conversions.h fix.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/672001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40937 0039d316-1c4b-4281-b951-d872f2087c98
21 files changed, 32 insertions, 16 deletions
diff --git a/chrome/browser/autocomplete/keyword_provider.cc b/chrome/browser/autocomplete/keyword_provider.cc index 68f59ff..dcab1c3 100644 --- a/chrome/browser/autocomplete/keyword_provider.cc +++ b/chrome/browser/autocomplete/keyword_provider.cc @@ -8,7 +8,7 @@ #include <vector> #include "app/l10n_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/profile.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_model.h" @@ -166,7 +166,7 @@ std::wstring KeywordProvider::SplitKeywordFromInput( // Find end of first token. The AutocompleteController has trimmed leading // whitespace, so we need not skip over that. const size_t first_white(input.find_first_of(kWhitespaceWide)); - DCHECK(first_white != 0); + DCHECK_NE(0U, first_white); if (first_white == std::wstring::npos) return input; // Only one token provided. diff --git a/chrome/browser/autofill/autofill_dialog_gtk.cc b/chrome/browser/autofill/autofill_dialog_gtk.cc index 796a7de..e447c21 100644 --- a/chrome/browser/autofill/autofill_dialog_gtk.cc +++ b/chrome/browser/autofill/autofill_dialog_gtk.cc @@ -12,6 +12,7 @@ #include "app/l10n_util.h" #include "base/logging.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/browser/autofill/credit_card.h" #include "chrome/browser/autofill/form_group.h" diff --git a/chrome/browser/autofill/autofill_profile.cc b/chrome/browser/autofill/autofill_profile.cc index a8f0397..6d4fdfd 100644 --- a/chrome/browser/autofill/autofill_profile.cc +++ b/chrome/browser/autofill/autofill_profile.cc @@ -8,7 +8,7 @@ #include "app/l10n_util.h" #include "base/stl_util-inl.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/autofill/address.h" #include "chrome/browser/autofill/autofill_manager.h" #include "chrome/browser/autofill/billing_address.h" diff --git a/chrome/browser/browser_theme_pack.cc b/chrome/browser/browser_theme_pack.cc index 9f54abc..3e04d68 100644 --- a/chrome/browser/browser_theme_pack.cc +++ b/chrome/browser/browser_theme_pack.cc @@ -4,7 +4,10 @@ #include "chrome/browser/browser_theme_pack.h" +#include <algorithm> #include <climits> +#include <set> +#include <vector> #include "app/gfx/codec/png_codec.h" #include "app/gfx/skbitmap_operations.h" @@ -13,6 +16,7 @@ #include "base/logging.h" #include "base/stl_util-inl.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/chrome_thread.h" @@ -457,7 +461,7 @@ bool BrowserThemePack::WriteToDisk(FilePath path) const { source_count++; resources[kSourceImagesID] = base::StringPiece( reinterpret_cast<const char*>(source_images_), - source_count * sizeof(int)); + source_count * sizeof(*source_images_)); AddRawImagesTo(image_memory_, &resources); @@ -637,7 +641,6 @@ void BrowserThemePack::BuildTintsFromJSON(DictionaryValue* tints_value) { if (ValidRealValue(tint_list, 0, &hsl.h) && ValidRealValue(tint_list, 1, &hsl.s) && ValidRealValue(tint_list, 2, &hsl.l)) { - int id = GetIntForString(WideToUTF8(*iter), kTintTable); if (id != -1) { temp_tints[id] = hsl; diff --git a/chrome/browser/browsing_data_database_helper.cc b/chrome/browser/browsing_data_database_helper.cc index 5350938..9c3acf0 100644 --- a/chrome/browser/browsing_data_database_helper.cc +++ b/chrome/browser/browsing_data_database_helper.cc @@ -7,6 +7,7 @@ #include "base/callback.h" #include "base/file_util.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/profile.h" #include "net/base/net_errors.h" @@ -44,7 +45,7 @@ void BrowsingDataDatabaseHelper::CancelNotification() { void BrowsingDataDatabaseHelper::DeleteDatabase(const std::string& origin, const std::string& name) { DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); - ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE,NewRunnableMethod( + ChromeThread::PostTask(ChromeThread::FILE, FROM_HERE, NewRunnableMethod( this, &BrowsingDataDatabaseHelper::DeleteDatabaseInFileThread, origin, name)); } diff --git a/chrome/browser/content_exceptions_table_model.cc b/chrome/browser/content_exceptions_table_model.cc index 7c7cb68..4d4eda9 100644 --- a/chrome/browser/content_exceptions_table_model.cc +++ b/chrome/browser/content_exceptions_table_model.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "app/table_model_observer.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/host_content_settings_map.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/cookie_modal_dialog.cc b/chrome/browser/cookie_modal_dialog.cc index abf84fd..99378dc 100644 --- a/chrome/browser/cookie_modal_dialog.cc +++ b/chrome/browser/cookie_modal_dialog.cc @@ -5,6 +5,7 @@ #include "chrome/browser/cookie_modal_dialog.h" #include "app/message_box_flags.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/host_content_settings_map.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/cookie_modal_dialog_gtk.cc b/chrome/browser/cookie_modal_dialog_gtk.cc index ac45657..54ce2e2 100644 --- a/chrome/browser/cookie_modal_dialog_gtk.cc +++ b/chrome/browser/cookie_modal_dialog_gtk.cc @@ -6,6 +6,8 @@ #include "app/l10n_util.h" #include "base/logging.h" +#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/gtk/gtk_chrome_cookie_view.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" diff --git a/chrome/browser/diagnostics/recon_diagnostics.cc b/chrome/browser/diagnostics/recon_diagnostics.cc index f16c4a4..3113211 100644 --- a/chrome/browser/diagnostics/recon_diagnostics.cc +++ b/chrome/browser/diagnostics/recon_diagnostics.cc @@ -7,6 +7,7 @@ #include "base/file_util.h" #include "base/file_version_info.h" #include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/sys_info.h" #include "base/path_service.h" #include "chrome/browser/diagnostics/diagnostics_test.h" diff --git a/chrome/browser/extensions/crashed_extension_infobar.cc b/chrome/browser/extensions/crashed_extension_infobar.cc index 80ab865..685c5f7 100644 --- a/chrome/browser/extensions/crashed_extension_infobar.cc +++ b/chrome/browser/extensions/crashed_extension_infobar.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/common/extensions/extension.h" #include "grit/browser_resources.h" diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc index fa466f3..e4c5a93 100644 --- a/chrome/browser/extensions/crx_installer.cc +++ b/chrome/browser/extensions/crx_installer.cc @@ -8,8 +8,8 @@ #include "app/resource_bundle.h" #include "base/file_util.h" #include "base/scoped_temp_dir.h" -#include "base/string_util.h" #include "base/task.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/extensions/convert_user_script.h" diff --git a/chrome/browser/extensions/pack_extension_job.cc b/chrome/browser/extensions/pack_extension_job.cc index 871a920..01c2fb6 100644 --- a/chrome/browser/extensions/pack_extension_job.cc +++ b/chrome/browser/extensions/pack_extension_job.cc @@ -5,7 +5,7 @@ #include "chrome/browser/extensions/pack_extension_job.h" #include "base/message_loop.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/task.h" #include "chrome/browser/extensions/extension_creator.h" diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc index 07072c0..196f9ff 100644 --- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc +++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc @@ -4,9 +4,11 @@ #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" +#include <string> + #include "app/l10n_util.h" #include "app/resource_bundle.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_theme_provider.h" #include "chrome/browser/extensions/extensions_service.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/js_modal_dialog_gtk.cc b/chrome/browser/js_modal_dialog_gtk.cc index 4fc5bd8..773fcfc 100644 --- a/chrome/browser/js_modal_dialog_gtk.cc +++ b/chrome/browser/js_modal_dialog_gtk.cc @@ -9,7 +9,7 @@ #include "app/l10n_util.h" #include "app/message_box_flags.h" #include "base/logging.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" diff --git a/chrome/browser/spellchecker_platform_engine_unittest.cc b/chrome/browser/spellchecker_platform_engine_unittest.cc index e775ca8..060a0a5 100644 --- a/chrome/browser/spellchecker_platform_engine_unittest.cc +++ b/chrome/browser/spellchecker_platform_engine_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/spellchecker_platform_engine.h" #include "testing/gtest/include/gtest/gtest.h" @@ -63,7 +63,7 @@ TEST(PlatformSpellCheckTest, MAYBE_IgnoreWords_EN_US) { // The word should now show be spelled wrong again EXPECT_EQ(kTestCases[i].input_result, result); } -} // Test IgnoreWords_EN_US +} // Test IgnoreWords_EN_US TEST(PlatformSpellCheckTest, MAYBE_SpellCheckSuggestions_EN_US) { static const struct { @@ -357,7 +357,7 @@ TEST(PlatformSpellCheckTest, MAYBE_SpellCheckSuggestions_EN_US) { // Check if the suggested words occur. bool suggested_word_is_present = false; - for (int j=0; j < static_cast<int>(suggestions.size()); j++) { + for (int j = 0; j < static_cast<int>(suggestions.size()); j++) { if (suggestions.at(j).compare(WideToUTF16(kTestCases[i].suggested_word)) == 0) { suggested_word_is_present = true; diff --git a/chrome/browser/ssl/ssl_client_auth_handler_gtk.cc b/chrome/browser/ssl/ssl_client_auth_handler_gtk.cc index 49fa4c5..6be5a83 100644 --- a/chrome/browser/ssl/ssl_client_auth_handler_gtk.cc +++ b/chrome/browser/ssl/ssl_client_auth_handler_gtk.cc @@ -15,6 +15,7 @@ #include "base/i18n/time_formatting.h" #include "base/logging.h" #include "base/nss_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/certificate_viewer.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/third_party/mozilla_security_manager/nsNSSCertHelper.h" diff --git a/chrome/browser/ssl/ssl_error_info.cc b/chrome/browser/ssl/ssl_error_info.cc index fd54bd4..1681bf7 100644 --- a/chrome/browser/ssl/ssl_error_info.cc +++ b/chrome/browser/ssl/ssl_error_info.cc @@ -5,7 +5,7 @@ #include "chrome/browser/ssl/ssl_error_info.h" #include "app/l10n_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/cert_store.h" #include "chrome/common/time_format.h" #include "googleurl/src/gurl.h" diff --git a/chrome/browser/ssl/ssl_manager.cc b/chrome/browser/ssl/ssl_manager.cc index b869d65..c1350e4 100644 --- a/chrome/browser/ssl/ssl_manager.cc +++ b/chrome/browser/ssl/ssl_manager.cc @@ -5,6 +5,7 @@ #include "chrome/browser/ssl/ssl_manager.h" #include "app/l10n_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/load_from_memory_cache_details.h" #include "chrome/browser/net/url_request_tracking.h" diff --git a/chrome/renderer/spellchecker/spellcheck_worditerator.cc b/chrome/renderer/spellchecker/spellcheck_worditerator.cc index 0806f50..2b58393 100644 --- a/chrome/renderer/spellchecker/spellcheck_worditerator.cc +++ b/chrome/renderer/spellchecker/spellcheck_worditerator.cc @@ -8,7 +8,7 @@ #include <string> #include "base/basictypes.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/renderer/spellchecker/spellcheck.h" #include "third_party/icu/public/common/unicode/normlzr.h" #include "third_party/icu/public/common/unicode/schriter.h" diff --git a/chrome/test/ui/javascript_test_util.cc b/chrome/test/ui/javascript_test_util.cc index a2694ae..f2f7f7b 100644 --- a/chrome/test/ui/javascript_test_util.cc +++ b/chrome/test/ui/javascript_test_util.cc @@ -6,7 +6,7 @@ #include "base/logging.h" #include "base/scoped_ptr.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/json_value_serializer.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h index 72e9baa..28f0b90 100644 --- a/chrome/test/unit/chrome_test_suite.h +++ b/chrome/test/unit/chrome_test_suite.h @@ -17,6 +17,7 @@ #include "base/ref_counted.h" #include "base/scoped_nsautorelease_pool.h" #include "base/test/test_suite.h" +#include "base/utf_string_conversions.h" #include "chrome/app/scoped_ole_initializer.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_constants.h" |