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

Issue 2061803002: 📰 The Status card reports disabled sync states (Closed)

Created:
4 years, 6 months ago by dgn
Modified:
4 years, 5 months ago
CC:
chromium-reviews, zine-eng+reviews_google.com, Patrick Nepper, markusheintz_
Base URL:
https://chromium.googlesource.com/chromium/src.git@simplifyBridge
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Snippets] The Status card reports disabled sync states When there are no snippets to display, the Status card now shows an appropriate message and action for the following contexts: - User is signed out - User has disabled sync - User has disabled history sync - User has set a custom passphrase The detection of those states is done by the newly added NTPSnippetsStatusService. Preview: https://goo.gl/photos/gpDA8g6Mm2jW56e87 BUG=612508 Committed: https://crrev.com/bea29e22d8b64035f822e48b120691e751108539 Cr-Commit-Position: refs/heads/master@{#402537}

Patch Set 1 #

Patch Set 2 : [NTP Snippets] The Status card reports disabled sync states #

Total comments: 13

Patch Set 3 : Address comment, support other disabled reasons #

Total comments: 4

Patch Set 4 : Address comments, small changes for clarity #

Total comments: 1

Patch Set 5 : fix compilation #

Patch Set 6 : fix compilation returns #

Patch Set 7 : fix compilation: origins #

Total comments: 6

Patch Set 8 : Address comments #

Total comments: 8

Patch Set 9 : Refactor out status detection, update tests. #

Total comments: 23

Patch Set 10 : address comments #

Patch Set 11 : yolo: another big bag of changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+827 lines, -276 lines) Patch
M chrome/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/android/java/res/layout/new_tab_page_status_card.xml View 1 2 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageView.java View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java View 1 2 3 7 chunks +28 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java View 1 2 3 4 5 6 7 8 1 chunk +160 lines, -5 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java View 1 2 4 chunks +10 lines, -4 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/SignInPreference.java View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/signin/AccountSigninActivity.java View 1 2 3 3 chunks +21 lines, -1 line 0 comments Download
M chrome/android/java/strings/android_chrome_strings.grd View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapterTest.java View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.h View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/android/ntp/ntp_snippets_bridge.cc View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/ntp_snippets/ntp_snippets_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/snippets_internals_message_handler.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/OWNERS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/components_strings.grd View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M components/ntp_snippets.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/ntp_snippets/BUILD.gn View 1 2 3 4 5 6 7 8 9 5 chunks +21 lines, -0 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_fetcher.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service.h View 1 2 3 4 5 6 7 8 9 10 chunks +24 lines, -42 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service.cc View 1 2 3 4 5 6 7 8 9 chunks +36 lines, -85 lines 0 comments Download
M components/ntp_snippets/ntp_snippets_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 chunks +40 lines, -102 lines 0 comments Download
A components/ntp_snippets/ntp_snippets_status_service.h View 1 2 3 4 5 6 7 8 1 chunk +82 lines, -0 lines 0 comments Download
A components/ntp_snippets/ntp_snippets_status_service.cc View 1 2 3 4 5 6 7 8 9 1 chunk +80 lines, -0 lines 0 comments Download
A components/ntp_snippets/ntp_snippets_status_service_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +70 lines, -0 lines 0 comments Download
A components/ntp_snippets/ntp_snippets_test_utils.h View 1 2 3 4 5 6 7 8 9 1 chunk +68 lines, -0 lines 0 comments Download
A components/ntp_snippets/ntp_snippets_test_utils.cc View 1 2 3 4 5 6 7 8 9 1 chunk +74 lines, -0 lines 0 comments Download
A components/ntp_snippets_strings.grdp View 1 2 3 4 5 6 7 8 9 1 chunk +28 lines, -0 lines 0 comments Download
M ios/chrome/browser/ntp_snippets/ios_chrome_ntp_snippets_service_factory.cc View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 50 (20 generated)
dgn
PTAL https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java (left): https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#oldcode136 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java:136: loadSnippets(listSnippets); I chose to reload the list of ...
4 years, 6 months ago (2016-06-13 17:27:15 UTC) #5
dgn
Actually, a bunch of states need to be handled: custom passphrase, sync/history sync, sign in.. ...
4 years, 6 months ago (2016-06-13 18:46:14 UTC) #6
Bernhard Bauer
https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode30 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:30: private StatusListItem mListItem; Do you actually need this as ...
4 years, 6 months ago (2016-06-14 12:10:40 UTC) #7
dgn
PTAL https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode30 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:30: private StatusListItem mListItem; On 2016/06/14 12:10:40, Bernhard Bauer ...
4 years, 6 months ago (2016-06-15 16:46:29 UTC) #8
dgn
Updated the preview link with a video.
4 years, 6 months ago (2016-06-15 16:57:19 UTC) #10
Bernhard Bauer
lgtm https://codereview.chromium.org/2061803002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode91 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:91: if (!SigninManager.get(context).isSignInAllowed()) { We should probably at some ...
4 years, 6 months ago (2016-06-15 17:08:56 UTC) #11
dgn
Thanks! https://codereview.chromium.org/2061803002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/40001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode91 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:91: if (!SigninManager.get(context).isSignInAllowed()) { On 2016/06/15 17:08:56, Bernhard Bauer ...
4 years, 6 months ago (2016-06-15 17:45:59 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2061803002/60001
4 years, 6 months ago (2016-06-15 17:47:15 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/21446) ios-device-gn on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 6 months ago (2016-06-15 17:56:04 UTC) #17
dgn
noyau@: PTAL at the changes to /ios Looking into tests issues with the signin manager.
4 years, 6 months ago (2016-06-15 22:38:47 UTC) #19
dgn
PTAL
4 years, 6 months ago (2016-06-16 13:25:27 UTC) #20
Bernhard Bauer
https://codereview.chromium.org/2061803002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode165 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:165: // So let's just use HistorySyncDisabled as fallback. If ...
4 years, 6 months ago (2016-06-16 14:03:36 UTC) #21
dgn
PTAL https://codereview.chromium.org/2061803002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java File chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java (right): https://codereview.chromium.org/2061803002/diff/120001/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java#newcode165 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/StatusListItem.java:165: // So let's just use HistorySyncDisabled as fallback. ...
4 years, 6 months ago (2016-06-16 14:34:10 UTC) #22
Bernhard Bauer
LGTM++
4 years, 6 months ago (2016-06-16 16:23:55 UTC) #23
dgn
Friendly PTAL ping http://media.giphy.com/media/Z5y6DoZycMgXS/giphy.gif
4 years, 6 months ago (2016-06-20 11:27:34 UTC) #24
noyau (Ping after 24h)
https://codereview.chromium.org/2061803002/diff/140001/chrome/android/java/strings/android_chrome_strings.grd File chrome/android/java/strings/android_chrome_strings.grd (right): https://codereview.chromium.org/2061803002/diff/140001/chrome/android/java/strings/android_chrome_strings.grd#newcode1932 chrome/android/java/strings/android_chrome_strings.grd:1932: </message> Can you move those strings to components/ instead? ...
4 years, 6 months ago (2016-06-21 14:28:55 UTC) #25
dgn
https://codereview.chromium.org/2061803002/diff/140001/components/ntp_snippets/ntp_snippets_service.h File components/ntp_snippets/ntp_snippets_service.h (right): https://codereview.chromium.org/2061803002/diff/140001/components/ntp_snippets/ntp_snippets_service.h#newcode54 components/ntp_snippets/ntp_snippets_service.h:54: // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp.snippets On 2016/06/21 14:28:55, noyau wrote: > ...
4 years, 6 months ago (2016-06-21 15:47:40 UTC) #26
dgn
sdefresne@chromium.org: Please review changes in components/: I added a grd file for the ntp_snippets component, ...
4 years, 6 months ago (2016-06-24 20:04:30 UTC) #29
dgn
https://codereview.chromium.org/2061803002/diff/140001/chrome/android/java/strings/android_chrome_strings.grd File chrome/android/java/strings/android_chrome_strings.grd (right): https://codereview.chromium.org/2061803002/diff/140001/chrome/android/java/strings/android_chrome_strings.grd#newcode1932 chrome/android/java/strings/android_chrome_strings.grd:1932: </message> On 2016/06/21 14:28:55, noyau wrote: > Can you ...
4 years, 6 months ago (2016-06-24 20:25:20 UTC) #32
sdefresne
It looks like those strings are not yet used. Am I right? components/ lgtm
4 years, 5 months ago (2016-06-27 12:23:26 UTC) #33
dgn
On 2016/06/27 12:23:26, sdefresne wrote: > It looks like those strings are not yet used. ...
4 years, 5 months ago (2016-06-27 16:11:47 UTC) #34
noyau (Ping after 24h)
lgtm https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h File components/ntp_snippets/ntp_snippets_service.h (right): https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h#newcode234 components/ntp_snippets/ntp_snippets_service.h:234: void UpdateStateForStatus(DisabledReason disabled_reason); Needs a comment.
4 years, 5 months ago (2016-06-28 13:20:25 UTC) #35
Bernhard Bauer
https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h File components/ntp_snippets/ntp_snippets_service.h (right): https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h#newcode310 components/ntp_snippets/ntp_snippets_service.h:310: // Sent when the state of the service is ...
4 years, 5 months ago (2016-06-28 13:47:39 UTC) #36
markusheintz_
https://codereview.chromium.org/2061803002/diff/140001/components/ntp_snippets/ntp_snippets_service.h File components/ntp_snippets/ntp_snippets_service.h (right): https://codereview.chromium.org/2061803002/diff/140001/components/ntp_snippets/ntp_snippets_service.h#newcode65 components/ntp_snippets/ntp_snippets_service.h:65: PASSPHRASE_ENCRYPTION_ENABLED, On 2016/06/24 20:25:20, dgn wrote: > On 2016/06/21 ...
4 years, 5 months ago (2016-06-28 14:22:53 UTC) #38
dgn
PTAL https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h File components/ntp_snippets/ntp_snippets_service.h (right): https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_service.h#newcode234 components/ntp_snippets/ntp_snippets_service.h:234: void UpdateStateForStatus(DisabledReason disabled_reason); On 2016/06/28 13:20:25, noyau wrote: ...
4 years, 5 months ago (2016-06-28 16:38:57 UTC) #39
Bernhard Bauer
LGTM! https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_status_service.cc File components/ntp_snippets/ntp_snippets_status_service.cc (right): https://codereview.chromium.org/2061803002/diff/200001/components/ntp_snippets/ntp_snippets_status_service.cc#newcode24 components/ntp_snippets/ntp_snippets_status_service.cc:24: sync_service_observer_.Remove(sync_service_); On 2016/06/28 16:38:57, dgn wrote: > On ...
4 years, 5 months ago (2016-06-28 16:47:25 UTC) #40
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/2061803002/240001
4 years, 5 months ago (2016-06-28 17:10:19 UTC) #43
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/2061803002/240001
4 years, 5 months ago (2016-06-28 17:45:10 UTC) #46
commit-bot: I haz the power
Committed patchset #11 (id:240001)
4 years, 5 months ago (2016-06-28 20:39:38 UTC) #48
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 20:41:45 UTC) #50
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/bea29e22d8b64035f822e48b120691e751108539
Cr-Commit-Position: refs/heads/master@{#402537}

Powered by Google App Engine
This is Rietveld 408576698