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

Issue 2665133005: [Omaha] Make the whole pipeline run each time (Closed)

Created:
3 years, 10 months ago by gone
Modified:
3 years, 10 months ago
Reviewers:
nyquist
CC:
chromium-reviews, agrieve+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Omaha] Make the whole pipeline run each time * Instead of making OmahaClient run as an IntentService that handles individual actions, run the whole pipeline, including registering new requests and POSTing to the server. This has several advantages, including that the pipeline is somewhat easier to understand. * The pipeline now uses one single-shot alarm to determine when to either generate a new active user request or to trigger a POST. This requires canceling existing repeating alarms. * Redoes the "isOverude" check in handleRegisterActiveRequest to just check current timestamps instead of also checking that a request doesn't exist. This is more logical for an "isOverdue" check, and prevents the OmahaClient from trying to reschedule itself repeatedly until an existing request's timestamps are screwed up. This should be alright because the request timestamp and the timestamp for the new request should match in all cases where the SharedPrerences are valid. * Introduces the OmahaDelegate, which masks out calls to various classes that OmahaClient requires. * Replaces all old OmahaClientTests that tested the old pipeline with one that is more black-boxy and tests the new pipeline. Significant cleanups are still required here, but the pipeline will be changing further and basic tests are better than no tests. BUG=680817 Review-Url: https://codereview.chromium.org/2665133005 Cr-Commit-Position: refs/heads/master@{#448803} Committed: https://chromium.googlesource.com/chromium/src/+/c9625f069b73578ab45f49be70a830d48f6141bc

Patch Set 1 #

Patch Set 2 : fix compile #

Total comments: 18

Patch Set 3 : Comments #

Total comments: 16

Patch Set 4 : Comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+662 lines, -697 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/omaha/ExponentialBackoffScheduler.java View 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java View 1 2 3 14 chunks +103 lines, -213 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaDelegate.java View 1 2 3 1 chunk +80 lines, -0 lines 0 comments Download
A chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaDelegateImpl.java View 1 chunk +62 lines, -0 lines 0 comments Download
M chrome/android/java_sources.gni View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java View 1 2 3 4 chunks +415 lines, -482 lines 0 comments Download

Messages

Total messages: 34 (22 generated)
gone
So... the change to OmahaClient is large, but a lot of code has been moved ...
3 years, 10 months ago (2017-01-31 21:17:00 UTC) #8
gone
For reference: the next CL is a nearly straightforward move of all the OmahaClient code ...
3 years, 10 months ago (2017-01-31 22:38:37 UTC) #11
nyquist
Sorry, didn't get to the tests yet. https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java File chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java (right): https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java#newcode130 chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java:130: // TODO(dfalcantara): ...
3 years, 10 months ago (2017-02-01 08:29:37 UTC) #14
gone
https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java File chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java (right): https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java#newcode130 chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java:130: // TODO(dfalcantara): Prevent Omaha code from repeatedly rescheduling itself ...
3 years, 10 months ago (2017-02-01 19:16:25 UTC) #15
gone
https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java File chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java (right): https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java#newcode130 chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java:130: // TODO(dfalcantara): Prevent Omaha code from repeatedly rescheduling itself ...
3 years, 10 months ago (2017-02-01 19:16:26 UTC) #16
gone
https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java File chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java (right): https://codereview.chromium.org/2665133005/diff/20001/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java#newcode130 chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaClient.java:130: // TODO(dfalcantara): Prevent Omaha code from repeatedly rescheduling itself ...
3 years, 10 months ago (2017-02-01 19:16:26 UTC) #17
nyquist
https://codereview.chromium.org/2665133005/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java (right): https://codereview.chromium.org/2665133005/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java#newcode57 chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java:57: MockOmahaDelegate(Context context, DeviceType deviceType, boolean installedOnSystemImage) { Pretty plz ...
3 years, 10 months ago (2017-02-07 19:49:26 UTC) #22
gone
ptal https://codereview.chromium.org/2665133005/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java (right): https://codereview.chromium.org/2665133005/diff/40001/chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java#newcode57 chrome/android/javatests/src/org/chromium/chrome/browser/omaha/OmahaClientTest.java:57: MockOmahaDelegate(Context context, DeviceType deviceType, boolean installedOnSystemImage) { On ...
3 years, 10 months ago (2017-02-07 22:20:20 UTC) #25
nyquist
lgtm
3 years, 10 months ago (2017-02-07 23:42:51 UTC) #28
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/2665133005/60001
3 years, 10 months ago (2017-02-07 23:49:09 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/c9625f069b73578ab45f49be70a830d48f6141bc
3 years, 10 months ago (2017-02-07 23:57:07 UTC) #33
nyquist
3 years, 10 months ago (2017-02-08 23:06:11 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #4 id:60001) has been created in
https://codereview.chromium.org/2685053002/ by nyquist@chromium.org.

The reason for reverting is: Causes crashes on startup in some cases..

Powered by Google App Engine
This is Rietveld 408576698