Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 6627060: ImportantFileWriter: check return value of PostTask... (Closed)

Created:
9 years, 9 months ago by Paweł Hajdan Jr.
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ncarter (slow), idana, Raghu Simha, Erik does not do reviews, Aaron Boodman, pam+watch_chromium.org, Paweł Hajdan Jr., tim (not reviewing)
Visibility:
Public.

Description

ImportantFileWriter: check return value of PostTask when writing to the disk, so we can be sure it doesn't lose data. Also fix tests that misused things. TEST=none BUG=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=77695

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Total comments: 5

Patch Set 5 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -45 lines) Patch
M chrome/browser/browser_commands_unittest.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_menu_manager_unittest.cc View 1 2 3 chunks +9 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_prefs_unittest.cc View 1 2 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/extensions/extension_updater_unittest.cc View 1 2 15 chunks +42 lines, -16 lines 0 comments Download
M chrome/browser/extensions/test_extension_prefs.cc View 1 2 3 4 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/profiles/profile_manager_unittest.cc View 1 2 3 chunks +9 lines, -1 line 0 comments Download
M chrome/browser/sync/sync_setup_wizard_unittest.cc View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_test_helper.cc View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc View 1 2 1 chunk +1 line, -10 lines 0 comments Download
M chrome/common/important_file_writer.cc View 1 2 1 chunk +13 lines, -4 lines 0 comments Download
M chrome/test/browser_with_test_window_test.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/browser_with_test_window_test.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Paweł Hajdan Jr.
What do you think? My plan is to switch to a Windows checkout and fixing ...
9 years, 9 months ago (2011-03-07 21:09:20 UTC) #1
sanjeevr
http://codereview.chromium.org/6627060/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6627060/diff/1/chrome/common/important_file_writer.cc#newcode119 chrome/common/important_file_writer.cc:119: write_task->Run(); This will not work because PostTask will delete ...
9 years, 9 months ago (2011-03-07 23:26:25 UTC) #2
Paweł Hajdan Jr.
PTAL http://codereview.chromium.org/6627060/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6627060/diff/1/chrome/common/important_file_writer.cc#newcode119 chrome/common/important_file_writer.cc:119: write_task->Run(); On 2011/03/07 23:26:25, sanjeevr wrote: > This ...
9 years, 9 months ago (2011-03-08 09:11:28 UTC) #3
sanjeevr
LGTM with a spelling nit. http://codereview.chromium.org/6627060/diff/7001/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6627060/diff/7001/chrome/common/important_file_writer.cc#newcode112 chrome/common/important_file_writer.cc:112: // to fail, but ...
9 years, 9 months ago (2011-03-08 19:42:05 UTC) #4
Paweł Hajdan Jr.
Brett/Antony: could you take a look? http://codereview.chromium.org/6627060/diff/7001/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6627060/diff/7001/chrome/common/important_file_writer.cc#newcode112 chrome/common/important_file_writer.cc:112: // to fail, ...
9 years, 9 months ago (2011-03-09 09:09:21 UTC) #5
brettw
LGTM
9 years, 9 months ago (2011-03-09 18:06:28 UTC) #6
asargent_no_longer_on_chrome
http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc File chrome/browser/extensions/test_extension_prefs.cc (right): http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc#newcode69 chrome/browser/extensions/test_extension_prefs.cc:69: MessageLoop::current()->RunAllPending(); The code before was waiting for the file ...
9 years, 9 months ago (2011-03-09 18:13:01 UTC) #7
Paweł Hajdan Jr.
http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc File chrome/browser/extensions/test_extension_prefs.cc (right): http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc#newcode69 chrome/browser/extensions/test_extension_prefs.cc:69: MessageLoop::current()->RunAllPending(); On 2011/03/09 18:13:01, Antony Sargent wrote: > The ...
9 years, 9 months ago (2011-03-09 18:22:14 UTC) #8
asargent_no_longer_on_chrome
http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc File chrome/browser/extensions/test_extension_prefs.cc (right): http://codereview.chromium.org/6627060/diff/15001/chrome/browser/extensions/test_extension_prefs.cc#newcode69 chrome/browser/extensions/test_extension_prefs.cc:69: MessageLoop::current()->RunAllPending(); On 2011/03/09 18:22:14, Paweł Hajdan Jr. wrote: > ...
9 years, 9 months ago (2011-03-09 18:33:25 UTC) #9
Paweł Hajdan Jr.
Please take another look. If it looks good, could you please add it to the ...
9 years, 9 months ago (2011-03-09 20:40:03 UTC) #10
asargent_no_longer_on_chrome
Ok, I think the change in test_extension_prefs.cc looks good now. However in looking things over ...
9 years, 9 months ago (2011-03-09 20:53:17 UTC) #11
commit-bot: I haz the power
Try job failure for 6627060-21003 on linux: http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux&number=16098
9 years, 9 months ago (2011-03-09 21:24:53 UTC) #12
Paweł Hajdan Jr.
http://codereview.chromium.org/6627060/diff/21003/chrome/browser/extensions/extension_menu_manager_unittest.cc File chrome/browser/extensions/extension_menu_manager_unittest.cc (right): http://codereview.chromium.org/6627060/diff/21003/chrome/browser/extensions/extension_menu_manager_unittest.cc#newcode36 chrome/browser/extensions/extension_menu_manager_unittest.cc:36: file_thread_(BrowserThread::FILE, &message_loop_), On 2011/03/09 20:53:17, Antony Sargent wrote: > ...
9 years, 9 months ago (2011-03-10 07:30:35 UTC) #13
Paweł Hajdan Jr.
I just realized we still need to call RunAllPending to avoid hangs, eh. Could you ...
9 years, 9 months ago (2011-03-10 09:18:19 UTC) #14
asargent_no_longer_on_chrome
lgtm
9 years, 9 months ago (2011-03-10 20:23:08 UTC) #15
commit-bot: I haz the power
9 years, 9 months ago (2011-03-10 21:22:00 UTC) #16
Change committed as 77695

Powered by Google App Engine
This is Rietveld 408576698