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

Issue 9316109: Move Ownership of IMUI to HistoryService. (Closed)

Created:
8 years, 10 months ago by mrossetti
Modified:
8 years, 10 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, James Su, brettw-cc_chromium.org
Visibility:
Public.

Description

Move Ownership of IMUI to HistoryService. This change moves the InMemoryURLIndex (IMUI) from being owned by the InMemoryHistoryBackend to being owned by the HistoryService. The only dependency the IMUI has on the HistoryBackend is the need to access the history database for the one-time need to build the IMUI from scratch. Divorcing the IMUI from the HistoryBackend also pointed out that updates to the IMUI index related to URL visits and history deletes should be handled by notification, and this was implemented in this CL. NOTE: Portions previously reviewed as: http://codereview.chromium.org/9030031/. That change involved both 1) moving the ownership of the IMUI from the InMemoryHistoryBackend, and 2) performing the caching file operations on the FILE thread. I've split this up into two CLs with this CL dealing with the move of ownership. BUG=83659 TEST=Updated unit tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120707

Patch Set 1 #

Total comments: 16

Patch Set 2 : Eliminate unnecessary UpdateURL and DeleteURL functions. #

Patch Set 3 : '' #

Patch Set 4 : Add simple accessor to make linux compiler privacy happy. #

Total comments: 6

Patch Set 5 : Qualify globally scoped friend classes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+590 lines, -294 lines) Patch
M chrome/browser/autocomplete/history_quick_provider_unittest.cc View 1 2 3 6 chunks +19 lines, -13 lines 0 comments Download
M chrome/browser/history/history.h View 5 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/history/history.cc View 1 6 chunks +16 lines, -10 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/history/history_database.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/history/history_notifications.h View 4 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/history/history_types.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_history_backend.h View 1 3 chunks +3 lines, -16 lines 0 comments Download
chrome/browser/history/in_memory_history_backend.cc View 1 4 chunks +8 lines, -30 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 1 2 3 4 4 chunks +103 lines, -36 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 1 2 chunks +164 lines, -34 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_types.h View 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 2 20 chunks +143 lines, -80 lines 0 comments Download
M chrome/browser/history/url_index_private_data.h View 1 2 3 4 5 chunks +25 lines, -13 lines 0 comments Download
M chrome/browser/history/url_index_private_data.cc View 6 chunks +86 lines, -49 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
mrossetti
As mentioned in the description, this is just the portion of the previous refactoring CL ...
8 years, 10 months ago (2012-02-04 00:26:37 UTC) #1
mrossetti
Just a couple of notes about changing std::vector<URLRow>'s to URLRows. https://chromiumcodereview.appspot.com/9316109/diff/1/chrome/browser/history/history_backend.cc File chrome/browser/history/history_backend.cc (right): https://chromiumcodereview.appspot.com/9316109/diff/1/chrome/browser/history/history_backend.cc#newcode764 ...
8 years, 10 months ago (2012-02-04 00:38:37 UTC) #2
Peter Kasting
https://chromiumcodereview.appspot.com/9316109/diff/1/chrome/browser/autocomplete/history_quick_provider_unittest.cc File chrome/browser/autocomplete/history_quick_provider_unittest.cc (right): https://chromiumcodereview.appspot.com/9316109/diff/1/chrome/browser/autocomplete/history_quick_provider_unittest.cc#newcode161 chrome/browser/autocomplete/history_quick_provider_unittest.cc:161: // DO WE WANT THIS CHANGE? ? https://chromiumcodereview.appspot.com/9316109/diff/1/chrome/browser/history/history.cc File ...
8 years, 10 months ago (2012-02-04 02:20:31 UTC) #3
mrossetti
Issues addressed. Primarily, removed UpdateURL and DeleteURL functions only needed by unit tests. The unit ...
8 years, 10 months ago (2012-02-04 04:30:52 UTC) #4
Peter Kasting
LGTM
8 years, 10 months ago (2012-02-06 19:28:20 UTC) #5
Peter Kasting
The qualifiers will make Linux gcc work. This may be a gcc bug. http://codereview.chromium.org/9316109/diff/14001/chrome/browser/history/in_memory_url_index.h File ...
8 years, 10 months ago (2012-02-07 00:12:22 UTC) #6
mrossetti
8 years, 10 months ago (2012-02-07 01:10:13 UTC) #7
Sweet! Thanks for the assist! The linux compiler is much happier now.

https://chromiumcodereview.appspot.com/9316109/diff/14001/chrome/browser/hist...
File chrome/browser/history/in_memory_url_index.h (right):

https://chromiumcodereview.appspot.com/9316109/diff/14001/chrome/browser/hist...
chrome/browser/history/in_memory_url_index.h:100: friend class
HistoryQuickProviderTest;
On 2012/02/07 00:12:22, Peter Kasting wrote:
> Nit: Add "::" before classname

Ah!

https://chromiumcodereview.appspot.com/9316109/diff/14001/chrome/browser/hist...
chrome/browser/history/in_memory_url_index.h:177: URLIndexPrivateData*
private_data() const { return private_data_.get(); }
On 2012/02/07 00:12:22, Peter Kasting wrote:
> Nit: This should not be const

Done.

https://chromiumcodereview.appspot.com/9316109/diff/14001/chrome/browser/hist...
File chrome/browser/history/url_index_private_data.h (right):

https://chromiumcodereview.appspot.com/9316109/diff/14001/chrome/browser/hist...
chrome/browser/history/url_index_private_data.h:35: friend class
HistoryQuickProviderTest;
On 2012/02/07 00:12:22, Peter Kasting wrote:
> Nit: Add "::" before classname

Done.

Powered by Google App Engine
This is Rietveld 408576698