Skip to content

Commit

Permalink
[LSC] Add #include <string> to prepare for removal of base::string16
Browse files Browse the repository at this point in the history
This change adds #include <string> to files currently including
"base/strings/string16.h". This prepares these files for the planned
removal of the base::string16 alias.

In order to adhere to the style guide [1] the following logic was
performed:

* Insert into an existing block of C++ STL includes, if possible
* Else insert `#include <string>` followed by a newline before the first
  #include "some_header.h" line that is not referring to a matching header
  (only relevant for implementation and test files)

[1] https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

Bug: 1184339
Change-Id: I96660fec3fff0192d53e9728bbbae86228a52c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2749296
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Owners-Override: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#861966}
  • Loading branch information
jdoerrie authored and Chromium LUCI CQ committed Mar 11, 2021
1 parent bf9d9c9 commit ad587c3
Show file tree
Hide file tree
Showing 1,361 changed files with 1,995 additions and 0 deletions.
1 change: 1 addition & 0 deletions android_webview/browser/aw_contents.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <limits>
#include <memory>
#include <string>
#include <utility>

#include "android_webview/browser/aw_autofill_client.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/accelerators/accelerator_confirmation_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_ACCELERATORS_ACCELERATOR_CONFIRMATION_DIALOG_H_
#define ASH_ACCELERATORS_ACCELERATOR_CONFIRMATION_DIALOG_H_

#include <string>

#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
Expand Down
1 change: 1 addition & 0 deletions ash/accessibility/accessibility_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <map>
#include <memory>
#include <set>
#include <string>
#include <utility>

#include "ash/accelerators/accelerator_controller_impl.h"
Expand Down
1 change: 1 addition & 0 deletions ash/accessibility/accessibility_controller_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ash/accessibility/accessibility_controller_impl.h"

#include <string>
#include <utility>

#include "ash/accessibility/accessibility_observer.h"
Expand Down
1 change: 1 addition & 0 deletions ash/ambient/ui/media_string_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ash/ambient/ui/media_string_view.h"

#include <memory>
#include <string>

#include "ash/ambient/ambient_constants.h"
#include "ash/ambient/ui/ambient_view_ids.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/ambient/ui/media_string_view_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ash/ambient/ui/media_string_view.h"

#include <string>

#include "ash/ambient/ambient_constants.h"
#include "ash/ambient/test/ambient_ash_test_base.h"
#include "ash/ambient/ui/ambient_container_view.h"
Expand Down
1 change: 1 addition & 0 deletions ash/app_list/app_list_controller_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ash/app_list/app_list_controller_impl.h"

#include <set>
#include <string>

#include "ash/app_list/app_list_metrics.h"
#include "ash/app_list/test/app_list_test_helper.h"
Expand Down
1 change: 1 addition & 0 deletions ash/app_list/model/search/search_box_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_APP_LIST_MODEL_SEARCH_SEARCH_BOX_MODEL_H_

#include <memory>
#include <string>

#include "ash/app_list/model/app_list_model_export.h"
#include "base/macros.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/app_menu/notification_menu_view_test_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_APP_MENU_NOTIFICATION_MENU_VIEW_TEST_API_H_
#define ASH_APP_MENU_NOTIFICATION_MENU_VIEW_TEST_API_H_

#include <string>

#include "base/macros.h"
#include "base/strings/string16.h"

Expand Down
2 changes: 2 additions & 0 deletions ash/child_accounts/parent_access_controller_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ash/child_accounts/parent_access_controller_impl.h"

#include <string>

#include "ash/login/login_screen_controller.h"
#include "ash/session/session_controller_impl.h"
#include "ash/shell.h"
Expand Down
1 change: 1 addition & 0 deletions ash/clipboard/clipboard_history_resource_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_CLIPBOARD_CLIPBOARD_HISTORY_RESOURCE_MANAGER_H_
#define ASH_CLIPBOARD_CLIPBOARD_HISTORY_RESOURCE_MANAGER_H_

#include <string>
#include <vector>

#include "ash/ash_export.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/clipboard/clipboard_history_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_CLIPBOARD_CLIPBOARD_HISTORY_UTIL_H_
#define ASH_CLIPBOARD_CLIPBOARD_HISTORY_UTIL_H_

#include <string>

#include "ash/ash_export.h"
#include "base/optional.h"
#include "base/strings/string16.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ash/detachable_base/detachable_base_notification_controller.h"

#include <memory>
#include <string>
#include <utility>

#include "ash/detachable_base/detachable_base_handler.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/display/display_change_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_DISPLAY_DISPLAY_CHANGE_DIALOG_H_
#define ASH_DISPLAY_DISPLAY_CHANGE_DIALOG_H_

#include <string>

#include "ash/ash_export.h"
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/display/display_error_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_H_
#define ASH_DISPLAY_DISPLAY_ERROR_OBSERVER_H_

#include <string>

#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/display/display_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

#include <stddef.h>

#include <string>

#include "ash/constants/ash_switches.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "ash/session/session_controller_impl.h"
Expand Down
1 change: 1 addition & 0 deletions ash/display/display_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_DISPLAY_DISPLAY_UTIL_H_

#include <memory>
#include <string>

#include "ash/ash_export.h"
#include "base/strings/string16.h"
Expand Down
1 change: 1 addition & 0 deletions ash/drag_drop/tab_drag_drop_delegate_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ash/drag_drop/tab_drag_drop_delegate.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions ash/hud_display/grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_HUD_DISPLAY_GRID_H_
#define ASH_HUD_DISPLAY_GRID_H_

#include <string>

#include "base/strings/string16.h"
#include "ui/views/controls/label.h"
#include "ui/views/view.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/hud_display/hud_settings_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ash/hud_display/hud_settings_view.h"

#include <string>

#include "ash/hud_display/hud_display.h"
#include "ash/hud_display/hud_properties.h"
#include "ash/shell.h"
Expand Down
1 change: 1 addition & 0 deletions ash/hud_display/legend.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_HUD_DISPLAY_LEGEND_H_
#define ASH_HUD_DISPLAY_LEGEND_H_

#include <string>
#include <vector>

#include "base/callback.h"
Expand Down
1 change: 1 addition & 0 deletions ash/hud_display/memory_graph_page_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <numeric>
#include <string>

#include "ash/hud_display/grid.h"
#include "ash/hud_display/hud_constants.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/hud_display/tab_strip.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_HUD_DISPLAY_TAB_STRIP_H_
#define ASH_HUD_DISPLAY_TAB_STRIP_H_

#include <string>

#include "ash/hud_display/hud_constants.h"
#include "base/strings/string16.h"
#include "ui/views/controls/button/label_button.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/ime/ime_mode_indicator_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_IME_IME_MODE_INDICATOR_VIEW_H_
#define ASH_IME_IME_MODE_INDICATOR_VIEW_H_

#include <string>

#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/strings/string16.h"
Expand Down
1 change: 1 addition & 0 deletions ash/login/security_token_request_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "ash/login/security_token_request_controller.h"

#include <string>
#include <utility>

#include "ash/login/ui/pin_request_widget.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/login/ui/access_code_input.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ash/login/ui/access_code_input.h"

#include <string>

#include "ash/public/cpp/login_constants.h"
#include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_provider.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/login/ui/access_code_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_LOGIN_UI_ACCESS_CODE_INPUT_H_
#define ASH_LOGIN_UI_ACCESS_CODE_INPUT_H_

#include <string>

#include "base/optional.h"
#include "base/strings/string16.h"
#include "ui/views/controls/textfield/textfield.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/login/ui/bottom_status_indicator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_LOGIN_UI_BOTTOM_STATUS_INDICATOR_H_
#define ASH_LOGIN_UI_BOTTOM_STATUS_INDICATOR_H_

#include <string>

#include "ash/style/ash_color_provider.h"
#include "base/strings/string16.h"
#include "ui/accessibility/ax_enums.mojom.h"
Expand Down
1 change: 1 addition & 0 deletions ash/login/ui/lock_contents_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <memory>
#include <string>
#include <utility>

#include "ash/accelerators/accelerator_controller_impl.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/login/ui/login_password_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_LOGIN_UI_LOGIN_PASSWORD_VIEW_H_
#define ASH_LOGIN_UI_LOGIN_PASSWORD_VIEW_H_

#include <string>

#include "ash/ash_export.h"
#include "ash/ime/ime_controller_impl.h"
#include "ash/login/ui/animated_rounded_image_view.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/login/ui/login_user_menu_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_LOGIN_UI_LOGIN_USER_MENU_VIEW_H_
#define ASH_LOGIN_UI_LOGIN_USER_MENU_VIEW_H_

#include <string>

#include "ash/ash_export.h"
#include "ash/login/ui/login_base_bubble_view.h"
#include "ash/login/ui/login_button.h"
Expand Down
1 change: 1 addition & 0 deletions ash/public/cpp/accessibility_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_PUBLIC_CPP_ACCESSIBILITY_CONTROLLER_H_
#define ASH_PUBLIC_CPP_ACCESSIBILITY_CONTROLLER_H_

#include <string>
#include <vector>

#include "ash/public/cpp/accelerators.h"
Expand Down
1 change: 1 addition & 0 deletions ash/public/cpp/app_list/app_list_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_PUBLIC_CPP_APP_LIST_APP_LIST_CONTROLLER_H_

#include <memory>
#include <string>

#include "ash/public/cpp/app_list/app_list_types.h"
#include "ash/public/cpp/ash_public_export.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/public/cpp/desks_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_PUBLIC_CPP_DESKS_HELPER_H_
#define ASH_PUBLIC_CPP_DESKS_HELPER_H_

#include <string>

#include "ash/public/cpp/ash_public_export.h"
#include "base/macros.h"
#include "base/strings/string16.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/public/cpp/notifier_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_PUBLIC_CPP_NOTIFIER_METADATA_H_
#define ASH_PUBLIC_CPP_NOTIFIER_METADATA_H_

#include <string>

#include "ash/public/cpp/ash_public_export.h"
#include "base/strings/string16.h"
#include "ui/gfx/image/image_skia.h"
Expand Down
1 change: 1 addition & 0 deletions ash/public/cpp/shelf_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_PUBLIC_CPP_SHELF_ITEM_H_
#define ASH_PUBLIC_CPP_SHELF_ITEM_H_

#include <string>
#include <vector>

#include "ash/public/cpp/ash_public_export.h"
Expand Down
1 change: 1 addition & 0 deletions ash/public/cpp/system_tray_test_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define ASH_PUBLIC_CPP_SYSTEM_TRAY_TEST_API_H_

#include <memory>
#include <string>

#include "ash/ash_export.h"
#include "base/strings/string16.h"
Expand Down
1 change: 1 addition & 0 deletions ash/search_box/search_box_view_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_SEARCH_BOX_SEARCH_BOX_VIEW_BASE_H_
#define ASH_SEARCH_BOX_SEARCH_BOX_VIEW_BASE_H_

#include <string>
#include <vector>

#include "ash/search_box/search_box_constants.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/shelf/login_shelf_gesture_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_SHELF_LOGIN_SHELF_GESTURE_CONTROLLER_H_
#define ASH_SHELF_LOGIN_SHELF_GESTURE_CONTROLLER_H_

#include <string>

#include "ash/ash_export.h"
#include "ash/shelf/drag_handle.h"
#include "base/callback.h"
Expand Down
1 change: 1 addition & 0 deletions ash/shelf/shelf_tooltip_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_SHELF_SHELF_TOOLTIP_DELEGATE_H_
#define ASH_SHELF_SHELF_TOOLTIP_DELEGATE_H_

#include <string>
#include <vector>

#include "ash/ash_export.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/shelf/shelf_tooltip_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include "ash/shelf/shelf_tooltip_manager.h"

#include <string>

#include "ash/constants/ash_switches.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_tooltip_bubble.h"
Expand Down
1 change: 1 addition & 0 deletions ash/shortcut_viewer/keyboard_shortcut_viewer_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_
#define ASH_SHORTCUT_VIEWER_KEYBOARD_SHORTCUT_VIEWER_METADATA_H_

#include <string>
#include <vector>

#include "ash/shortcut_viewer/ksv_export.h"
Expand Down
1 change: 1 addition & 0 deletions ash/shortcut_viewer/views/bubble_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef ASH_SHORTCUT_VIEWER_VIEWS_BUBBLE_VIEW_H_
#define ASH_SHORTCUT_VIEWER_VIEWS_BUBBLE_VIEW_H_

#include <string>
#include <vector>

#include "base/macros.h"
Expand Down
2 changes: 2 additions & 0 deletions ash/shortcut_viewer/views/ksv_search_box_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_SHORTCUT_VIEWER_VIEWS_KSV_SEARCH_BOX_VIEW_H_
#define ASH_SHORTCUT_VIEWER_VIEWS_KSV_SEARCH_BOX_VIEW_H_

#include <string>

#include "ash/search_box/search_box_view_base.h"
#include "base/macros.h"
#include "base/strings/string16.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_SYSTEM_ACCESSIBILITY_ACCESSIBILITY_FEATURE_DISABLE_DIALOG_H_
#define ASH_SYSTEM_ACCESSIBILITY_ACCESSIBILITY_FEATURE_DISABLE_DIALOG_H_

#include <string>

#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
Expand Down
1 change: 1 addition & 0 deletions ash/system/bluetooth/bluetooth_detailed_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ash/system/bluetooth/bluetooth_detailed_view.h"

#include <memory>
#include <string>
#include <unordered_map>
#include <utility>

Expand Down
2 changes: 2 additions & 0 deletions ash/system/bluetooth/bluetooth_feature_pod_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef ASH_SYSTEM_BLUETOOTH_BLUETOOTH_FEATURE_POD_CONTROLLER_H_
#define ASH_SYSTEM_BLUETOOTH_BLUETOOTH_FEATURE_POD_CONTROLLER_H_

#include <string>

#include "ash/system/bluetooth/tray_bluetooth_helper.h"
#include "ash/system/unified/feature_pod_controller_base.h"
#include "base/macros.h"
Expand Down
Loading

0 comments on commit ad587c3

Please sign in to comment.