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

Issue 2031893002: [Android] Add support for Partner bookmarks to Chrome bookmark widget (Closed)

Created:
4 years, 6 months ago by Ian Wen
Modified:
4 years, 6 months ago
Reviewers:
Ted C, gone
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Add support for Partner bookmarks to Chrome bookmark widget Before this CL, the current folder of the widget is stored as a long in the shared preferences. Now it will be stored as a String that can be serialized directly into a BookmarkId object. The advantage of storing strings is that it carries sufficient info about whether a bookmark is a partner bookmark. BUG=613171 Committed: https://crrev.com/41dd21f931b7f87a57e97efe7d9930316ad7310a Cr-Commit-Position: refs/heads/master@{#397539}

Patch Set 1 #

Patch Set 2 : rename preference #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -27 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java View 1 2 3 8 chunks +14 lines, -28 lines 1 comment Download
A + chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/OWNERS View 1 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
Ian Wen
PTAL this change about bookmark widget. Thanks! :)
4 years, 6 months ago (2016-06-01 23:47:56 UTC) #2
Ian Wen
Talked to TPM and he wished to land this tomorrow and merge to M51.
4 years, 6 months ago (2016-06-02 20:23:54 UTC) #4
Ian Wen
renamed.
4 years, 6 months ago (2016-06-02 20:37:02 UTC) #5
Ian Wen
Done
4 years, 6 months ago (2016-06-02 20:54:26 UTC) #6
gone
lgtm
4 years, 6 months ago (2016-06-02 21:04:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2031893002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2031893002/60001
4 years, 6 months ago (2016-06-02 21:19:14 UTC) #10
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-02 23:27:05 UTC) #11
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/41dd21f931b7f87a57e97efe7d9930316ad7310a Cr-Commit-Position: refs/heads/master@{#397539}
4 years, 6 months ago (2016-06-02 23:28:45 UTC) #13
Ted C
https://codereview.chromium.org/2031893002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java File chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java (right): https://codereview.chromium.org/2031893002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java#newcode65 chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java:65: private static final String PREF_CURRENT_FOLDER = "bookmarkswidget.current_folder"; has this ...
4 years, 6 months ago (2016-06-03 03:16:39 UTC) #14
gone
On 2016/06/03 03:16:39, Ted C wrote: > https://codereview.chromium.org/2031893002/diff/60001/chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java > File > chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java > (right): > ...
4 years, 6 months ago (2016-06-03 17:11:27 UTC) #15
Ted C
4 years, 6 months ago (2016-06-03 17:15:29 UTC) #16
Message was sent while issue was closed.
On 2016/06/03 17:11:27, dfalcantara wrote:
> On 2016/06/03 03:16:39, Ted C wrote:
> >
>
https://codereview.chromium.org/2031893002/diff/60001/chrome/android/java/src...
> > File
> >
>
chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java
> > (right):
> > 
> >
>
https://codereview.chromium.org/2031893002/diff/60001/chrome/android/java/src...
> >
>
chrome/android/java/src/org/chromium/chrome/browser/bookmarkswidget/BookmarkWidgetService.java:65:
> > private static final String PREF_CURRENT_FOLDER =
> > "bookmarkswidget.current_folder";
> > has this pref ever changed?  did it change when we switched over to the new
> > widget design? 
> > 
> > if the pref didn't change then, it would be sad to have this be the change
> that
> > causes users of this widget to lose their folder state.
> > 
> > I'm wondering if we should change the places where we were getting the
> previous
> > "current_folder" and first attempt to get the new one as a string and if
it's
> > null fall back to getting the old one as a long.
> 
> Trying to pull the wrong type out of the same named preference results in a
> ClassCastException:
>
https://developer.android.com/reference/android/content/SharedPreferences.htm...,
> java.lang.String)
> 
> Don't know if that's something you want to try catch over.

Oh, I'm saying that we keep the renamed pref.  But in the event it is null,
we pull from the old one as a Long and create a NORMAL BookmarkId out of
it (like it was doing before).

Powered by Google App Engine
This is Rietveld 408576698