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

Issue 306293006: Introduce ChromeBookmarkClientFactory (Closed)

Created:
6 years, 6 months ago by sdefresne
Modified:
6 years, 5 months ago
CC:
chromium-reviews, haitaol+watch_chromium.org, tfarina, maniscalco+watch_chromium.org, browser-components-watch_chromium.org, tim+watch_chromium.org, Joao da Silva
Base URL:
https://chromium.googlesource.com/chromium/src.git@364865
Visibility:
Public.

Description

Introduce ChromeBookmarkClientFactory Fix BookmarkModelFactory to really build a BookmarkModel object and introduce another factory ChromeBookmarkClientFactory to build the ChromeBookmarkClient and manage the correct dependency between the two objects. Change BookmarkModelFactory::GetChromeBookmarkClientForProfile and clients to instead use ChromeBookmarkClientFactory::GetForProfile. BUG=364865 TBR=asargent,pavely,shess,pkasting,phajdan.jr

Patch Set 1 #

Total comments: 13

Patch Set 2 : Fix #includes #

Total comments: 4

Patch Set 3 : Rebase & remove BookmarkModelFactory::GetChromeBookmarkClientForProfile #

Patch Set 4 : Fix //chrome/browser/ui/views #

Patch Set 5 : Rebase, remove BookmarkModelFactory::GetChromeBookmarkClientForProfile and fix unit tests #

Total comments: 9

Patch Set 6 : Address nits and fix clang-format bugs #

Patch Set 7 : Rebase & fix bug #

Patch Set 8 : Add missing dependency in components/policy/policy_browser.gypi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+364 lines, -221 lines) Patch
M chrome/browser/bookmarks/bookmark_model_factory.h View 1 2 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_model_factory.cc View 1 2 3 4 chunks +22 lines, -25 lines 0 comments Download
M chrome/browser/bookmarks/chrome_bookmark_client.h View 1 2 3 4 4 chunks +11 lines, -14 lines 0 comments Download
M chrome/browser/bookmarks/chrome_bookmark_client.cc View 1 2 3 4 5 chunks +27 lines, -18 lines 0 comments Download
A chrome/browser/bookmarks/chrome_bookmark_client_factory.h View 1 chunk +41 lines, -0 lines 0 comments Download
A chrome/browser/bookmarks/chrome_bookmark_client_factory.cc View 1 2 3 4 1 chunk +46 lines, -0 lines 0 comments Download
M chrome/browser/bookmarks/chrome_bookmark_client_unittest.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_api.cc View 1 2 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/bookmark_manager_private/bookmark_manager_private_apitest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_api_helpers_unittest.cc View 1 2 4 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmark_apitest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmarks_api.h View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/bookmarks/bookmarks_api.cc View 1 2 3 4 4 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc View 1 2 3 4 3 chunks +28 lines, -22 lines 0 comments Download
M chrome/browser/sync/profile_sync_service_bookmark_unittest.cc View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm View 1 2 3 4 3 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h View 1 2 3 4 5 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm View 1 2 3 4 9 chunks +11 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm View 1 2 3 4 4 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.mm View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 3 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.h View 1 2 3 4 4 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc View 1 2 3 4 5 6 29 chunks +52 lines, -50 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/base/testing_profile.cc View 1 2 3 4 3 chunks +21 lines, -12 lines 0 comments Download
M components/bookmarks.gypi View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/bookmarks/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M components/bookmarks/browser/bookmark_client.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_model.h View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download
M components/policy/policy_browser.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
sdefresne
Please take a look. This is based on https://codereview.chromium.org/306143003/ that has been sent to the ...
6 years, 6 months ago (2014-06-04 15:55:20 UTC) #1
tfarina
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/chrome_bookmark_client.h File chrome/browser/bookmarks/chrome_bookmark_client.h (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/chrome_bookmark_client.h#newcode8 chrome/browser/bookmarks/chrome_bookmark_client.h:8: #include "base/compiler_specific.h" can you include macros.h instead? https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/chrome_bookmark_client.h#newcode11 chrome/browser/bookmarks/chrome_bookmark_client.h:11: ...
6 years, 6 months ago (2014-06-04 16:02:56 UTC) #2
tfarina
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h File chrome/browser/bookmarks/bookmark_model_factory.h (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h#newcode11 chrome/browser/bookmarks/bookmark_model_factory.h:11: template <typename T> why this change? could you revert ...
6 years, 6 months ago (2014-06-04 16:04:01 UTC) #3
sdefresne
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h File chrome/browser/bookmarks/bookmark_model_factory.h (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h#newcode11 chrome/browser/bookmarks/bookmark_model_factory.h:11: template <typename T> On 2014/06/04 16:04:02, tfarina wrote: > ...
6 years, 6 months ago (2014-06-04 16:08:48 UTC) #4
tfarina
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc File chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc#newcode123 chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc:123: BookmarkModelFactory::GetInstance()->SetTestingFactoryAndUse( This code is now almost the same as ...
6 years, 6 months ago (2014-06-04 16:09:18 UTC) #5
tfarina
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h File chrome/browser/bookmarks/bookmark_model_factory.h (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h#newcode11 chrome/browser/bookmarks/bookmark_model_factory.h:11: template <typename T> On 2014/06/04 16:08:48, sdefresne wrote: > ...
6 years, 6 months ago (2014-06-04 16:14:24 UTC) #6
blundell
LGTM I like this design better; let's definitely keep using this pattern going forward when ...
6 years, 6 months ago (2014-06-05 09:48:30 UTC) #7
sdefresne
https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h File chrome/browser/bookmarks/bookmark_model_factory.h (right): https://codereview.chromium.org/306293006/diff/20001/chrome/browser/bookmarks/bookmark_model_factory.h#newcode11 chrome/browser/bookmarks/bookmark_model_factory.h:11: template <typename T> On 2014/06/04 16:14:25, tfarina wrote: > ...
6 years, 6 months ago (2014-06-10 13:12:21 UTC) #8
sdefresne
The CL has quite changed after the rebase due to recent changes to ChromeBookmarkClient. Can ...
6 years, 6 months ago (2014-06-10 13:13:31 UTC) #9
blundell
SLGTM
6 years, 6 months ago (2014-06-10 14:29:57 UTC) #10
sdefresne
+joaodasilva FYI TBR-ing OWNERS of refactored code (using the correct interface instead of BookmarkModelFactory::GetChromeBookmarkClientForProfile). TBR=asargent ...
6 years, 6 months ago (2014-06-11 17:13:59 UTC) #11
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 17:23:59 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/140001
6 years, 6 months ago (2014-06-11 17:25:34 UTC) #13
Scott Hess - ex-Googler
lgtm for cocoa/ https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h (right): https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h#newcode28 chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h:28: const BookmarkNode* node_; // weak Pick ...
6 years, 6 months ago (2014-06-11 18:31:11 UTC) #14
Peter Kasting
LGTM https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc File chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (right): https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc#newcode921 chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc:921: : model_->bookmark_bar_node(); Nit: Please don't change the previous ...
6 years, 6 months ago (2014-06-11 18:35:13 UTC) #15
asargent_no_longer_on_chrome
extensions part lgtm
6 years, 6 months ago (2014-06-11 18:52:17 UTC) #16
pavely
//chrome/browser/sync lgtm
6 years, 6 months ago (2014-06-11 19:40:28 UTC) #17
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_compile_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 20:31:06 UTC) #18
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 20:35:26 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/27919) win_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_rel/builds/26078)
6 years, 6 months ago (2014-06-11 20:35:27 UTC) #20
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-11 20:37:32 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/140001
6 years, 6 months ago (2014-06-11 20:40:42 UTC) #22
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_compile_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 21:04:02 UTC) #23
sdefresne
https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h (right): https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h#newcode28 chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h:28: const BookmarkNode* node_; // weak On 2014/06/11 18:31:11, shess ...
6 years, 6 months ago (2014-06-11 21:05:46 UTC) #24
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 21:05:56 UTC) #25
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/27944)
6 years, 6 months ago (2014-06-11 21:07:59 UTC) #26
sdefresne
The CQ bit was unchecked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 21:08:25 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/160001
6 years, 6 months ago (2014-06-11 21:08:30 UTC) #28
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 21:08:35 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/160001
6 years, 6 months ago (2014-06-11 21:11:51 UTC) #30
sdefresne
The CQ bit was unchecked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 21:46:04 UTC) #31
sdefresne
https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc File chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc (right): https://codereview.chromium.org/306293006/diff/140001/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc#newcode1341 chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc:1341: client_ = ChromeBookmarkClientFactory::GetForProfile(browser_->profile()); On 2014/06/11 21:05:46, sdefresne wrote: > ...
6 years, 6 months ago (2014-06-11 21:49:39 UTC) #32
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 22:02:20 UTC) #33
sdefresne
The CQ bit was checked by sdefresne@chromium.org
6 years, 6 months ago (2014-06-11 22:02:29 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/180001
6 years, 6 months ago (2014-06-11 22:04:44 UTC) #35
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 23:17:05 UTC) #36
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 23:18:30 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/15766) win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/18898)
6 years, 6 months ago (2014-06-11 23:18:32 UTC) #38
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-12 05:26:55 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/180001
6 years, 6 months ago (2014-06-12 05:29:41 UTC) #40
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: ios_dbg_simulator on tryserver.chromium ...
6 years, 6 months ago (2014-06-12 09:48:29 UTC) #41
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-12 12:01:48 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_compile_dbg/builds/28277)
6 years, 6 months ago (2014-06-12 12:01:50 UTC) #43
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-13 15:00:36 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sdefresne@chromium.org/306293006/200001
6 years, 6 months ago (2014-06-13 15:01:47 UTC) #45
Joao da Silva
The CQ bit was unchecked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-13 17:06:21 UTC) #46
tfarina
Closing this. João landed it in https://codereview.chromium.org/330343002/ - crrev.com/277138
6 years, 6 months ago (2014-06-14 18:18:16 UTC) #47
Paweł Hajdan Jr.
6 years, 5 months ago (2014-07-25 14:25:29 UTC) #48
Message was sent while issue was closed.
chrome/test LGTM

Powered by Google App Engine
This is Rietveld 408576698