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; |
} |