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

Issue 6713033: Tweak commit interval for ScheduleSavePersistentPrefs. (Closed)

Created:
9 years, 9 months ago by Denis Lagno
Modified:
7 years, 7 months ago
CC:
chromium-reviews, Evan Martin
Visibility:
Public.

Description

Tweak commit interval for ScheduleSavePersistentPrefs. For release builds this interval is decreased to 2 seconds. Current 10 seconds seem to be too high because user is able to do a lot of interactions in this period possibly leading to crash. For debug builds this interval is instead increased to 100 seconds in order to make it easier to trigger bugs. BUG=chromium-os:13102 TEST=Manual

Patch Set 1 #

Total comments: 6

Patch Set 2 : added comments + changed ifdef #

Total comments: 2

Patch Set 3 : another attempt #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -6 lines) Patch
M chrome/common/important_file_writer.cc View 1 2 3 chunks +25 lines, -6 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
Denis Lagno
please take a look
9 years, 9 months ago (2011-03-18 15:29:01 UTC) #1
Paweł Hajdan Jr.
http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc#newcode24 chrome/common/important_file_writer.cc:24: #ifdef NDEBUG I'm not a fan of different behavior ...
9 years, 9 months ago (2011-03-18 19:59:03 UTC) #2
brettw
http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc#newcode25 chrome/common/important_file_writer.cc:25: const int kDefaultCommitIntervalMs = 2000; If we do keep ...
9 years, 9 months ago (2011-03-18 20:30:21 UTC) #3
Denis Lagno
http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6713033/diff/1/chrome/common/important_file_writer.cc#newcode24 chrome/common/important_file_writer.cc:24: #ifdef NDEBUG On 2011/03/18 19:59:03, Paweł Hajdan Jr. wrote: ...
9 years, 9 months ago (2011-03-21 01:18:53 UTC) #4
brettw
http://codereview.chromium.org/6713033/diff/4003/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6713033/diff/4003/chrome/common/important_file_writer.cc#newcode24 chrome/common/important_file_writer.cc:24: #if defined(OFFICIAL_BUILD) || defined(GOOGLE_CHROME_BUILD) This seems like a much ...
9 years, 9 months ago (2011-03-21 05:59:31 UTC) #5
Denis Lagno
http://codereview.chromium.org/6713033/diff/4003/chrome/common/important_file_writer.cc File chrome/common/important_file_writer.cc (right): http://codereview.chromium.org/6713033/diff/4003/chrome/common/important_file_writer.cc#newcode24 chrome/common/important_file_writer.cc:24: #if defined(OFFICIAL_BUILD) || defined(GOOGLE_CHROME_BUILD) On 2011/03/21 05:59:31, brettw wrote: ...
9 years, 9 months ago (2011-03-21 13:07:21 UTC) #6
Paweł Hajdan Jr.
9 years, 9 months ago (2011-03-21 13:27:43 UTC) #7
http://codereview.chromium.org/6713033/diff/5004/chrome/common/important_file...
File chrome/common/important_file_writer.cc (right):

http://codereview.chromium.org/6713033/diff/5004/chrome/common/important_file...
chrome/common/important_file_writer.cc:39: if (base::RandInt(0, 1))
I'm strongly against any randomness in this code. We have tools to detect
problems, and randomness in the code itself just makes reproducing problems more
complicated. Ditto about the #defines in the area.

On the other hand, decreasing the commit interval to 2s is fine for me.

Powered by Google App Engine
This is Rietveld 408576698