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

Issue 149313003: Significantly cleans up the ImageWriter Operation class and subclasses. (Closed)

Created:
6 years, 10 months ago by Drew Haven
Modified:
6 years, 10 months ago
Reviewers:
tbarzic
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Significantly cleans up the ImageWriter Operation class and subclasses. * Moved Operations to be in CPS for stage isolation. * Updates unit tests to use isolated stages. * Adds unit tests for uncovered stages. * Cleans up temporary file handling. * Removes unnecessary and redundant code (CompareFiles, ImageReader). * Fixes bug with verification progress updates. * All .zip files now unzipped before burning. * All non-.zip files not unzipped before burning. * Removes unnecessary complexity, e.g. unnecessary scoped_ptrs. BUG=292956 BUG=337883 BUG=335404 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251704

Patch Set 1 #

Patch Set 2 : Adds/removes files missed in last patch, minor cleanup. #

Patch Set 3 : Shortens names and restricts access for intermediate stages. #

Patch Set 4 : Test cleanup. #

Patch Set 5 : Fixes Chrome OS compile. #

Patch Set 6 : Fixes compilation errors. #

Total comments: 17

Patch Set 7 : Responds to reviewer feedback. Cleans up formatting, logging and tests a bit. #

Patch Set 8 : Sets up the correct temporary directory based on OS. #

Patch Set 9 : Removes self-reference that was causing the operation to not be deleted. Removes some extra loggin… #

Total comments: 18

Patch Set 10 : Review feedback: Creates StartImpl function, updates platformfile lifetime to use passed ScopedPlat… #

Total comments: 3

Patch Set 11 : Removes all the ScopedPlatformFileCloser stuff and just uses normal PlatformFiles. #

Total comments: 4

Patch Set 12 : Fixes cross-compilation/test errors. #

Patch Set 13 : Fixes cross-compilation and test issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+955 lines, -868 lines) Patch
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/destroy_partitions_operation_unittest.cc View 1 2 3 4 5 6 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/image_writer_private_api.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -18 lines 0 comments Download
D chrome/browser/extensions/api/image_writer_private/image_writer_utils.h View 1 1 chunk +0 lines, -53 lines 0 comments Download
D chrome/browser/extensions/api/image_writer_private/image_writer_utils.cc View 1 1 chunk +0 lines, -127 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation.h View 1 2 3 4 5 6 7 8 9 10 6 chunks +44 lines, -30 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +163 lines, -148 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_chromeos.cc View 1 2 3 4 5 6 7 8 1 chunk +24 lines, -17 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_linux.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +122 lines, -140 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_mac.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_manager.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +9 lines, -18 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +171 lines, -57 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/operation_win.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/test_utils.h View 1 2 chunks +6 lines, -9 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -27 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation.cc View 1 2 3 4 5 6 7 8 9 1 chunk +13 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_file_operation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +42 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +40 lines, -31 lines 0 comments Download
M chrome/browser/extensions/api/image_writer_private/write_from_url_operation.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +86 lines, -155 lines 0 comments Download
A chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +204 lines, -0 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Drew Haven
Toni, Could I get you to do a bit of review on some updates to ...
6 years, 10 months ago (2014-01-31 22:59:06 UTC) #1
tbarzic
I apologize for the delay.. LGTM https://codereview.chromium.org/149313003/diff/100001/chrome/browser/extensions/api/image_writer_private/operation.cc File chrome/browser/extensions/api/image_writer_private/operation.cc (right): https://codereview.chromium.org/149313003/diff/100001/chrome/browser/extensions/api/image_writer_private/operation.cc#newcode264 chrome/browser/extensions/api/image_writer_private/operation.cc:264: base::ClosePlatformFile(file); I think ...
6 years, 10 months ago (2014-02-07 22:06:42 UTC) #2
Drew Haven
Before I submit I still need to finalize where we're going to store the downloaded ...
6 years, 10 months ago (2014-02-11 00:50:14 UTC) #3
Drew Haven
Toni, I've made a few more changes based on some bugs we found and of ...
6 years, 10 months ago (2014-02-13 00:08:04 UTC) #4
tbarzic
On 2014/02/13 00:08:04, Drew Haven wrote: > Toni, > > I've made a few more ...
6 years, 10 months ago (2014-02-13 00:27:59 UTC) #5
Drew Haven
Thanks, Toni. Shouldn't be too big. On Wed, Feb 12, 2014 at 4:27 PM, <tbarzic@chromium.org> ...
6 years, 10 months ago (2014-02-13 00:28:50 UTC) #6
tbarzic
https://codereview.chromium.org/149313003/diff/100001/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc File chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc (right): https://codereview.chromium.org/149313003/diff/100001/chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc#newcode19 chrome/browser/extensions/api/image_writer_private/write_from_url_operation_unittest.cc:19: using testing::AtLeast; On 2014/02/11 00:50:15, Drew Haven wrote: > ...
6 years, 10 months ago (2014-02-13 06:58:51 UTC) #7
Drew Haven
Thanks for taking a look, Toni. I tried to incorporate all your feedback. The big ...
6 years, 10 months ago (2014-02-13 20:48:10 UTC) #8
tbarzic
https://codereview.chromium.org/149313003/diff/820001/chrome/browser/extensions/api/image_writer_private/operation_linux.cc File chrome/browser/extensions/api/image_writer_private/operation_linux.cc (right): https://codereview.chromium.org/149313003/diff/820001/chrome/browser/extensions/api/image_writer_private/operation_linux.cc#newcode25 chrome/browser/extensions/api/image_writer_private/operation_linux.cc:25: base::ScopedPlatformFileCloser file_closer(new base::PlatformFile()); will the created PlatformFile get deleted ...
6 years, 10 months ago (2014-02-13 21:32:38 UTC) #9
Drew Haven
Alright, I removed all the ScopedPlatformFileCloser stuff. It looked useful at first, but the details ...
6 years, 10 months ago (2014-02-13 23:29:58 UTC) #10
tbarzic
lgtm https://codereview.chromium.org/149313003/diff/820001/chrome/browser/extensions/api/image_writer_private/operation_linux.cc File chrome/browser/extensions/api/image_writer_private/operation_linux.cc (right): https://codereview.chromium.org/149313003/diff/820001/chrome/browser/extensions/api/image_writer_private/operation_linux.cc#newcode25 chrome/browser/extensions/api/image_writer_private/operation_linux.cc:25: base::ScopedPlatformFileCloser file_closer(new base::PlatformFile()); On 2014/02/13 23:30:01, Drew Haven ...
6 years, 10 months ago (2014-02-13 23:42:46 UTC) #11
Drew Haven
Thanks again for helping review. https://codereview.chromium.org/149313003/diff/1210001/chrome/browser/extensions/api/image_writer_private/operation.cc File chrome/browser/extensions/api/image_writer_private/operation.cc (right): https://codereview.chromium.org/149313003/diff/1210001/chrome/browser/extensions/api/image_writer_private/operation.cc#newcode332 chrome/browser/extensions/api/image_writer_private/operation.cc:332: BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, continuation); On ...
6 years, 10 months ago (2014-02-14 02:44:29 UTC) #12
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-14 08:20:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/149313003/1600001
6 years, 10 months ago (2014-02-14 08:20:50 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 08:55:26 UTC) #15
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) base_unittests, browser_tests, interactive_ui_tests, net_unittests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=264182
6 years, 10 months ago (2014-02-14 08:55:27 UTC) #16
Drew Haven
On 2014/02/14 08:55:27, I haz the power (commit-bot) wrote: > Retried try job too often ...
6 years, 10 months ago (2014-02-14 18:52:58 UTC) #17
Drew Haven
On 2014/02/14 18:52:58, Drew Haven wrote: > On 2014/02/14 08:55:27, I haz the power (commit-bot) ...
6 years, 10 months ago (2014-02-14 18:53:50 UTC) #18
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-14 21:16:33 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/149313003/1670003
6 years, 10 months ago (2014-02-14 21:19:24 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-14 22:59:49 UTC) #21
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=264699
6 years, 10 months ago (2014-02-14 22:59:50 UTC) #22
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-15 00:21:01 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/149313003/1670003
6 years, 10 months ago (2014-02-15 00:35:54 UTC) #24
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-15 03:28:49 UTC) #25
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=264947
6 years, 10 months ago (2014-02-15 03:28:49 UTC) #26
Drew Haven
The CQ bit was checked by haven@chromium.org
6 years, 10 months ago (2014-02-17 18:09:54 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/haven@chromium.org/149313003/1670003
6 years, 10 months ago (2014-02-17 18:10:10 UTC) #28
commit-bot: I haz the power
Change committed as 251704
6 years, 10 months ago (2014-02-17 19:26:44 UTC) #29
ckocagil
6 years, 10 months ago (2014-02-18 04:56:37 UTC) #30
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/170123002/ by ckocagil@chromium.org.

The reason for reverting is: Broke ASAN bots.

http://build.chromium.org/p/chromium.memory/builders/Linux%20ASAN%20Tests%20%....

Powered by Google App Engine
This is Rietveld 408576698