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

Issue 400673008: Get rid of FileThreadDeserializer. (Closed)

Created:
6 years, 5 months ago by gab
Modified:
6 years, 5 months ago
Reviewers:
Bernhard Bauer
CC:
chromium-reviews, erikwright+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Get rid of FileThreadDeserializer. Replace it with modern threading constructs: - PostTaskAndReplyWithResult gets rid of most of the logic FileThreadDeserializer was implementing. - The remainder logic didn't require any class state so it was moved to anonymous methods. Also declare JsonPrefStore explicitly NonThreadSafe (the only actions outside the UI thread should happen by posting anonymous tasks to the |sequenced_task_runner_|). This is a stepping stone in cleaning up JsonPrefStore to eventually get rid of PrefStore's ref-counting scheme. BUG=393081 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284754

Patch Set 1 : #

Patch Set 2 : Explicitly declare JsonPrefStore non-thread-safe. #

Total comments: 6

Patch Set 3 : inline PostTaskAndReplyWithResult #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -128 lines) Patch
M base/prefs/json_pref_store.h View 1 3 chunks +9 lines, -13 lines 0 comments Download
M base/prefs/json_pref_store.cc View 1 2 10 chunks +112 lines, -115 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
gab
Bernhard PTAL :-)! Cheers, Gab
6 years, 5 months ago (2014-07-22 16:03:24 UTC) #1
Bernhard Bauer
Awesumz!!!111oneone https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.cc#newcode116 base/prefs/json_pref_store.cc:116: void PostAsyncReadTask( Could you inline this method? https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.h ...
6 years, 5 months ago (2014-07-22 16:22:00 UTC) #2
gab
https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.cc File base/prefs/json_pref_store.cc (right): https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.cc#newcode116 base/prefs/json_pref_store.cc:116: void PostAsyncReadTask( On 2014/07/22 16:22:00, Bernhard Bauer wrote: > ...
6 years, 5 months ago (2014-07-22 16:47:43 UTC) #3
Bernhard Bauer
lgtm https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.h#newcode41 base/prefs/json_pref_store.h:41: struct ReadResult; On 2014/07/22 16:47:43, gab wrote: > ...
6 years, 5 months ago (2014-07-22 16:56:35 UTC) #4
gab
Thanks :-)! https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.h File base/prefs/json_pref_store.h (right): https://codereview.chromium.org/400673008/diff/40001/base/prefs/json_pref_store.h#newcode41 base/prefs/json_pref_store.h:41: struct ReadResult; On 2014/07/22 16:56:35, Bernhard Bauer ...
6 years, 5 months ago (2014-07-22 17:23:05 UTC) #5
gab
The CQ bit was checked by gab@chromium.org
6 years, 5 months ago (2014-07-22 17:23:09 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/400673008/60001
6 years, 5 months ago (2014-07-22 17:24:58 UTC) #7
commit-bot: I haz the power
6 years, 5 months ago (2014-07-22 19:30:25 UTC) #8
Message was sent while issue was closed.
Change committed as 284754

Powered by Google App Engine
This is Rietveld 408576698