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

Issue 2346153002: Save most recent 3 destinations across multiple sessions (Closed)

Created:
4 years, 3 months ago by rbpotter
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, dpapad
CC:
arv+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Save most recent 3 destinations for print across multiple prints and multiple browser sessions. Note: can increase from 3 easily if needed. Add browser test to check behavior. BUG=601858 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/6d799882e49984de8620d41c53893101eaed92f6 Cr-Commit-Position: refs/heads/master@{#420238}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Factor out to helper functions, small fixes #

Total comments: 15

Patch Set 3 : Fix errors, remove commented code #

Total comments: 18

Patch Set 4 : Fix readability and extra checks #

Total comments: 2

Patch Set 5 : Change to array of objects #

Total comments: 10

Patch Set 6 : Fix nits and define object elements #

Patch Set 7 : Add check for bad struct read in #

Unified diffs Side-by-side diffs Delta from patch set Stats (+235 lines, -35 lines) Patch
M chrome/browser/resources/print_preview/data/app_state.js View 1 2 3 4 5 6 8 chunks +144 lines, -24 lines 0 comments Download
M chrome/browser/resources/print_preview/data/destination_store.js View 1 2 3 4 5 2 chunks +40 lines, -9 lines 0 comments Download
M chrome/test/data/webui/print_preview.js View 1 2 3 4 5 1 chunk +51 lines, -2 lines 0 comments Download

Messages

Total messages: 51 (36 generated)
rbpotter
Saving print destinations across browser sessions.
4 years, 3 months ago (2016-09-17 01:11:49 UTC) #6
dpapad
https://codereview.chromium.org/2346153002/diff/1/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2346153002/diff/1/chrome/browser/resources/print_preview/data/app_state.js#newcode21 chrome/browser/resources/print_preview/data/app_state.js:21: this.numDestinations_ = 3; Let's add type annotation to this. ...
4 years, 3 months ago (2016-09-17 01:53:02 UTC) #9
rbpotter
https://codereview.chromium.org/2346153002/diff/1/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2346153002/diff/1/chrome/browser/resources/print_preview/data/app_state.js#newcode21 chrome/browser/resources/print_preview/data/app_state.js:21: this.numDestinations_ = 3; On 2016/09/17 01:53:02, dpapad wrote: > ...
4 years, 3 months ago (2016-09-19 21:16:19 UTC) #12
dpapad
Some more comments. Looks cleaner than before, but still I don't have a clear picture ...
4 years, 3 months ago (2016-09-19 22:16:19 UTC) #13
rbpotter
Fixed errors. The general goal is to save the 3 (or possibly some other number, ...
4 years, 3 months ago (2016-09-20 23:47:37 UTC) #18
dpapad
Thanks, for the explanation. I understand now what the previous and new state of the ...
4 years, 3 months ago (2016-09-21 00:34:31 UTC) #19
rbpotter
https://codereview.chromium.org/2346153002/diff/40001/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2346153002/diff/40001/chrome/browser/resources/print_preview/data/app_state.js#newcode145 chrome/browser/resources/print_preview/data/app_state.js:145: /** @return {?Array<string>} IDs of the recent destinations. */ ...
4 years, 3 months ago (2016-09-21 01:43:08 UTC) #22
dpapad
LGTM, with one potential future improvement suggestion. Does one id, correspond to one account, one ...
4 years, 3 months ago (2016-09-21 02:22:03 UTC) #25
rbpotter
I switched this to an array of objects instead of lots of arrays. I think ...
4 years, 3 months ago (2016-09-21 20:30:40 UTC) #30
dpapad
Thanks for following the suggestion. Indeed it is easier to follow now. A few nits, ...
4 years, 3 months ago (2016-09-21 20:44:18 UTC) #33
dpapad
https://codereview.chromium.org/2346153002/diff/80001/chrome/browser/resources/print_preview/data/destination_store.js File chrome/browser/resources/print_preview/data/destination_store.js (right): https://codereview.chromium.org/2346153002/diff/80001/chrome/browser/resources/print_preview/data/destination_store.js#newcode1159 chrome/browser/resources/print_preview/data/destination_store.js:1159: return (destination.id == recent.id_ && Since you are accessing ...
4 years, 3 months ago (2016-09-21 20:46:32 UTC) #34
rbpotter
https://codereview.chromium.org/2346153002/diff/80001/chrome/browser/resources/print_preview/data/app_state.js File chrome/browser/resources/print_preview/data/app_state.js (right): https://codereview.chromium.org/2346153002/diff/80001/chrome/browser/resources/print_preview/data/app_state.js#newcode18 chrome/browser/resources/print_preview/data/app_state.js:18: this.extension_id_ = destination.extension_id || ''; On 2016/09/21 20:44:18, dpapad ...
4 years, 3 months ago (2016-09-21 23:19:15 UTC) #38
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/2346153002/140001
4 years, 3 months ago (2016-09-22 01:59:51 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 3 months ago (2016-09-22 02:06:35 UTC) #49
commit-bot: I haz the power
4 years, 3 months ago (2016-09-22 02:10:00 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6d799882e49984de8620d41c53893101eaed92f6
Cr-Commit-Position: refs/heads/master@{#420238}

Powered by Google App Engine
This is Rietveld 408576698