|
|
DescriptionWhen the cases of the switch returns same value then we should use
the fall through to optimize and reduce line of code.
BUG=544094
Committed: https://crrev.com/39d97acb5f9ba0edf8a1602253efec66b8da4bbc
Cr-Commit-Position: refs/heads/master@{#355007}
Patch Set 1 #Patch Set 2 : #
Total comments: 6
Patch Set 3 : #
Total comments: 2
Patch Set 4 : Addressing nit. #Messages
Total messages: 17 (4 generated)
deepak.m1@samsung.com changed reviewers: + ajith.v@chromium.org
PTAL
peer review looks good to me!
deepak.m1@samsung.com changed reviewers: + markusheintz@chromium.org
@markusheintz PTAL Thanks
deepak.m1@samsung.com changed reviewers: + bauerb@chromium.org
@Bernhard PTAL
https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... File chrome/browser/browsing_data/cookies_tree_model.cc (right): https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:138: case CookieTreeNode::DetailedInfo::TYPE_DATABASE: // fall through Same as below: Let's replace these comments with a single comment before the block, and group them by type rather than by their numeric value. https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:1028: case CookieTreeNode::DetailedInfo::TYPE_DATABASE: // fall through Let's remove these comments; maybe add one before this block that says that we fall through for each type below. https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:1037: case CookieTreeNode::DetailedInfo::TYPE_CHANNEL_ID: Can we group this together with the COOKIE one above, and the DATABASE ones below with the ones above?
PTAL https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... File chrome/browser/browsing_data/cookies_tree_model.cc (right): https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:138: case CookieTreeNode::DetailedInfo::TYPE_DATABASE: // fall through On 2015/10/19 13:17:54, Bernhard Bauer wrote: > Same as below: Let's replace these comments with a single comment before the > block, and group them by type rather than by their numeric value. Done. https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:1028: case CookieTreeNode::DetailedInfo::TYPE_DATABASE: // fall through On 2015/10/19 13:17:54, Bernhard Bauer wrote: > Let's remove these comments; maybe add one before this block that says that we > fall through for each type below. Done. https://codereview.chromium.org/1408063003/diff/20001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:1037: case CookieTreeNode::DetailedInfo::TYPE_CHANNEL_ID: On 2015/10/19 13:17:54, Bernhard Bauer wrote: > Can we group this together with the COOKIE one above, and the DATABASE ones > below with the ones above? Done.
https://codereview.chromium.org/1408063003/diff/40001/chrome/browser/browsing... File chrome/browser/browsing_data/cookies_tree_model.cc (right): https://codereview.chromium.org/1408063003/diff/40001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:136: // Fall through each below cases to return true. Leave an empty line before each comment to increase readability, please.
@Bernhard PTAL https://codereview.chromium.org/1408063003/diff/40001/chrome/browser/browsing... File chrome/browser/browsing_data/cookies_tree_model.cc (right): https://codereview.chromium.org/1408063003/diff/40001/chrome/browser/browsing... chrome/browser/browsing_data/cookies_tree_model.cc:136: // Fall through each below cases to return true. On 2015/10/19 15:27:44, Bernhard Bauer wrote: > Leave an empty line before each comment to increase readability, please. Done. But just after the switch statement and before comment empty line get removed by "git cl format".
LGTM, thanks!
On 2015/10/20 08:09:44, Bernhard Bauer wrote: > LGTM, thanks! Thanks Bernhard.
The CQ bit was checked by deepak.m1@samsung.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408063003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408063003/60001
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/39d97acb5f9ba0edf8a1602253efec66b8da4bbc Cr-Commit-Position: refs/heads/master@{#355007} |