|
|
Re-write many calls to WrapUnique() with MakeUnique()
A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to
MakeUnique<Foo>(...). See the thread at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k
for background.
To avoid requiring too many manual fixups, the change skips some cases that are
frequently problematic. In particular, in methods named Foo::Method() it will
not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because
Foo::Method() may be accessing an internal constructor of Foo.
Cases where MakeUnique<NestedClass>(...) is called within a method of
OuterClass are common but hard to detect automatically, so have been fixed-up
manually.
The only types of manual fix ups applied are:
1) Revert MakeUnique back to WrapUnique
2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL
correctly)
3) Add base:: namespace qualifier where missing.
WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might
change behaviour if Foo does not have a user-defined constructor. For example,
WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>()
creates an integer initialised to 0.
git cl format has been been run over the CL. Spot-checking has uncovered no
cases of mis-formatting.
BUG= 637812
Committed: https://crrev.com/34f9699d9be6dd32931c9e694f61b3022346f4e5
Cr-Commit-Position: refs/heads/master@{#415600}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+140 lines, -149 lines) |
Patch |
 |
M |
chrome/browser/ui/android/infobars/autofill_save_card_infobar.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/android/infobars/confirm_infobar.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/android/infobars/generated_password_saved_infobar.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/android/infobars/save_password_infobar.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/android/infobars/simple_confirm_infobar_builder.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/android/infobars/translate_infobar.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/app_list_syncable_service_factory.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/arc/arc_app_model_builder.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/extension_app_model_builder.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/launcher_page_event_dispatcher.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/search/launcher_search/launcher_search_icon_image_loader_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/search/search_controller_factory.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/search/search_resource_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/app_list/test/fast_show_pickler_unittest.cc
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/app_list/app_list_service_ash.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/ash/system_tray_delegate_chromeos.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/autofill/chrome_autofill_client.cc
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/browser_window_state.cc
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/extensions/extension_view_mac.mm
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/cocoa/website_settings/permission_prompt_impl_views_mac.mm
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/content_settings/content_setting_image_model.cc
|
View
|
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/extensions/extension_enable_flow.cc
|
View
|
|
1 chunk |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/omnibox/chrome_omnibox_client.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/omnibox/omnibox_controller_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
|
View
|
|
3 chunks |
+5 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/passwords/password_manager_presenter.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/startup/default_browser_infobar_delegate_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/sync/one_click_signin_sync_starter_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/tabs/pinned_tab_service_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/toolbar/recent_tabs_sub_menu_model_unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
|
View
|
|
4 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/certificate_selector_browsertest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/download/download_item_view_md.cc
|
View
|
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/dropdown_bar_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/find_bar_view.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/frame/test_with_browser_view.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/infobars/alternate_nav_infobar_view.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/infobars/confirm_infobar.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/infobars/infobar_view.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/sync/one_click_signin_dialog_view_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options/certificate_manager_browsertest.cc
|
View
|
1
2
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options/home_page_overlay_handler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options/preferences_browsertest.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/options/startup_pages_handler.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/policy_ui_browsertest.cc
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/policy_ui_handler.cc
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/print_preview/extension_printer_handler_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/settings/certificates_handler.cc
|
View
|
1
2
3
4
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/settings/chromeos/easy_unlock_settings_handler_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/settings/metrics_reporting_handler_unittest.cc
|
View
|
1
2
|
3 chunks |
+5 lines, -9 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/settings/search_engines_handler.cc
|
View
|
|
3 chunks |
+3 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/sync_internals_message_handler.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 54 (31 generated)
|