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

Unified Diff: chrome/browser/history/url_database.cc

Issue 9030031: Move InMemoryURLIndex Caching Operations to FILE Thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Missed a private data swap. Try to fix update phase failure. Created 8 years, 11 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/history/url_database.cc
===================================================================
--- chrome/browser/history/url_database.cc (revision 117518)
+++ chrome/browser/history/url_database.cc (working copy)
@@ -261,13 +261,16 @@
bool URLDatabase::InitURLEnumeratorForSignificant(URLEnumerator* enumerator) {
DCHECK(!enumerator->initialized_);
+ sql::Connection& db(GetDB());
+ if (!db.is_open())
+ return false;
Peter Kasting 2012/01/14 00:12:49 We access GetDB() directly a lot in the rest of th
mrossetti 2012/03/03 05:05:56 Done.
std::string sql("SELECT ");
sql.append(kURLRowFields);
sql.append(" FROM urls WHERE last_visit_time >= ? OR visit_count >= ? OR "
"typed_count >= ?");
- enumerator->statement_.Assign(GetDB().GetUniqueStatement(sql.c_str()));
+ enumerator->statement_.Assign(db.GetUniqueStatement(sql.c_str()));
if (!enumerator->statement_) {
- NOTREACHED() << GetDB().GetErrorMessage();
+ NOTREACHED() << db.GetErrorMessage();
return false;
}
enumerator->statement_.BindInt64(

Powered by Google App Engine
This is Rietveld 408576698