diff options
author | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 20:36:13 +0000 |
---|---|---|
committer | rdsmith@chromium.org <rdsmith@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-19 20:36:13 +0000 |
commit | e5107ce3463cf71c72ddab762029c3597937cbee (patch) | |
tree | c0e2ceb8fee7210dd9058adc919b11af6fe2bb18 /content | |
parent | ed34899180b46a71f4f1209b3b7d3aaa2b4636c9 (diff) | |
download | chromium_src-e5107ce3463cf71c72ddab762029c3597937cbee.zip chromium_src-e5107ce3463cf71c72ddab762029c3597937cbee.tar.gz chromium_src-e5107ce3463cf71c72ddab762029c3597937cbee.tar.bz2 |
Some checks to narrow in on duplicate history ids from history DB.
R=benjhayden@chromium.org
BUG=96627
Review URL: http://codereview.chromium.org/7904025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/download/download_manager.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/content/browser/download/download_manager.cc b/content/browser/download/download_manager.cc index 3a2a7ee..f1c52d4 100644 --- a/content/browser/download/download_manager.cc +++ b/content/browser/download/download_manager.cc @@ -848,6 +848,11 @@ void DownloadManager::OnDownloadItemAddedToPersistentStore(int32 download_id, // TODO(rdsmith): Remove after http://crbug.com/85408 resolved. int64 largest_handle = largest_db_handle_in_history_; base::debug::Alias(&largest_handle); + int32 matching_item_download_id + = (ContainsKey(history_downloads_, db_handle) ? + history_downloads_[db_handle]->id() : 0); + base::debug::Alias(&matching_item_download_id); + CHECK(!ContainsKey(history_downloads_, db_handle)); AddDownloadItemToHistory(download, db_handle); |