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

Issue 9030031: Move InMemoryURLIndex Caching Operations to FILE Thread (Closed)

Created:
8 years, 11 months ago by mrossetti
Modified:
8 years, 9 months ago
Reviewers:
brettw
CC:
chromium-reviews, ncarter (slow), akalin, Raghu Simha, brettw-cc_chromium.org, James Su, tim (not reviewing)
Visibility:
Public.

Description

Move InMemoryURLIndex Caching Operations to FILE Thread Reading and writing of the InMemoryURLIndex (IMUI) cache is now peformed on the FILE thread and, when required, rebuilding of the index is performed on the history thread. Reading and rebuilding of the index from the cache file or history database are now performed as atomic operations rather than by restoring/rebuilding in-place, i.e. a new private data object is created and populated then swapped in for the live private data object. BUG=83659 TEST=Unit tests updated/enhanced. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=126982

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : Fix linux private/friend error. #

Patch Set 4 : Sync hoping to clear up mac_sync builder fails in sync_integration_tests #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : Missed a private data swap. Try to fix update phase failure. #

Total comments: 58

Patch Set 8 : #

Patch Set 9 : Pass bool value, not pointer. Sync to clear up Linux fails (hopefully). #

Total comments: 6

Patch Set 10 : Use proper refcounted structures for passing around status. #

Total comments: 10

Patch Set 11 : #

Total comments: 14

Patch Set 12 : #

Patch Set 13 : Fully embrace scoped_refptr for private_data. #

Patch Set 14 : Added missing changed file to CL. #

Total comments: 6

Patch Set 15 : Return scoped_refptr. #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : Syncing with hopes of pleasing trybot update #

Unified diffs Side-by-side diffs Delta from patch set Stats (+604 lines, -223 lines) Patch
M chrome/browser/autocomplete/history_quick_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 chunks +119 lines, -21 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +144 lines, -42 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 11 chunks +169 lines, -62 lines 0 comments Download
M chrome/browser/history/url_index_private_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 7 chunks +71 lines, -35 lines 0 comments Download
M chrome/browser/history/url_index_private_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 15 chunks +99 lines, -62 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
mrossetti
Peter, this is ready for review. The win_sync failure is a flake. This is the ...
8 years, 11 months ago (2012-01-06 19:08:13 UTC) #1
Peter Kasting
http://codereview.chromium.org/9030031/diff/32023/chrome/browser/history/history.cc File chrome/browser/history/history.cc (right): http://codereview.chromium.org/9030031/diff/32023/chrome/browser/history/history.cc#newcode186 chrome/browser/history/history.cc:186: InMemoryIndex()->ShutDown(); Nit: Should this instead access |history_backend_| directly, to ...
8 years, 11 months ago (2012-01-14 00:12:49 UTC) #2
mrossetti
This is my first effort at introducing some threading concepts into Chrome so I would ...
8 years, 9 months ago (2012-03-03 05:05:56 UTC) #3
brettw
http://codereview.chromium.org/9030031/diff/32023/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/32023/chrome/browser/history/in_memory_url_index.cc#newcode126 chrome/browser/history/in_memory_url_index.cc:126: BrowserThread::FILE, FROM_HERE, It's not clear what you mean here? ...
8 years, 9 months ago (2012-03-05 22:13:05 UTC) #4
Peter Kasting
Mike, since this change kind of sat for seven weeks and now has become smaller, ...
8 years, 9 months ago (2012-03-05 22:38:38 UTC) #5
mrossetti
-pkasting, -sky Changed how parms are passed through the closures. http://codereview.chromium.org/9030031/diff/46001/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/46001/chrome/browser/history/in_memory_url_index.cc#newcode268 ...
8 years, 9 months ago (2012-03-06 03:49:30 UTC) #6
mrossetti
Ready for review.
8 years, 9 months ago (2012-03-07 17:07:53 UTC) #7
brettw
http://codereview.chromium.org/9030031/diff/53001/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/53001/chrome/browser/history/in_memory_url_index.cc#newcode52 chrome/browser/history/in_memory_url_index.cc:52: index_->DoneRebuidingPrivateDataFromHistoryDB(succeeded_, data_.release()); Style: outdent 2 sp http://codereview.chromium.org/9030031/diff/53001/chrome/browser/history/in_memory_url_index.cc#newcode180 chrome/browser/history/in_memory_url_index.cc:180: URLIndexPrivateData* ...
8 years, 9 months ago (2012-03-08 22:03:54 UTC) #8
mrossetti
I fixed that glaring issue! Ready for another review. http://codereview.chromium.org/9030031/diff/53001/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/53001/chrome/browser/history/in_memory_url_index.cc#newcode52 chrome/browser/history/in_memory_url_index.cc:52: ...
8 years, 9 months ago (2012-03-10 00:03:43 UTC) #9
brettw
http://codereview.chromium.org/9030031/diff/60001/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/60001/chrome/browser/history/in_memory_url_index.cc#newcode227 chrome/browser/history/in_memory_url_index.cc:227: private_data_->Clear(); You leak the data here. http://codereview.chromium.org/9030031/diff/60001/chrome/browser/history/in_memory_url_index_types.h File chrome/browser/history/in_memory_url_index_types.h ...
8 years, 9 months ago (2012-03-12 04:37:39 UTC) #10
mrossetti
I'll just get rid of that wacky thread safe container class and add a copy ...
8 years, 9 months ago (2012-03-12 23:21:13 UTC) #11
mrossetti
I've gotten rid of the funky scoped_refptr class containing a scoped_ptr and made the class ...
8 years, 9 months ago (2012-03-13 22:25:46 UTC) #12
brettw
http://codereview.chromium.org/9030031/diff/69020/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/69020/chrome/browser/history/in_memory_url_index.cc#newcode230 chrome/browser/history/in_memory_url_index.cc:230: else Style nit: need {} for this if/else block ...
8 years, 9 months ago (2012-03-13 23:33:52 UTC) #13
mrossetti
Updated! http://codereview.chromium.org/9030031/diff/69020/chrome/browser/history/in_memory_url_index.cc File chrome/browser/history/in_memory_url_index.cc (right): http://codereview.chromium.org/9030031/diff/69020/chrome/browser/history/in_memory_url_index.cc#newcode230 chrome/browser/history/in_memory_url_index.cc:230: else On 2012/03/13 23:33:52, brettw wrote: > Style ...
8 years, 9 months ago (2012-03-14 17:49:19 UTC) #14
brettw
lgtm
8 years, 9 months ago (2012-03-14 19:03:50 UTC) #15
mrossetti
8 years, 9 months ago (2012-03-14 22:40:52 UTC) #16
Thanks for the review and the training. I think I have a much better
understanding now of the usage of the various thread safety support mechanisms.

Some final integration changes were required as some other modifications had
been made to the url_index_private_data.h/.cc that had to be accommodated.

Powered by Google App Engine
This is Rietveld 408576698