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

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

Issue 235863023: Eliminate the archived history database and clean up related code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename a few outstanding instances of "archived" to "expired". Created 6 years, 6 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
diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc
index e114afed52007ab3d387648376d700d212ff8bf2..95c11d23fe2bee3a83c5d473a376b3bfed29e5d5 100644
--- a/chrome/browser/history/url_database.cc
+++ b/chrome/browser/history/url_database.cc
@@ -217,9 +217,6 @@ bool URLDatabase::CommitTemporaryURLTable() {
// See the comments in the header file as well as
// HistoryBackend::DeleteAllHistory() for more information on how this works
// and why it does what it does.
- //
- // Note that the main database overrides this to additionally create the
- // supplimentary indices that the archived database doesn't need.
// Swap the url table out and replace it with the temporary one.
if (!GetDB().Execute("DROP TABLE urls")) {
@@ -231,10 +228,8 @@ bool URLDatabase::CommitTemporaryURLTable() {
return false;
}
- // Create the index over URLs. This is needed for the main, in-memory, and
- // archived databases, so we always do it. The supplimentary indices used by
- // the main database are not created here. When deleting all history, they
- // are created by HistoryDatabase::RecreateAllButStarAndURLTables().
+ // Re-create the index over the now permanent URLs table -- this was not there
+ // for the temporary table.
CreateMainURLIndex();
return true;
@@ -617,7 +612,6 @@ bool URLDatabase::CreateURLTable(bool is_temporary) {
}
bool URLDatabase::CreateMainURLIndex() {
- // Index over URLs so we can quickly look up based on URL.
return GetDB().Execute(
"CREATE INDEX IF NOT EXISTS urls_url_index ON urls (url)");
}

Powered by Google App Engine
This is Rietveld 408576698