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

Issue 8135001: Fixed behavior of the bookmark bar visibility. (Closed)

Created:
9 years, 2 months ago by Joao da Silva
Modified:
9 years, 2 months ago
CC:
chromium-reviews, tfarina, arv (Not doing code reviews), estade+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Fixed behavior of the bookmark bar visibility. - Removed the kEnableBookmarkBar preference. This was only used from the policy code, and duplicated what the kShowBookmarkBar preference already does. Removed custom policy code that handle this. - Fixed the pref UI for the kShowBookmarkBar preference, which wasn't working when set to true by the associated policy. Removed custom UI code for this. - Fire NOTIFICATION_BOOKMARK_BAR_VISIBILITY_CHANGED from a single place, and every time that the preference changes. - Made ChromeWebUI::force_bookmark_bar_visible a virtual method instead, so that subclasses can recompute the state dynamically. The previous implementation wouldn't react to pref changes on existing NTPs. Current behavior of the bookmark bar: - If kShowBookmarkBar is true, it is shown as part of the tab; - If kShowBookmarkBar is false, it is shown inline IF the policy is not set, AND - using the old NTP, OR - using the new NTP without bookmark features. The policy forces the bar to be always visible in all tabs, or to never appear at all. BUG=98918 TEST=The BookmarkBarEnabled policy does what it's supposed to do in the old NTP, new NTP, and new NTP with bookmarks. The show-bookmark-bar shortcut also does the right thing in all versions. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104827

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reviewed, rebased #

Total comments: 6

Patch Set 3 : Removed NOTIFICATION_BOOKMARK_BAR_VISIBILITY_PREF_CHANGED #

Patch Set 4 : Fix mac build #

Total comments: 2

Patch Set 5 : Reviewed ui/cocoa, rebased #

Patch Set 6 : Rebased #

Patch Set 7 : Rebased #

Total comments: 2

Patch Set 8 : Reviewed, rebased #

Total comments: 1

Patch Set 9 : DCHECK_EQ instead of DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -203 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_context_menu_controller.h View 2 chunks +7 lines, -6 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_context_menu_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/bookmarks/bookmark_model.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_utils.cc View 2 chunks +0 lines, -9 lines 0 comments Download
M chrome/browser/importer/profile_writer.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/importer/profile_writer.cc View 2 chunks +2 lines, -5 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store.cc View 4 chunks +2 lines, -20 lines 0 comments Download
M chrome/browser/policy/configuration_policy_pref_store_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prefs/pref_model_associator.h View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/prefs/pref_model_associator.cc View 1 2 3 4 5 6 3 chunks +0 lines, -16 lines 0 comments Download
M chrome/browser/resources/options/browser_options.js View 1 2 3 4 5 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/ui/bookmarks/bookmark_tab_helper.cc View 1 2 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 8 chunks +7 lines, -18 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 3 chunks +9 lines, -10 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/ui/gtk/global_menu_bar.h View 1 2 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/ui/gtk/global_menu_bar.cc View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -21 lines 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_context_menu_controller_views.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/chrome_web_ui.h View 1 2 2 chunks +3 lines, -12 lines 0 comments Download
M chrome/browser/ui/webui/chrome_web_ui.cc View 1 2 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.h View 1 2 3 chunks +8 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/new_tab_ui.cc View 1 2 3 4 5 chunks +24 lines, -21 lines 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.h View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_resource_cache.cc View 1 2 3 4 5 6 2 chunks +0 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.h View 1 2 3 4 5 3 chunks +12 lines, -14 lines 0 comments Download
M chrome/browser/ui/webui/options/browser_options_handler.cc View 1 2 3 4 5 4 chunks +0 lines, -13 lines 0 comments Download
M chrome/common/chrome_notification_types.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
Joao da Silva
Please review, thanks! @sky: main review; mostly bookmarks/ and ui/ changes @jhawkins: options UI changes ...
9 years, 2 months ago (2011-10-04 14:29:23 UTC) #1
pastarmovj
Policy part: LGTM.
9 years, 2 months ago (2011-10-04 14:40:21 UTC) #2
Mattias Nissler (ping if slow)
LGTM, thanks for cleaning this up!
9 years, 2 months ago (2011-10-04 14:49:34 UTC) #3
Miranda Callahan
On 2011/10/04 14:49:34, Mattias Nissler wrote: > LGTM, thanks for cleaning this up! importer LGTM!
9 years, 2 months ago (2011-10-04 15:17:30 UTC) #4
James Hawkins
WebUI lgtm
9 years, 2 months ago (2011-10-04 20:50:33 UTC) #5
Evan Stade
lgtm http://codereview.chromium.org/8135001/diff/1/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): http://codereview.chromium.org/8135001/diff/1/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode295 chrome/browser/ui/webui/ntp/new_tab_ui.cc:295: !prefs->IsManagedPreference(prefs::kShowBookmarkBar) && only 4 spaces http://codereview.chromium.org/8135001/diff/1/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode316 chrome/browser/ui/webui/ntp/new_tab_ui.cc:316: if ...
9 years, 2 months ago (2011-10-04 21:10:38 UTC) #6
Joao da Silva
Thanks for reviewing! Waiting for @sky's review. http://codereview.chromium.org/8135001/diff/1/chrome/browser/ui/webui/ntp/new_tab_ui.cc File chrome/browser/ui/webui/ntp/new_tab_ui.cc (right): http://codereview.chromium.org/8135001/diff/1/chrome/browser/ui/webui/ntp/new_tab_ui.cc#newcode295 chrome/browser/ui/webui/ntp/new_tab_ui.cc:295: !prefs->IsManagedPreference(prefs::kShowBookmarkBar) && ...
9 years, 2 months ago (2011-10-05 14:31:25 UTC) #7
sky
http://codereview.chromium.org/8135001/diff/6002/chrome/browser/bookmarks/bookmark_model.cc File chrome/browser/bookmarks/bookmark_model.cc (right): http://codereview.chromium.org/8135001/diff/6002/chrome/browser/bookmarks/bookmark_model.cc#newcode798 chrome/browser/bookmarks/bookmark_model.cc:798: case chrome::NOTIFICATION_PREF_CHANGED: { In theory there need not be ...
9 years, 2 months ago (2011-10-05 16:59:11 UTC) #8
Joao da Silva
@sky: thanks for the review, see replies inline. Please have another look. @estade: thanks for ...
9 years, 2 months ago (2011-10-06 19:45:37 UTC) #9
Mark Mentovai
If Miranda’s already familiar with this change, she’s competent to review the bits in chrome/browser/ui/cocoa.
9 years, 2 months ago (2011-10-06 20:04:07 UTC) #10
Miranda Callahan
importer and browser/ui/cocoa stuff LGTM with DCHECK change. http://codereview.chromium.org/8135001/diff/15004/chrome/browser/ui/cocoa/browser_window_cocoa.mm File chrome/browser/ui/cocoa/browser_window_cocoa.mm (right): http://codereview.chromium.org/8135001/diff/15004/chrome/browser/ui/cocoa/browser_window_cocoa.mm#newcode562 chrome/browser/ui/cocoa/browser_window_cocoa.mm:562: if ...
9 years, 2 months ago (2011-10-06 21:10:21 UTC) #11
sky
LGTM Thanks!
9 years, 2 months ago (2011-10-06 22:27:18 UTC) #12
Joao da Silva
Addressed Miranda's comment. Thanks all for reviewing! Waiting for an owner approval to the changes ...
9 years, 2 months ago (2011-10-07 09:12:31 UTC) #13
Evan Stade
http://codereview.chromium.org/8135001/diff/27001/chrome/browser/ui/gtk/global_menu_bar.cc File chrome/browser/ui/gtk/global_menu_bar.cc (right): http://codereview.chromium.org/8135001/diff/27001/chrome/browser/ui/gtk/global_menu_bar.cc#newcode314 chrome/browser/ui/gtk/global_menu_bar.cc:314: if (type == chrome::NOTIFICATION_PREF_CHANGED) { I prefer DCHECKs to ...
9 years, 2 months ago (2011-10-10 21:33:15 UTC) #14
Joao da Silva
http://codereview.chromium.org/8135001/diff/27001/chrome/browser/ui/gtk/global_menu_bar.cc File chrome/browser/ui/gtk/global_menu_bar.cc (right): http://codereview.chromium.org/8135001/diff/27001/chrome/browser/ui/gtk/global_menu_bar.cc#newcode314 chrome/browser/ui/gtk/global_menu_bar.cc:314: if (type == chrome::NOTIFICATION_PREF_CHANGED) { On 2011/10/10 21:33:15, Evan ...
9 years, 2 months ago (2011-10-10 21:44:27 UTC) #15
Evan Stade
lgtm with dcheck_eq change http://codereview.chromium.org/8135001/diff/30002/chrome/browser/ui/gtk/global_menu_bar.cc File chrome/browser/ui/gtk/global_menu_bar.cc (right): http://codereview.chromium.org/8135001/diff/30002/chrome/browser/ui/gtk/global_menu_bar.cc#newcode314 chrome/browser/ui/gtk/global_menu_bar.cc:314: DCHECK(type == chrome::NOTIFICATION_PREF_CHANGED); DCHECK_EQ
9 years, 2 months ago (2011-10-10 21:47:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/8135001/30003
9 years, 2 months ago (2011-10-10 22:16:22 UTC) #17
commit-bot: I haz the power
9 years, 2 months ago (2011-10-11 00:35:02 UTC) #18
Change committed as 104827

Powered by Google App Engine
This is Rietveld 408576698