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

Issue 2367533003: Always add bookmarks to the mobile node on Android (Closed)

Created:
4 years, 3 months ago by kraush
Modified:
4 years, 2 months ago
Reviewers:
Ian Wen, sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Always add bookmarks to the mobile node on Android bookmark_utils should always attach new bookmarks to the mobile node on Android, rather than the most recently used one. This is where the bookmark button already appends them to, and it will make sure all added bookmarks are visible. BUG=649420 Committed: https://crrev.com/c4a5b95f057d9b29ee066225b43c89557b5c2691 Cr-Commit-Position: refs/heads/master@{#424751}

Patch Set 1 #

Patch Set 2 : Refactored GetParentForNewNodes into bookmark_utils #

Total comments: 4

Patch Set 3 : Fixed comment and new empty check #

Total comments: 6

Patch Set 4 : Simplified check, removed curly braces and moved to anonymous namespace #

Patch Set 5 : Put new method into ifdef #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -19 lines) Patch
M chrome/browser/ui/bookmarks/bookmark_utils_desktop.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M components/bookmarks/browser/bookmark_model.h View 1 1 chunk +0 lines, -4 lines 0 comments Download
M components/bookmarks/browser/bookmark_model.cc View 1 1 chunk +0 lines, -7 lines 0 comments Download
M components/bookmarks/browser/bookmark_model_unittest.cc View 1 1 chunk +23 lines, -6 lines 0 comments Download
M components/bookmarks/browser/bookmark_utils.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M components/bookmarks/browser/bookmark_utils.cc View 1 2 3 4 3 chunks +27 lines, -1 line 1 comment Download

Messages

Total messages: 45 (13 generated)
kraush
Hi sky, Can you take a look at this small API change for bookmarks on ...
4 years, 3 months ago (2016-09-22 18:28:29 UTC) #2
sky
It seems reasonable to me to default to the mobile node on android when there ...
4 years, 2 months ago (2016-09-30 15:56:38 UTC) #3
kraush
On 2016/09/30 15:56:38, sky wrote: > It seems reasonable to me to default to the ...
4 years, 2 months ago (2016-09-30 16:04:08 UTC) #4
sky
I suggest checking for an empty model (discounting the permanent nodes) and if empty than ...
4 years, 2 months ago (2016-09-30 16:56:19 UTC) #5
kraush
On 2016/09/30 16:56:19, sky wrote: > I suggest checking for an empty model (discounting the ...
4 years, 2 months ago (2016-09-30 17:58:58 UTC) #6
sky
In looking at the code a bit more I don't think GetParentForNewNodes() should be part ...
4 years, 2 months ago (2016-09-30 18:08:02 UTC) #7
kraush
On 2016/09/30 18:08:02, sky wrote: > In looking at the code a bit more I ...
4 years, 2 months ago (2016-09-30 18:26:49 UTC) #8
kraush
Hi Scott, I have refactored GetParentForNewNodes into BookmarkUtils as you suggested. Also adjusted existing tests ...
4 years, 2 months ago (2016-10-03 21:55:38 UTC) #9
kraush
On 2016/10/03 21:55:38, kraush wrote: > Hi Scott, > > I have refactored GetParentForNewNodes into ...
4 years, 2 months ago (2016-10-03 21:58:55 UTC) #14
sky
https://codereview.chromium.org/2367533003/diff/20001/components/bookmarks/browser/bookmark_utils.cc File components/bookmarks/browser/bookmark_utils.cc (right): https://codereview.chromium.org/2367533003/diff/20001/components/bookmarks/browser/bookmark_utils.cc#newcode579 components/bookmarks/browser/bookmark_utils.cc:579: if (nodes[0] == model->bookmark_bar_node() && nodes[0]->child_count() == 0) { ...
4 years, 2 months ago (2016-10-10 21:02:25 UTC) #15
kraush
https://codereview.chromium.org/2367533003/diff/20001/components/bookmarks/browser/bookmark_utils.cc File components/bookmarks/browser/bookmark_utils.cc (right): https://codereview.chromium.org/2367533003/diff/20001/components/bookmarks/browser/bookmark_utils.cc#newcode579 components/bookmarks/browser/bookmark_utils.cc:579: if (nodes[0] == model->bookmark_bar_node() && nodes[0]->child_count() == 0) { ...
4 years, 2 months ago (2016-10-10 22:18:05 UTC) #16
kraush
Fixed the comment as requested and implemented the check for Android as an "No permanent ...
4 years, 2 months ago (2016-10-11 14:55:12 UTC) #17
sky
https://codereview.chromium.org/2367533003/diff/40001/components/bookmarks/browser/bookmark_utils.cc File components/bookmarks/browser/bookmark_utils.cc (right): https://codereview.chromium.org/2367533003/diff/40001/components/bookmarks/browser/bookmark_utils.cc#newcode572 components/bookmarks/browser/bookmark_utils.cc:572: bool HasUserCreatedBookmarks(BookmarkModel* model) { Move this to anonymous namespace. ...
4 years, 2 months ago (2016-10-11 19:13:39 UTC) #18
kraush
https://codereview.chromium.org/2367533003/diff/40001/components/bookmarks/browser/bookmark_utils.cc File components/bookmarks/browser/bookmark_utils.cc (right): https://codereview.chromium.org/2367533003/diff/40001/components/bookmarks/browser/bookmark_utils.cc#newcode572 components/bookmarks/browser/bookmark_utils.cc:572: bool HasUserCreatedBookmarks(BookmarkModel* model) { On 2016/10/11 19:13:39, sky wrote: ...
4 years, 2 months ago (2016-10-11 21:22:39 UTC) #19
kraush
Removed curly braces, moved to anonymous namespace and simplified check.
4 years, 2 months ago (2016-10-11 23:42:20 UTC) #20
sky
LGTM - thanks!
4 years, 2 months ago (2016-10-12 00:01:28 UTC) #21
kraush
On 2016/10/12 00:01:28, sky wrote: > LGTM - thanks! On 2016/10/12 00:01:28, sky wrote: > ...
4 years, 2 months ago (2016-10-12 00:04:08 UTC) #24
kraush
On 2016/10/12 00:04:08, kraush wrote: > On 2016/10/12 00:01:28, sky wrote: > > LGTM - ...
4 years, 2 months ago (2016-10-12 14:38:17 UTC) #25
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/2367533003/60001
4 years, 2 months ago (2016-10-12 14:38:27 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/215234)
4 years, 2 months ago (2016-10-12 14:58:08 UTC) #29
kraush
On 2016/10/12 14:58:08, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 2 months ago (2016-10-12 15:05:00 UTC) #30
kraush
Wrapped into ifdef. Should work this time.
4 years, 2 months ago (2016-10-12 15:10:20 UTC) #31
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/2367533003/80001
4 years, 2 months ago (2016-10-12 15:10:53 UTC) #34
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-12 15:57:21 UTC) #35
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/c4a5b95f057d9b29ee066225b43c89557b5c2691 Cr-Commit-Position: refs/heads/master@{#424751}
4 years, 2 months ago (2016-10-12 16:00:01 UTC) #37
Ian Wen
https://codereview.chromium.org/2367533003/diff/80001/components/bookmarks/browser/bookmark_utils.cc File components/bookmarks/browser/bookmark_utils.cc (right): https://codereview.chromium.org/2367533003/diff/80001/components/bookmarks/browser/bookmark_utils.cc#newcode589 components/bookmarks/browser/bookmark_utils.cc:589: if (!HasUserCreatedBookmarks(model)) This is a bit confusing because even ...
4 years, 2 months ago (2016-10-12 17:40:06 UTC) #39
sky
On 2016/10/12 17:40:06, Ian Wen wrote: > https://codereview.chromium.org/2367533003/diff/80001/components/bookmarks/browser/bookmark_utils.cc > File components/bookmarks/browser/bookmark_utils.cc (right): > > https://codereview.chromium.org/2367533003/diff/80001/components/bookmarks/browser/bookmark_utils.cc#newcode589 ...
4 years, 2 months ago (2016-10-12 19:26:56 UTC) #40
kraush
On 2016/10/12 19:26:56, sky wrote: > On 2016/10/12 17:40:06, Ian Wen wrote: > > > ...
4 years, 2 months ago (2016-10-12 19:42:01 UTC) #41
sky
AddIfNotBookmarked is only used in chrome, so I'm equally ok with moving the code entirely ...
4 years, 2 months ago (2016-10-12 20:17:06 UTC) #42
kraush
On 2016/10/12 20:17:06, sky wrote: > AddIfNotBookmarked is only used in chrome, so I'm equally ...
4 years, 2 months ago (2016-10-12 20:53:24 UTC) #43
sky
Start a new cl for this. On Wed, Oct 12, 2016 at 1:53 PM, kraush@amazon.com ...
4 years, 2 months ago (2016-10-12 21:05:54 UTC) #44
kraush
4 years, 2 months ago (2016-10-12 21:09:17 UTC) #45
Message was sent while issue was closed.
On 2016/10/12 21:05:54, sky wrote:
> Start a new cl for this.
> 

Thanks Scott, will do.

Powered by Google App Engine
This is Rietveld 408576698