diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 23:12:48 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-08 23:12:48 +0000 |
commit | 316f96a6b665ae43011d336f5ffb08414cba0391 (patch) | |
tree | 7f21668a774b5d7e90c3c42c4f656a2989fde2ae | |
parent | 1cb92b82067bc2ed57f41aee7eb39269df91f4f0 (diff) | |
download | chromium_src-316f96a6b665ae43011d336f5ffb08414cba0391.zip chromium_src-316f96a6b665ae43011d336f5ffb08414cba0391.tar.gz chromium_src-316f96a6b665ae43011d336f5ffb08414cba0391.tar.bz2 |
chrome 4: string_util.h -> utf_string_conversions.h fix.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/671019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40960 0039d316-1c4b-4281-b951-d872f2087c98
20 files changed, 37 insertions, 13 deletions
diff --git a/chrome/browser/gtk/dialogs_gtk.cc b/chrome/browser/gtk/dialogs_gtk.cc index ef577c8..8ea3f44 100644 --- a/chrome/browser/gtk/dialogs_gtk.cc +++ b/chrome/browser/gtk/dialogs_gtk.cc @@ -11,8 +11,8 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/mime_util.h" -#include "base/string_util.h" #include "base/sys_string_conversions.h" +#include "base/utf_string_conversions.h" #include "base/thread.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_thread.h" diff --git a/chrome/browser/gtk/download_item_drag.cc b/chrome/browser/gtk/download_item_drag.cc index b09a43c..9ad1c2e 100644 --- a/chrome/browser/gtk/download_item_drag.cc +++ b/chrome/browser/gtk/download_item_drag.cc @@ -6,7 +6,7 @@ #include "app/gfx/gtk_util.h" #include "app/gtk_dnd_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/download/download_manager.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" @@ -27,7 +27,7 @@ void OnDragDataGet(GtkWidget* widget, GdkDragContext* context, UTF8ToUTF16(download_item->GetFileName().value()), target_type); } -} // namespace +} // namespace // static void DownloadItemDrag::SetSource(GtkWidget* widget, DownloadItem* item) { diff --git a/chrome/browser/gtk/edit_search_engine_dialog.cc b/chrome/browser/gtk/edit_search_engine_dialog.cc index 735f071..f639f0c 100644 --- a/chrome/browser/gtk/edit_search_engine_dialog.cc +++ b/chrome/browser/gtk/edit_search_engine_dialog.cc @@ -9,7 +9,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/message_loop.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/net/url_fixer_upper.h" diff --git a/chrome/browser/gtk/first_run_bubble.cc b/chrome/browser/gtk/first_run_bubble.cc index 9e3a918..e502781 100644 --- a/chrome/browser/gtk/first_run_bubble.cc +++ b/chrome/browser/gtk/first_run_bubble.cc @@ -8,6 +8,7 @@ #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_theme_provider.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/options_window.h" diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc index ae3481d..93f2861 100644 --- a/chrome/browser/gtk/first_run_dialog.cc +++ b/chrome/browser/gtk/first_run_dialog.cc @@ -7,6 +7,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/process_singleton.h" diff --git a/chrome/browser/gtk/gtk_chrome_cookie_view.cc b/chrome/browser/gtk/gtk_chrome_cookie_view.cc index 9c03994..1abb6d2 100644 --- a/chrome/browser/gtk/gtk_chrome_cookie_view.cc +++ b/chrome/browser/gtk/gtk_chrome_cookie_view.cc @@ -6,7 +6,7 @@ #include "app/l10n_util.h" #include "base/i18n/time_formatting.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc index 8aadc09..1d1c4dc 100644 --- a/chrome/browser/gtk/import_dialog_gtk.cc +++ b/chrome/browser/gtk/import_dialog_gtk.cc @@ -8,6 +8,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/gtk_util.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/gtk/import_progress_dialog_gtk.cc b/chrome/browser/gtk/import_progress_dialog_gtk.cc index 3d1f48e..68514b1 100644 --- a/chrome/browser/gtk/import_progress_dialog_gtk.cc +++ b/chrome/browser/gtk/import_progress_dialog_gtk.cc @@ -4,8 +4,11 @@ #include "chrome/browser/gtk/import_progress_dialog_gtk.h" +#include <string> + #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -208,7 +211,7 @@ void StartImportingWithUI(GtkWindow* parent, Profile* profile, ImportObserver* observer, bool first_run) { - DCHECK(items != 0); + DCHECK_NE(0, items); ImportProgressDialogGtk::StartImport(parent, items, importer_host, browser_profile, profile, observer, first_run); diff --git a/chrome/browser/gtk/infobar_gtk.cc b/chrome/browser/gtk/infobar_gtk.cc index 0a86908..79c3290 100644 --- a/chrome/browser/gtk/infobar_gtk.cc +++ b/chrome/browser/gtk/infobar_gtk.cc @@ -7,7 +7,7 @@ #include <gtk/gtk.h> #include "app/gfx/gtk_util.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/custom_button.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" #include "chrome/browser/gtk/gtk_theme_provider.h" diff --git a/chrome/browser/gtk/keyword_editor_view.cc b/chrome/browser/gtk/keyword_editor_view.cc index 1ebefb9..aeef8d6 100644 --- a/chrome/browser/gtk/keyword_editor_view.cc +++ b/chrome/browser/gtk/keyword_editor_view.cc @@ -9,6 +9,7 @@ #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/edit_search_engine_dialog.h" #include "chrome/browser/gtk/gtk_tree.h" diff --git a/chrome/browser/gtk/menu_gtk.cc b/chrome/browser/gtk/menu_gtk.cc index 11d82de..7da5812 100644 --- a/chrome/browser/gtk/menu_gtk.cc +++ b/chrome/browser/gtk/menu_gtk.cc @@ -4,6 +4,8 @@ #include "chrome/browser/gtk/menu_gtk.h" +#include <map> + #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "app/menus/accelerator_gtk.h" @@ -11,7 +13,7 @@ #include "base/logging.h" #include "base/message_loop.h" #include "base/stl_util-inl.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/gtk/standard_menus.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -24,7 +26,7 @@ namespace { // Sets the ID of a menu item. void SetMenuItemID(GtkWidget* menu_item, int menu_id) { - DCHECK(menu_id >= 0); + DCHECK_GE(menu_id, 0); // Add 1 to the menu_id to avoid setting zero (null) to "menu-id". g_object_set_data(G_OBJECT(menu_item), "menu-id", diff --git a/chrome/browser/gtk/options/content_exceptions_window_gtk.cc b/chrome/browser/gtk/options/content_exceptions_window_gtk.cc index 869ab20..cabf064 100644 --- a/chrome/browser/gtk/options/content_exceptions_window_gtk.cc +++ b/chrome/browser/gtk/options/content_exceptions_window_gtk.cc @@ -4,9 +4,12 @@ #include "chrome/browser/gtk/options/content_exceptions_window_gtk.h" +#include <set> + #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/gtk/options/content_exception_editor.h" #include "grit/generated_resources.h" @@ -172,7 +175,7 @@ void ContentExceptionsWindowGtk::AcceptExceptionEdit(const std::string& host, model_->AddException(host, setting); int new_index = model_->IndexOfExceptionByHost(host); - DCHECK(new_index != -1); + DCHECK_NE(-1, new_index); GtkTreePath* path = gtk_tree_path_new_from_indices(new_index, -1); gtk_tree_selection_select_path(treeview_selection_, path); diff --git a/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc b/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc index 6b62087..1bd4c7b 100644 --- a/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc +++ b/chrome/browser/gtk/options/passwords_exceptions_page_gtk.cc @@ -4,9 +4,12 @@ #include "chrome/browser/gtk/options/passwords_exceptions_page_gtk.h" +#include <string> + #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_tree.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/pref_service.h" diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc index a0112e7..f52a901 100644 --- a/chrome/browser/gtk/options/passwords_page_gtk.cc +++ b/chrome/browser/gtk/options/passwords_page_gtk.cc @@ -4,9 +4,12 @@ #include "chrome/browser/gtk/options/passwords_page_gtk.h" +#include <string> + #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_tree.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/pref_service.h" diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc index 6e3b1c5..f89a199 100644 --- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc +++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc @@ -7,6 +7,7 @@ #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "base/message_loop.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/gtk_tree.h" #include "chrome/browser/gtk/gtk_util.h" diff --git a/chrome/browser/gtk/page_info_window_gtk.cc b/chrome/browser/gtk/page_info_window_gtk.cc index 673f25d..05d93d7 100644 --- a/chrome/browser/gtk/page_info_window_gtk.cc +++ b/chrome/browser/gtk/page_info_window_gtk.cc @@ -9,7 +9,7 @@ #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/compiler_specific.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/certificate_viewer.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/page_info_model.h" @@ -181,7 +181,7 @@ void PageInfoWindowGtk::ShowCertDialog() { ShowCertificateViewer(GTK_WINDOW(dialog_), cert_id_); } -} // namespace +} // namespace namespace browser { diff --git a/chrome/browser/gtk/status_bubble_gtk.cc b/chrome/browser/gtk/status_bubble_gtk.cc index c238a66..ba25657 100644 --- a/chrome/browser/gtk/status_bubble_gtk.cc +++ b/chrome/browser/gtk/status_bubble_gtk.cc @@ -6,11 +6,13 @@ #include <gtk/gtk.h> +#include <algorithm> + #include "app/gfx/gtk_util.h" #include "app/gfx/text_elider.h" #include "app/l10n_util.h" #include "base/message_loop.h" -#include "base/string_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/gtk/gtk_theme_provider.h" #include "chrome/browser/gtk/gtk_util.h" #include "chrome/browser/gtk/rounded_window.h" diff --git a/chrome/browser/gtk/tabs/tab_gtk.cc b/chrome/browser/gtk/tabs/tab_gtk.cc index d7ab875..64c5404 100644 --- a/chrome/browser/gtk/tabs/tab_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_gtk.cc @@ -13,6 +13,7 @@ #include "app/resource_bundle.h" #include "base/keyboard_codes_posix.h" #include "base/singleton.h" +#include "base/utf_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/gtk/accelerators_gtk.h" #include "chrome/browser/gtk/menu_gtk.h" diff --git a/chrome/browser/gtk/task_manager_gtk.cc b/chrome/browser/gtk/task_manager_gtk.cc index e0f78d9..a63140b8 100644 --- a/chrome/browser/gtk/task_manager_gtk.cc +++ b/chrome/browser/gtk/task_manager_gtk.cc @@ -18,6 +18,7 @@ #include "base/auto_reset.h" #include "base/command_line.h" #include "base/logging.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" #include "chrome/browser/gtk/gtk_theme_provider.h" diff --git a/chrome/browser/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc index 0614140..dcfed7f 100644 --- a/chrome/browser/login_prompt_gtk.cc +++ b/chrome/browser/login_prompt_gtk.cc @@ -7,6 +7,7 @@ #include <gtk/gtk.h> #include "app/l10n_util.h" +#include "base/utf_string_conversions.h" #include "chrome/browser/chrome_thread.h" #include "chrome/browser/gtk/constrained_window_gtk.h" #include "chrome/browser/gtk/gtk_util.h" |