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

Issue 8451009: HQP Refactoring (in Preparation for SQLite Cache) (Closed)

Created:
9 years, 1 month ago by mrossetti
Modified:
9 years, 1 month ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, ncarter (slow), akalin, Raghu Simha, brettw-cc_chromium.org, Paweł Hajdan Jr., James Su, tim (not reviewing)
Visibility:
Public.

Description

HQP Refactoring (in Preparation for SQLite Cache) 1. Move ownership of the InMemoryURLIndex from the InMemoryHistoryBackend to the HistoryService, where it truly belongs. 2. Handle (by notification) URL visits, updates and deletes. Refactor use of NOTIFICATION_HISTORY_URLS_DELETED to provide the deleted URLRow so that row ID is available. 3. Correctly handle the adding and removing of page title words when a URL change is detected. 4. Other small cleanups. BUG=96731, 92718 TEST=Unit tests updated. TBR=atwilson (for profile_sync_service_typed_url_unittest.cc) Previously reviewed as: http://codereview.chromium.org/8384024/ Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=111378

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 12

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -211 lines) Patch
M chrome/browser/autocomplete/history_provider.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/autocomplete/history_provider.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/history_quick_provider.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/autocomplete/history_quick_provider_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/history/expire_history_backend.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/history/history.h View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/history/history.cc View 1 2 3 4 5 6 7 8 6 chunks +21 lines, -7 lines 0 comments Download
M chrome/browser/history/history_backend.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/history/history_backend.cc View 1 2 3 4 5 6 7 8 3 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/history/history_backend_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +1 line, -1 line 0 comments Download
M chrome/browser/history/history_notifications.h View 1 2 3 4 5 6 7 8 4 chunks +9 lines, -4 lines 0 comments Download
M chrome/browser/history/history_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/history/in_memory_history_backend.h View 1 2 3 4 5 6 7 8 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/history/in_memory_history_backend.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -32 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.h View 1 2 3 4 5 6 7 8 8 chunks +43 lines, -19 lines 0 comments Download
M chrome/browser/history/in_memory_url_index.cc View 1 2 3 4 5 6 7 8 7 chunks +106 lines, -55 lines 0 comments Download
M chrome/browser/history/in_memory_url_index_unittest.cc View 1 2 3 4 5 6 7 8 16 chunks +80 lines, -72 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
mrossetti
I've moved the InMemoryURLIndex up to the HistoryService as its owner. This was done because ...
9 years, 1 month ago (2011-11-08 04:44:21 UTC) #1
mrossetti
Peter, The area of this CL in which you may have particular interest is in ...
9 years, 1 month ago (2011-11-09 16:03:47 UTC) #2
Peter Kasting
I'm sorry I've not gotten to this. I was unexpectedly OOO several days last week ...
9 years, 1 month ago (2011-11-14 21:17:35 UTC) #3
mrossetti
Thanks for the note Peter. It's no problem — I figured something came up. I ...
9 years, 1 month ago (2011-11-14 21:32:30 UTC) #4
Peter Kasting
LGTM, I didn't think about the implications of the ownership move so I'm trusting it ...
9 years, 1 month ago (2011-11-21 19:07:50 UTC) #5
mrossetti
9 years, 1 month ago (2011-11-21 21:53:25 UTC) #6
Thanks for the review Peter.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
File chrome/browser/history/history.cc (right):

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
chrome/browser/history/history.cc:160: new history::InMemoryURLIndex(profile,
history_dir_));
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: Use |profile_| for consistency.

Done.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
chrome/browser/history/history.cc:162: if (profile) {
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: This conditional is unnecessary given that we DCHECK(profile_) above.

Done.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
File chrome/browser/history/history.h (right):

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
chrome/browser/history/history.h:521: history::InMemoryURLIndex* InMemoryIndex()
const;
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: const mehtods should not return non-const pointers.  Make this method
> non-const.

Done.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
File chrome/browser/history/history_backend.cc (right):

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/hist...
chrome/browser/history/history_backend.cc:213:
bookmark_service_(bookmark_service) {}
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: I normally prefer the braces on separate lines unless the entire
> constructor definition exists on a single line.

Done.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/in_m...
File chrome/browser/history/in_memory_url_index.h (right):

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/in_m...
chrome/browser/history/in_memory_url_index.h:70: explicit
InMemoryURLIndex(Profile* profile,
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: "explicit" no longer needed

Done.

http://codereview.chromium.org/8451009/diff/25002/chrome/browser/history/in_m...
chrome/browser/history/in_memory_url_index.h:195: // register to be notified
when the history database becomes available.
On 2011/11/21 19:07:50, Peter Kasting wrote:
> Nit: register -> registers

Done.

Powered by Google App Engine
This is Rietveld 408576698