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

Issue 2747693003: Add missing include guards in Cocoa code. (Closed)

Created:
3 years, 9 months ago by dominickn
Modified:
3 years, 9 months ago
Reviewers:
tapted
CC:
chromium-reviews, asanka, tfarina, dbeam+watch-downloads_chromium.org, jshin+watch_chromium.org, mac-reviews_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add missing include guards in Cocoa code. This CL adds the usual Chromium include guard to Cocoa files which are missing it. It also moves comments in some files to ensure that the guard is consistently placed as the first lines after the initial license text in each header. The files were found by running the following shell script: find chrome/browser/ui/cocoa/ -name "*.h" -print0 | xargs -n1 -0 awk ' \ BEGIN { \ toprint = 0; \ } { \ if ($0 ~ /^.ifndef/) { \ toprint = 1; \ exit 0; \ } else if (NR == 5) { \ exit 0; \ } \ } END { \ if (toprint == 0) { \ print FILENAME; \ } \ }' BUG=700604 Review-Url: https://codereview.chromium.org/2747693003 Cr-Commit-Position: refs/heads/master@{#456628} Committed: https://chromium.googlesource.com/chromium/src/+/81c5524dfe7a67cb4fc12026ffc9e5f87b13167d

Patch Set 1 #

Total comments: 4

Patch Set 2 : Fix nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -55 lines) Patch
M chrome/browser/ui/cocoa/base_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h View 2 chunks +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_hover_state.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_view.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h View 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_button.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h View 2 chunks +14 lines, -15 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_menu_cocoa_controller.h View 2 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h View 2 chunks +12 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/bubble_combobox.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/bubble_view.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/content_setting_bubble_cocoa.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/cookie_details.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/cookie_details_view_controller.h View 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/content_settings/cookie_tree_node.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/custom_frame_view.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/dock_icon.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_button.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_item_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_shelf_context_menu_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_shelf_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/download/download_show_all_button.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/external_protocol_dialog.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/find_bar/find_bar_cocoa_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/find_bar/find_bar_text_field.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/find_bar/find_bar_text_field_cell.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/first_run_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/fullscreen_window.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/history_menu_cocoa_controller.h View 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/info_bubble_window.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/after_translate_infobar_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/before_translate_infobar_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/infobar_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/infobars/translate_message_infobar_controller.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/l10n_util.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/styled_text_field.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/test/styled_text_field_test_helper.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/translate/translate_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/website_settings_bubble_controller.h View 2 chunks +5 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (11 generated)
dominickn
PTAL, thanks!
3 years, 9 months ago (2017-03-14 04:23:11 UTC) #4
tapted
lgtm with the following https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h (right): https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h#newcode13 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h:13: // dragging from moving the ...
3 years, 9 months ago (2017-03-14 04:45:48 UTC) #8
dominickn
Thanks! https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h (right): https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h#newcode13 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h:13: // dragging from moving the browser window. On ...
3 years, 9 months ago (2017-03-14 05:03:12 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/2747693003/20001
3 years, 9 months ago (2017-03-14 05:03:53 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/81c5524dfe7a67cb4fc12026ffc9e5f87b13167d
3 years, 9 months ago (2017-03-14 05:25:47 UTC) #16
tapted
https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h (right): https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h#newcode13 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h:13: // dragging from moving the browser window. On 2017/03/14 ...
3 years, 9 months ago (2017-03-14 05:51:48 UTC) #17
dominickn
3 years, 9 months ago (2017-03-14 05:56:02 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/boo...
File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h (right):

https://codereview.chromium.org/2747693003/diff/1/chrome/browser/ui/cocoa/boo...
chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h:13: // dragging from
moving the browser window.
On 2017/03/14 05:51:47, tapted wrote:
> On 2017/03/14 05:03:12, dominickn wrote:
> > On 2017/03/14 04:45:48, tapted wrote:
> > > move down to above BookmarkBarView
> > 
> > Done.
> 
> you moved it too far ;)
> 
> It doesn't belong above "BookmarkBarView()", but "BookmarkBarView" - just a
> couple of lines down from where it was above a forward-declare for
> BookmarkBarController

Ugh, that's a vision fail. Sending you a follow up to fix.

Powered by Google App Engine
This is Rietveld 408576698