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

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

Issue 7793003: Revert 98656 - Make a new integer field in sql::MetaTable (a per-profile db) containing a counter... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « chrome/browser/history/download_database.h ('k') | chrome/browser/history/history.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/download_database.cc
===================================================================
--- chrome/browser/history/download_database.cc (revision 98659)
+++ chrome/browser/history/download_database.cc (working copy)
@@ -52,14 +52,9 @@
#endif
-// Key in the meta_table containing the next id to use for a new download in
-// this profile.
-static const char kNextDownloadId[] = "next_download_id";
-
} // namespace
-DownloadDatabase::DownloadDatabase()
- : next_id_(0) {
+DownloadDatabase::DownloadDatabase() {
}
DownloadDatabase::~DownloadDatabase() {
@@ -78,8 +73,6 @@
"state INTEGER NOT NULL)"))
return false;
}
- meta_table_.Init(&GetDB(), 0, 0);
- meta_table_.GetValue(kNextDownloadId, &next_id_);
return true;
}
@@ -168,12 +161,8 @@
statement.BindInt64(4, info.total_bytes);
statement.BindInt(5, info.state);
- if (statement.Run()) {
- int64 db_handle = GetDB().GetLastInsertRowId();
- // TODO(benjhayden) if(info.id>next_id_){setvalue;next_id_=info.id;}
- meta_table_.SetValue(kNextDownloadId, ++next_id_);
- return db_handle;
- }
+ if (statement.Run())
+ return GetDB().GetLastInsertRowId();
return 0;
}
« no previous file with comments | « chrome/browser/history/download_database.h ('k') | chrome/browser/history/history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698