Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed)

Created:
4 years, 4 months ago by Philipp Keck
Modified:
4 years, 4 months ago
Reviewers:
Bernhard Bauer, sky
CC:
chromium-reviews, pam+watch_chromium.org, extensions-reviews_chromium.org, msramek+watch_chromium.org, jam, Matt Giuca, tfarina, browser-components-watch_chromium.org, dbeam+watch-history_chromium.org, dcheng, Patrick Dubroy, grt+watch_chromium.org, rginda+watch_chromium.org, noyau+watch_chromium.org, darin-cc_chromium.org, mlamouri+watch-permissions_chromium.org, chromium-apps-reviews_chromium.org, markusheintz_, James Su, sync-reviews_chromium.org, Avi (use Gerrit)
Base URL:
https://chromium.googlesource.com/chromium/src.git@bookmarks
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use BookmarkModelFactory::GetForBrowserContext everywhere Change all uses of BookmarkModelFactory::GetForProfile[IfExists] to BookmarkModelFactory::GetForBrowserContext[IfExists]. Remove BookmarkModelFactory::GetForProfile and ::GetForProfileIfExists. TBR=dbeam@chromium.org BUG=None Committed: https://crrev.com/3e0d5c99fed719adaa0c129b73c35faf57e28ad2 Cr-Commit-Position: refs/heads/master@{#410320}

Patch Set 1 #

Patch Set 2 : Eliminate Profile::FromBrowserContext in some places #

Total comments: 2

Patch Set 3 : Change NULL to nullptr #

Patch Set 4 : Rebase and more includes #

Patch Set 5 : Replace in .mm files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+336 lines, -322 lines) Patch
M chrome/browser/android/bookmarks/bookmark_bridge.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/bookmarks/partner_bookmarks_shim_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/history_report/history_report_jni_bridge.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/omnibox/autocomplete_controller_android.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/provider/chrome_browser_provider.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/signin/signin_manager_android.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/app_controller_mac_browsertest.mm View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/autocomplete/chrome_autocomplete_provider_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/in_memory_url_index_factory.cc View 1 chunk +7 lines, -7 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_html_writer.cc View 1 2 3 3 chunks +12 lines, -8 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_html_writer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_model_factory.h View 1 2 2 chunks +2 lines, -9 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_model_factory.cc View 1 chunk +4 lines, -16 lines 0 comments Download
M chrome/browser/bookmarks/managed_bookmark_service_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_commands_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browsing_data/browsing_data_remover_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc View 1 12 chunks +22 lines, -13 lines 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmarks_api.cc View 11 chunks +18 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/declarative_content/declarative_content_apitest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/declarative_content/declarative_content_is_bookmarked_condition_tracker.cc View 1 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/declarative_content/declarative_content_is_bookmarked_condition_tracker_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/lazy_background_page_apitest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/favicon/favicon_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/android/android_history_provider_service_unittest.cc View 1 2 4 chunks +4 lines, -8 lines 0 comments Download
M chrome/browser/history/android/android_provider_backend_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/history/android/bookmark_model_sql_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/android/bookmark_model_sql_handler_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/history/android/sqlite_cursor_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/history_service_factory.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/importer/external_process_importer_host.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/importer/profile_writer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/importer/profile_writer_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ntp_snippets/content_suggestions_service_factory.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_manager_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_statistics_aggregator.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/safe_browsing/incident_reporting/last_download_finder_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/storage/durable_storage_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/storage/durable_storage_permission_context.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/sync/chrome_sync_client.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/sync/test/integration/bookmarks_helper.cc View 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/sync/test/integration/sync_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/app_list/search/omnibox_result.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_drag_drop.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_tab_helper.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_utils.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_commands.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/applescript/bookmark_applescript_utils_unittest.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/applescript/bookmark_node_applescript.mm View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/applescript/browsercrapplication+applescript.mm View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_all_tabs_controller_unittest.mm View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge_unittest.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm View 1 2 3 4 34 chunks +36 lines, -35 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm View 1 2 3 4 21 chunks +25 lines, -22 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view_unittest.mm View 1 2 3 4 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa_unittest.mm View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm View 1 2 3 4 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_drag_drop_cocoa.mm View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller_unittest.mm View 1 2 3 4 7 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_controller_unittest.mm View 1 2 3 4 8 chunks +14 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target_unittest.mm View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller_unittest.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa_unittest.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller_unittest.mm View 1 2 3 4 6 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/cocoa_profile_test.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/view_id_util_browsertest.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/omnibox/chrome_omnibox_client.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/omnibox/omnibox_view_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/sync/profile_signin_confirmation_helper.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/sync/profile_signin_confirmation_helper_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc View 6 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc View 6 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_drag_drop_views.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_delegate_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/app_menu.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/browsing_history_handler.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/omnibox/omnibox_page_handler.cc View 2 chunks +3 lines, -1 line 0 comments Download
M chrome/test/base/testing_profile.cc View 1 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 28 (14 generated)
Philipp Keck
PTAL. Previous discussion in https://codereview.chromium.org/2184263005/diff/40001/chrome/browser/ui/tab_helpers.cc#newcode230 and https://codereview.chromium.org/2200113002/diff/120001/chrome/browser/bookmarks/bookmark_model_factory.h#newcode27 For review, please pay attention to the following ...
4 years, 4 months ago (2016-08-04 17:45:19 UTC) #3
Philipp Keck
bauerb@chromium.org: Please review changes in chrome/browser/ui/webui/browsing_history_handler.cc
4 years, 4 months ago (2016-08-04 17:49:28 UTC) #5
sky
LGTM https://codereview.chromium.org/2216713002/diff/20001/chrome/browser/history/android/android_history_provider_service_unittest.cc File chrome/browser/history/android/android_history_provider_service_unittest.cc (right): https://codereview.chromium.org/2216713002/diff/20001/chrome/browser/history/android/android_history_provider_service_unittest.cc#newcode69 chrome/browser/history/android/android_history_provider_service_unittest.cc:69: testing_profile_ = NULL; If you're going to change ...
4 years, 4 months ago (2016-08-04 20:09:13 UTC) #6
sky
And thanks for the cleanup!
4 years, 4 months ago (2016-08-04 20:15:55 UTC) #7
Philipp Keck
https://codereview.chromium.org/2216713002/diff/20001/chrome/browser/history/android/android_history_provider_service_unittest.cc File chrome/browser/history/android/android_history_provider_service_unittest.cc (right): https://codereview.chromium.org/2216713002/diff/20001/chrome/browser/history/android/android_history_provider_service_unittest.cc#newcode69 chrome/browser/history/android/android_history_provider_service_unittest.cc:69: testing_profile_ = NULL; On 2016/08/04 20:09:13, sky wrote: > ...
4 years, 4 months ago (2016-08-05 07:57:17 UTC) #8
Bernhard Bauer
lgtm
4 years, 4 months ago (2016-08-05 08:49:44 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2216713002/40001
4 years, 4 months ago (2016-08-05 12:19:26 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/241967) linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 4 months ago (2016-08-05 12:30:33 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2216713002/60001
4 years, 4 months ago (2016-08-05 12:53:51 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/272427)
4 years, 4 months ago (2016-08-05 13:22:01 UTC) #20
Philipp Keck
On 2016/08/05 13:22:01, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 4 months ago (2016-08-08 08:13:48 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2216713002/80001
4 years, 4 months ago (2016-08-08 08:14:21 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-08 09:07:48 UTC) #26
commit-bot: I haz the power
4 years, 4 months ago (2016-08-08 09:09:58 UTC) #28
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/3e0d5c99fed719adaa0c129b73c35faf57e28ad2
Cr-Commit-Position: refs/heads/master@{#410320}

Powered by Google App Engine
This is Rietveld 408576698