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

Issue 186014: ForceTLS: persist to disk (Closed)

Created:
11 years, 3 months ago by agl
Modified:
9 years, 7 months ago
Reviewers:
abarth-chromium
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

ForceTLS: persist to disk

Patch Set 1 #

Patch Set 2 : ... #

Total comments: 8

Patch Set 3 : ... #

Patch Set 4 : ... #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -14 lines) Patch
A chrome/browser/force_tls_persister.h View 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/force_tls_persister.cc View 1 2 1 chunk +78 lines, -0 lines 0 comments Download
M chrome/browser/profile.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/profile.cc View 1 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/chrome.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M net/base/force_tls_state.h View 1 2 4 chunks +27 lines, -4 lines 0 comments Download
M net/base/force_tls_state.cc View 1 2 3 2 chunks +105 lines, -6 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
agl
11 years, 3 months ago (2009-09-02 19:27:06 UTC) #1
abarth-chromium
Awesome! Thanks for doing this. This LGTM after you address the minor points below. http://codereview.chromium.org/186014/diff/1001/2001 ...
11 years, 3 months ago (2009-09-02 19:49:30 UTC) #2
agl
http://codereview.chromium.org/186014/diff/1001/2001 File chrome/browser/force_tls_persister.cc (right): http://codereview.chromium.org/186014/diff/1001/2001#newcode41 Line 41: // Runs on |file_thread_| On 2009/09/02 19:49:30, abarth ...
11 years, 3 months ago (2009-09-02 20:47:44 UTC) #3
abarth-chromium
11 years, 3 months ago (2009-09-02 21:02:10 UTC) #4
We're into the tail of nit picking.  This is good as-is, or you could decide to
address the two comments below.

http://codereview.chromium.org/186014/diff/1001/2007
File net/base/force_tls_state.h (right):

http://codereview.chromium.org/186014/diff/1001/2007#newcode57
Line 57: void SetDirtyCallback(void (*callback) (void*), void* userdata);
On 2009/09/02 20:47:44, agl wrote:
> So, the reason why I didn't do this is because Tasks take a reference to the
> object which they're going to be calling. So ForceTLSState would have a
> reference to ForceTLSPersister, but the persister also has a reference to
> ForceTLSState. Thus we have a reference cycle and neither would ever be
deleted.

Ah, that makes sense.

> I could override the templates to not take a reference in this case, but I
feel
> like it's a lot of code. I'm not bother either way if you really want to make
it
> a Task though.

Please don't do that.  Overriding that template is dangerous because other
callsites don't expect it.

The really correct thing to do is make a delegate interface for ForceTLSState
with an OnStateChanged() virtual function.  You can decide if that's worth doing
to get rid of the reinterpret_cast.

http://codereview.chromium.org/186014/diff/1002/1008
File net/base/force_tls_state.cc (right):

http://codereview.chromium.org/186014/diff/1002/1008#newcode218
Line 218: continue;
You didn't mark us dirty, which means we won't flush the reduced set back to
disk unless something else randomly alters the memory version of the table.

Powered by Google App Engine
This is Rietveld 408576698