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

Issue 6246105: Only invoke WebKit methods in browsing data helpers on the WEBKIT thread. (Closed)

Created:
9 years, 10 months ago by jochen (gone - plz use gerrit)
Modified:
9 years, 7 months ago
CC:
chromium-reviews, kcc2, Paweł Hajdan Jr.
Visibility:
Public.

Description

Only invoke WebKit methods in browsing data helpers on the WEBKIT thread. BUG=71786 TEST=browser & unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74433

Patch Set 1 #

Total comments: 3

Patch Set 2 : updates #

Total comments: 4

Patch Set 3 : updates #

Total comments: 2

Patch Set 4 : updates #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+572 lines, -380 lines) Patch
M chrome/browser/browsing_data_database_helper.h View 1 2 6 chunks +38 lines, -16 lines 0 comments Download
M chrome/browser/browsing_data_database_helper.cc View 1 2 8 chunks +81 lines, -38 lines 2 comments Download
M chrome/browser/browsing_data_database_helper_browsertest.cc View 1 2 2 chunks +62 lines, -3 lines 2 comments Download
M chrome/browser/browsing_data_database_helper_unittest.cc View 1 2 3 chunks +2 lines, -86 lines 2 comments Download
A chrome/browser/browsing_data_helper_browsertest.h View 1 2 3 1 chunk +46 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data_indexed_db_helper.h View 1 2 3 chunks +34 lines, -1 line 1 comment Download
M chrome/browser/browsing_data_indexed_db_helper.cc View 1 2 3 chunks +87 lines, -28 lines 1 comment Download
A chrome/browser/browsing_data_indexed_db_helper_browsertest.cc View 1 2 1 chunk +75 lines, -0 lines 0 comments Download
M chrome/browser/browsing_data_indexed_db_helper_unittest.cc View 1 2 3 chunks +1 line, -85 lines 0 comments Download
M chrome/browser/browsing_data_local_storage_helper.h View 3 chunks +22 lines, -10 lines 0 comments Download
M chrome/browser/browsing_data_local_storage_helper.cc View 1 2 3 chunks +61 lines, -27 lines 0 comments Download
M chrome/browser/browsing_data_local_storage_helper_browsertest.cc View 1 2 4 chunks +59 lines, -6 lines 0 comments Download
M chrome/browser/browsing_data_local_storage_helper_unittest.cc View 1 2 3 chunks +2 lines, -80 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
jochen (gone - plz use gerrit)
please review
9 years, 10 months ago (2011-02-04 15:18:00 UTC) #1
Paweł Hajdan Jr.
Drive-by with testing comments. Please fix the issues and let me take another look before ...
9 years, 10 months ago (2011-02-05 12:44:51 UTC) #2
jochen (gone - plz use gerrit)
On 2011/02/05 12:44:51, Paweł Hajdan Jr. wrote: > Drive-by with testing comments. Please fix the ...
9 years, 10 months ago (2011-02-05 12:57:02 UTC) #3
Paweł Hajdan Jr.
On 2011/02/05 12:57:02, jochen wrote: > Pawel, this is the pattern from net/base/testing_completion_callback.* Are you ...
9 years, 10 months ago (2011-02-07 07:59:57 UTC) #4
jochen (gone - plz use gerrit)
On 2011/02/07 07:59:57, Paweł Hajdan Jr. wrote: > On 2011/02/05 12:57:02, jochen wrote: > > ...
9 years, 10 months ago (2011-02-07 08:08:47 UTC) #5
jochen (gone - plz use gerrit)
Bernhard, can you take a look?
9 years, 10 months ago (2011-02-08 10:21:24 UTC) #6
Bernhard Bauer
Apart from one nit, I only really looked at the test changes. The comments in ...
9 years, 10 months ago (2011-02-08 10:49:08 UTC) #7
jochen (gone - plz use gerrit)
addressed all comments
9 years, 10 months ago (2011-02-10 12:34:59 UTC) #8
Bernhard Bauer
Tests LGTM with lint errors fixed (http://codereview.chromium.org/lint_patch/issue6246105_10001_11005) and a suggestion below: http://codereview.chromium.org/6246105/diff/10001/chrome/browser/browsing_data_local_storage_helper_browsertest.cc File chrome/browser/browsing_data_local_storage_helper_browsertest.cc (right): ...
9 years, 10 months ago (2011-02-10 12:51:09 UTC) #9
Bernhard Bauer
Forgot one thing: http://codereview.chromium.org/6246105/diff/10001/chrome/browser/browsing_data_helper_browsertest.h File chrome/browser/browsing_data_helper_browsertest.h (right): http://codereview.chromium.org/6246105/diff/10001/chrome/browser/browsing_data_helper_browsertest.h#newcode26 chrome/browser/browsing_data_helper_browsertest.h:26: MessageLoop::current()->Run(); Maybe you could DCHECK that ...
9 years, 10 months ago (2011-02-10 12:52:19 UTC) #10
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM, thanks!
9 years, 10 months ago (2011-02-10 12:54:24 UTC) #11
jochen (gone - plz use gerrit)
On 2011/02/10 12:51:09, Bernhard Bauer wrote: > Tests LGTM with lint errors fixed > (http://codereview.chromium.org/lint_patch/issue6246105_10001_11005) ...
9 years, 10 months ago (2011-02-10 13:46:34 UTC) #12
bulach
9 years, 10 months ago (2011-02-22 22:34:01 UTC) #13
LGTM

i have just some nits and probably unrelated suggestions below, let me know if
you agree... also, I know I wrote this a while ago :) I think I can do some
refactoring... all the "helpers" basically follow the same pattern, we could
have a base class for all of them and just have the actual "FetchInWebKitThread"
for each one of them... how does it sound? I can try to look at it at some point
if you agree...

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
File chrome/browser/browsing_data_database_helper.cc (right):

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper.cc:178: return
database_info_.empty() && pending_database_info_.empty();
nit: odd indent (sorry!)

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper.cc:193: base::AutoLock
auto_lock(lock_);
nit: you may want to put the this lock and the following block up to 224 into
its own scope.
alternatively, perhaps rename this method to "FetchInWebKitThread", (which would
be called by "StartFetching"), and then split 193-224 to perhaps
"FetchInternal"?
convert seems it's a simple datatype translation, but there's a bit more to it..

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
File chrome/browser/browsing_data_database_helper_browsertest.cc (right):

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper_browsertest.cc:14: namespace {
I think there's a \n here and when closing the namespace

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper_browsertest.cc:141: }
ditto

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
File chrome/browser/browsing_data_database_helper_unittest.cc (right):

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper_unittest.cc:11: namespace {
ditto

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_database_helper_unittest.cc:26: }
ditto

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
File chrome/browser/browsing_data_indexed_db_helper.cc (right):

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_indexed_db_helper.cc:288: if (completion_callback_
!= NULL) {
oh, I think we can change both here (and the original code too).
a DCHECK(is_fetching_) and DCHECK(completion_callback_ != NULL) should be
enough, no need for 286-288 and 291.

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
File chrome/browser/browsing_data_indexed_db_helper.h (right):

http://codereview.chromium.org/6246105/diff/14003/chrome/browser/browsing_dat...
chrome/browser/browsing_data_indexed_db_helper.h:118: void
ConvertPendingInfoInWebKitThread();
as above

Powered by Google App Engine
This is Rietveld 408576698