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

Issue 1980033002: [NTP Snippets] Clear the snippets when the user signs out (Closed)

Created:
4 years, 7 months ago by dgn
Modified:
4 years, 7 months ago
CC:
chromium-reviews, dgn+watch_chromium.org, mcwilliams+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Snippets] Clear the snippets when the user signs out Adds an onSnippetsCleared method to the SnippetsObserver interface, that gets called when the service wants the snippets to be cleared. (= when no suggestion hosts are returned.) Also makes the NewTabPageAdapter stop unregistering its observer when it received satisfying data for the first time. Instead it uses a boolean to know whether it should refresh the displayed snippets or not. BUG=608913 Committed: https://crrev.com/cbea852c300a928cf29668e0d17e7f27ea596904 Cr-Commit-Position: refs/heads/master@{#394123}

Patch Set 1 #

Total comments: 6

Patch Set 2 : fix and add test, address comments #

Total comments: 2

Patch Set 3 : fix double we #

Total comments: 1

Messages

Total messages: 15 (5 generated)
dgn
PTAL
4 years, 7 months ago (2016-05-16 13:03:57 UTC) #2
Bernhard Bauer
JUnit tests seem to be failing. https://codereview.chromium.org/1980033002/diff/1/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 (right): https://codereview.chromium.org/1980033002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#newcode42 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java:42: private boolean mIsExpectingSnippets; ...
4 years, 7 months ago (2016-05-17 09:12:48 UTC) #3
dgn
PTAL https://codereview.chromium.org/1980033002/diff/1/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 (right): https://codereview.chromium.org/1980033002/diff/1/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java#newcode42 chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/NewTabPageAdapter.java:42: private boolean mIsExpectingSnippets; On 2016/05/17 09:12:48, Bernhard Bauer ...
4 years, 7 months ago (2016-05-17 10:46:01 UTC) #4
Bernhard Bauer
lgtm https://codereview.chromium.org/1980033002/diff/20001/chrome/browser/android/ntp/ntp_snippets_bridge.cc File chrome/browser/android/ntp/ntp_snippets_bridge.cc (right): https://codereview.chromium.org/1980033002/diff/20001/chrome/browser/android/ntp/ntp_snippets_bridge.cc#newcode172 chrome/browser/android/ntp/ntp_snippets_bridge.cc:172: // The user signed out or disabled sync. ...
4 years, 7 months ago (2016-05-17 12:24:40 UTC) #5
dgn
Thanks :) https://codereview.chromium.org/1980033002/diff/20001/chrome/browser/android/ntp/ntp_snippets_bridge.cc File chrome/browser/android/ntp/ntp_snippets_bridge.cc (right): https://codereview.chromium.org/1980033002/diff/20001/chrome/browser/android/ntp/ntp_snippets_bridge.cc#newcode172 chrome/browser/android/ntp/ntp_snippets_bridge.cc:172: // The user signed out or disabled ...
4 years, 7 months ago (2016-05-17 13:18:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1980033002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1980033002/40001
4 years, 7 months ago (2016-05-17 13:18:54 UTC) #9
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-05-17 14:38:50 UTC) #10
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/cbea852c300a928cf29668e0d17e7f27ea596904 Cr-Commit-Position: refs/heads/master@{#394123}
4 years, 7 months ago (2016-05-17 14:41:06 UTC) #12
Marc Treib
https://codereview.chromium.org/1980033002/diff/40001/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/1980033002/diff/40001/components/ntp_snippets/ntp_snippets_service.cc#newcode334 components/ntp_snippets/ntp_snippets_service.cc:334: if (hosts.empty()) { Post-commit drive-by comment: After https://codereview.chromium.org/1922083004/ and ...
4 years, 7 months ago (2016-05-17 14:57:17 UTC) #14
jkrcal
4 years, 7 months ago (2016-05-17 15:11:11 UTC) #15
Message was sent while issue was closed.
On 2016/05/17 14:57:17, Marc Treib wrote:
>
https://codereview.chromium.org/1980033002/diff/40001/components/ntp_snippets...
> File components/ntp_snippets/ntp_snippets_service.cc (right):
> 
>
https://codereview.chromium.org/1980033002/diff/40001/components/ntp_snippets...
> components/ntp_snippets/ntp_snippets_service.cc:334: if (hosts.empty()) {
> Post-commit drive-by comment: After
https://codereview.chromium.org/1922083004/
> and https://codereview.chromium.org/1974483002/, we now support fetching
without
> host restrictions, so this might not be the best place to send the "cleared"
> event.
> (Relatedly, this method is also broken now, since it filters by hosts even if
> host restriction is turned off.)

I am addressing the related comment in
https://codereview.chromium.org/1986173003/.

Powered by Google App Engine
This is Rietveld 408576698