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

Unified Diff: chrome/browser/autocomplete/history_url_provider.cc

Issue 267019: Add the ability to unload the HistoryBackend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/history_url_provider.cc
===================================================================
--- chrome/browser/autocomplete/history_url_provider.cc (revision 28361)
+++ chrome/browser/autocomplete/history_url_provider.cc (working copy)
@@ -636,13 +636,14 @@
// Pass 1: Get the in-memory URL database, and use it to find and promote
// the inline autocomplete match, if any.
- history::URLDatabase* url_db = history_service->in_memory_database();
+ history::URLDatabase* url_db = history_service->InMemoryDatabase();
// url_db can be NULL if it hasn't finished initializing (or failed to
// initialize). In this case all we can do is fall back on the second
- // pass. Ultimately, we should probably try to ensure the history system
- // starts properly before we get here, as otherwise this can cause
- // inconsistent behavior when the user has just started the browser and
- // tries to type immediately.
+ // pass.
+ //
+ // TODO(pkasting): We should just block here until this loads. Any time
+ // someone unloads the history backend, we'll get inconsistent inline
+ // autocomplete behavior here.
if (url_db) {
DoAutocomplete(NULL, url_db, params.get());
// params->matches now has the matches we should expose to the provider.
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc ('k') | chrome/browser/automation/automation_profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698