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

Issue 2873193002: Make update over cellular an option for user (Closed)

Created:
3 years, 7 months ago by weidongg
Modified:
3 years, 7 months ago
Reviewers:
xiyuan, stevenjb
CC:
chromium-reviews, extensions-reviews_chromium.org, alemate+watch_chromium.org, asvitkine+watch_chromium.org, hashimoto+watch_chromium.org, michaelpg+watch-md-settings_chromium.org, achuith+watch_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, davemoore+watch_chromium.org, afakhry
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make update over cellular an option for user - What is changed in update engine of Chrome OS? A new state NEED_PERMISSION_TO_UPDATE will be broadcasted to Chrome UI When update aborts due to cellular connection. A new dbus interface SetUpdateOverCellularTarget() is added to set update target (version and size) in preferences maintained by update engine. - What is the target in SetUpdateOverCellularTarget()? When update engine broadcast NEED_PERMISSION_TO_UPDATE, it also broadcasts the metadata of this update such as version and size. We call this target. Once user grants the permission to proceed update over cellular, we call SetUpdateOverCellularTarget() to send the target back to Chrome OS. - Why do we need to send the target back to update engine? There's a corner: When NEED_PERMISSION_TO_UPDATE is broadcasted to chrome UI, an update warning dialog will show the update size to user and ask whether to proceed. If user just keep the dialog window long enough until there's a new update available. Then clicking 'Continue' will result in a much larger download as the update engine only download the lastest update. This rarely happens, but it's more user friendly to consider this case. We send this target back to update engine to make it check with the server. If the target matches the latest update on the server, then update proceeds. Otherwise, update engine needs to broadcast NEED_PERMISSION_TO_UPDATE again with the latest update metadata. - Design doc: go/cros-cellular-updates - Related chromium CL: https://codereview.chromium.org/2881473002/ - Dependent on chromeos CL: https://chromium-review.googlesource.com/#/c/479467/ https://chromium-review.googlesource.com/#/c/481102/ BUG=chromium:691108 TEST=None CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2873193002 Cr-Commit-Position: refs/heads/master@{#471639} Committed: https://chromium.googlesource.com/chromium/src/+/f472642fd6c20b63b0f1a2f62564f2aad56f4be3

Patch Set 1 #

Total comments: 16

Patch Set 2 : Move update engine related code to another CL #

Total comments: 16

Patch Set 3 : Make update over cellular an option for user #

Total comments: 28

Patch Set 4 : Bad patch set, please ignore #

Patch Set 5 : Apply fix to patch set 3 #

Total comments: 2

Patch Set 6 : Apply fix to patch set 5 #

Total comments: 3

Patch Set 7 : Run callback when SetUpdateOverCellularTarget fails #

Patch Set 8 : Apply fix to trybot errors #

Patch Set 9 : Put code in CHROME_OS wrapper to fix trybot error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -38 lines) Patch
M chrome/browser/resources/settings/about_page/about_page.html View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/about_page/about_page.js View 1 2 3 4 5 6 chunks +29 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/about_page/about_page_browser_proxy.js View 1 2 3 4 5 6 7 5 chunks +28 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/about_page/update_warning_dialog.js View 1 2 2 chunks +19 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/help/help_handler.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/help/help_handler.cc View 1 2 3 4 5 6 7 2 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/help/version_updater.h View 1 2 3 4 5 6 7 3 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/help/version_updater_basic.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/help/version_updater_chromeos.h View 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/help/version_updater_chromeos.cc View 1 2 3 4 5 6 7 9 chunks +42 lines, -11 lines 0 comments Download
M chrome/browser/ui/webui/help/version_updater_chromeos_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/help/version_updater_mac.mm View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/help/version_updater_win.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/settings/about_handler.h View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/settings/about_handler.cc View 1 2 3 4 5 6 7 8 6 chunks +35 lines, -2 lines 0 comments Download

Messages

Total messages: 47 (24 generated)
weidongg
Please review the CL, the os-side CL is https://chromium-review.googlesource.com/#/c/479467/
3 years, 7 months ago (2017-05-10 21:11:19 UTC) #3
weidongg
pkasting@chromium.org: Please review the CL. It is dependent on os-side CL: https://chromium-review.googlesource.com/#/c/479467/
3 years, 7 months ago (2017-05-10 21:12:58 UTC) #5
Peter Kasting
It looks like this should have been sent to a different reviewer. The only files ...
3 years, 7 months ago (2017-05-10 21:48:29 UTC) #6
weidongg
3 years, 7 months ago (2017-05-10 21:51:33 UTC) #8
weidongg
3 years, 7 months ago (2017-05-10 21:54:54 UTC) #10
stevenjb
Could you separate the WebUI changes from the update_engine_client.cc related changes into a separate CL? ...
3 years, 7 months ago (2017-05-10 23:29:05 UTC) #11
weidongg
https://codereview.chromium.org/2873193002/diff/1/chrome/browser/resources/settings/about_page/about_page.js File chrome/browser/resources/settings/about_page/about_page.js (right): https://codereview.chromium.org/2873193002/diff/1/chrome/browser/resources/settings/about_page/about_page.js#newcode177 chrome/browser/resources/settings/about_page/about_page.js:177: dialog.setUpdateWarningMessage(event.version, event.size); On 2017/05/10 23:29:05, stevenjb wrote: > This ...
3 years, 7 months ago (2017-05-11 16:34:06 UTC) #13
stevenjb
https://codereview.chromium.org/2873193002/diff/1/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js File chrome/browser/resources/settings/about_page/about_page_browser_proxy.js (right): https://codereview.chromium.org/2873193002/diff/1/chrome/browser/resources/settings/about_page/about_page_browser_proxy.js#newcode219 chrome/browser/resources/settings/about_page/about_page_browser_proxy.js:219: }, On 2017/05/11 16:34:05, weidongg wrote: > On 2017/05/10 ...
3 years, 7 months ago (2017-05-11 17:20:16 UTC) #15
weidongg
Yes we don't change the size or version in the Chrome UI, we simply send ...
3 years, 7 months ago (2017-05-11 18:09:30 UTC) #17
xiyuan
https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html File chrome/browser/resources/settings/about_page/about_page.html (right): https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html#newcode226 chrome/browser/resources/settings/about_page/about_page.html:226: <template is="dom-if" if="[[showUpdateWarningDialog_]]" restamp> Should this block under <if ...
3 years, 7 months ago (2017-05-11 20:37:26 UTC) #18
stevenjb
https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html File chrome/browser/resources/settings/about_page/about_page.html (right): https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html#newcode226 chrome/browser/resources/settings/about_page/about_page.html:226: <template is="dom-if" if="[[showUpdateWarningDialog_]]" restamp> On 2017/05/11 20:37:25, xiyuan wrote: ...
3 years, 7 months ago (2017-05-11 21:03:46 UTC) #19
weidongg
https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html File chrome/browser/resources/settings/about_page/about_page.html (right): https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/resources/settings/about_page/about_page.html#newcode226 chrome/browser/resources/settings/about_page/about_page.html:226: <template is="dom-if" if="[[showUpdateWarningDialog_]]" restamp> On 2017/05/11 20:37:25, xiyuan wrote: ...
3 years, 7 months ago (2017-05-11 23:50:45 UTC) #20
xiyuan
lgtm I update CL description to insert an empty time between subject and body, and ...
3 years, 7 months ago (2017-05-12 17:59:28 UTC) #23
weidongg
Thanks for the review. I update the commit message from |SetUpdateOverCellularTarget| to SetUpdateOverCellularTarget(). https://codereview.chromium.org/2873193002/diff/80001/chrome/browser/resources/settings/about_page/about_page.js File ...
3 years, 7 months ago (2017-05-12 18:17:24 UTC) #26
stevenjb
https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/ui/webui/help/version_updater_chromeos.cc File chrome/browser/ui/webui/help/version_updater_chromeos.cc (right): https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/ui/webui/help/version_updater_chromeos.cc#newcode192 chrome/browser/ui/webui/help/version_updater_chromeos.cc:192: LOG(ERROR) << "Error setting update over cellular target."; On ...
3 years, 7 months ago (2017-05-12 18:28:54 UTC) #27
weidongg
https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/ui/webui/help/version_updater_chromeos.cc File chrome/browser/ui/webui/help/version_updater_chromeos.cc (right): https://codereview.chromium.org/2873193002/diff/40001/chrome/browser/ui/webui/help/version_updater_chromeos.cc#newcode192 chrome/browser/ui/webui/help/version_updater_chromeos.cc:192: LOG(ERROR) << "Error setting update over cellular target."; On ...
3 years, 7 months ago (2017-05-12 20:31:57 UTC) #28
stevenjb
lgtm as-is or with more explicit handling of the new error case in SetUpdateStatus(). https://codereview.chromium.org/2873193002/diff/100001/chrome/browser/ui/webui/settings/about_handler.cc ...
3 years, 7 months ago (2017-05-12 20:50:16 UTC) #29
weidongg
On 2017/05/12 20:50:16, stevenjb wrote: > lgtm as-is or with more explicit handling of the ...
3 years, 7 months ago (2017-05-12 21:17:30 UTC) #30
stevenjb
On 2017/05/12 21:17:30, weidongg wrote: > On 2017/05/12 20:50:16, stevenjb wrote: > > lgtm as-is ...
3 years, 7 months ago (2017-05-12 21:33:26 UTC) #31
weidongg
On 2017/05/12 21:33:26, stevenjb wrote: > On 2017/05/12 21:17:30, weidongg wrote: > > On 2017/05/12 ...
3 years, 7 months ago (2017-05-12 22:39:19 UTC) #32
stevenjb
still lgtm
3 years, 7 months ago (2017-05-12 22:40:36 UTC) #33
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/2873193002/160001
3 years, 7 months ago (2017-05-14 20:08:30 UTC) #44
commit-bot: I haz the power
3 years, 7 months ago (2017-05-14 22:10:20 UTC) #47
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/f472642fd6c20b63b0f1a2f62564...

Powered by Google App Engine
This is Rietveld 408576698