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

Issue 2277223002: [NTP Snippets] Safe(r) defaults for background fetching intervals (Closed)

Created:
4 years, 3 months ago by Marc Treib
Modified:
4 years, 3 months ago
Reviewers:
sfiera, tschumann
CC:
chromium-reviews, ntp-dev+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[NTP Snippets] Safe(r) defaults for background fetching intervals BUG=none Committed: https://crrev.com/8e47dfc3ac0fb7394aa781e30b03794e558cc7b5 Cr-Commit-Position: refs/heads/master@{#414407}

Patch Set 1 #

Patch Set 2 : . #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M components/ntp_snippets/ntp_snippets_service.cc View 1 1 chunk +3 lines, -3 lines 3 comments Download

Messages

Total messages: 29 (19 generated)
Marc Treib
PTAL!
4 years, 3 months ago (2016-08-25 11:25:10 UTC) #5
sfiera
LGTM
4 years, 3 months ago (2016-08-25 11:29:43 UTC) #7
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/2277223002/20001
4 years, 3 months ago (2016-08-25 12:26:04 UTC) #19
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-08-25 12:30:06 UTC) #21
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/8e47dfc3ac0fb7394aa781e30b03794e558cc7b5 Cr-Commit-Position: refs/heads/master@{#414407}
4 years, 3 months ago (2016-08-25 12:32:58 UTC) #23
tschumann
good to get these values into a range that scalable ;-) https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): ...
4 years, 3 months ago (2016-08-25 20:28:52 UTC) #25
Marc Treib
https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc#newcode54 components/ntp_snippets/ntp_snippets_service.cc:54: const int kDefaultFetchingIntervalWifiChargingSeconds = 0; On 2016/08/25 20:28:52, tschumann ...
4 years, 3 months ago (2016-08-26 08:24:49 UTC) #26
tschumann
https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc File components/ntp_snippets/ntp_snippets_service.cc (right): https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc#newcode54 components/ntp_snippets/ntp_snippets_service.cc:54: const int kDefaultFetchingIntervalWifiChargingSeconds = 0; On 2016/08/26 08:24:49, Marc ...
4 years, 3 months ago (2016-08-29 12:38:42 UTC) #27
Marc Treib
On 2016/08/29 12:38:42, tschumann wrote: > https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc > File components/ntp_snippets/ntp_snippets_service.cc (right): > > https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets/ntp_snippets_service.cc#newcode54 > ...
4 years, 3 months ago (2016-08-29 12:44:24 UTC) #28
tschumann
4 years, 3 months ago (2016-08-29 12:56:02 UTC) #29
Message was sent while issue was closed.
On 2016/08/29 12:44:24, Marc Treib wrote:
> On 2016/08/29 12:38:42, tschumann wrote:
> >
>
https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets...
> > File components/ntp_snippets/ntp_snippets_service.cc (right):
> > 
> >
>
https://codereview.chromium.org/2277223002/diff/20001/components/ntp_snippets...
> > components/ntp_snippets/ntp_snippets_service.cc:54: const int
> > kDefaultFetchingIntervalWifiChargingSeconds = 0;
> > On 2016/08/26 08:24:49, Marc Treib wrote:
> > > On 2016/08/25 20:28:52, tschumann wrote:
> > > > it would be really good to document this behavior -- how does this
result
> in
> > > > once per day?
> > > > Is there any preference implemented to get it do a request over wifi?
> > > > is a value of zero deactivating the scheduling? (and what are the
> > implications
> > > > on other fetches).
> > > > 
> > > > That aside: this also works when the program got kicked out of memory,
> > right?
> > > 
> > > A value of "0" disables the fetching, correct. That behavior is documented
> on
> > > the NTPSnippetsScheduler interface, though it might make sense to repeat
it
> > here
> > > :)
> > yes, cause when choosing these values you rely on the implementation
details,
> so
> > better document.
> > > 
> > > The "once per day" just comes from
kDefaultFetchingIntervalFallbackSeconds,
> > > which is not zero.
> > > 
> > > All these default values can be overridden via Finch.
> > > 
> > > Yes, this works even when Chrome isn't running. The OS will wake up the
> > device,
> > > start Chrome, and tell it to fetch.
> > 
> > So this means, we don't have a preference to fetch data on wifi-only? 
> > Now that we have the throttler in place, we can set an upper limit of one
> > background fetch per day. And then try fetching via wifi every hour and have
> the
> > 24h fallback in case of no wifi connectivity. WDYT?
> 
> Right now, a successful fetch doesn't reset the 24h fallback. It probably
should
> :)
> Anyway, the point here was just to have hardcoded defaults that won't
completely
> fry our servers, if the Finch config were missing for some reason. This CL
> doesn't take away any functionality, we can still configure everything.

that's true, but if we're assuming the finch config might get screwed up badly,
I wonder if we could guarantee a bit better user experience (e.g. try fetching
over wifi every 12h?). Maybe some logic is actually quite broken here -- let's
sync up offline (I have to run for an interview now I'm available then).

Powered by Google App Engine
This is Rietveld 408576698