Index: chrome/browser/download/chrome_download_manager_delegate.cc |
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc |
index cffda03ad2b7a856484b3d81265c9f8a7179a5dd..4e5fbce419aaafd1ee86793ff705c76c1ac38fa7 100644 |
--- a/chrome/browser/download/chrome_download_manager_delegate.cc |
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc |
@@ -409,6 +409,12 @@ bool ChromeDownloadManagerDelegate::GenerateFileHash() { |
void ChromeDownloadManagerDelegate::AddItemToPersistentStore( |
DownloadItem* item) { |
+ if (profile_->HasOffTheRecordProfile() && |
+ (profile_ == profile_->GetOffTheRecordProfile())) { |
+ OnItemAddedToPersistentStore( |
+ item->GetId(), download_history_->GetNextFakeDbHandle()); |
+ return; |
+ } |
Randy Smith (Not in Mondays)
2012/07/23 18:19:26
Why not in DownloadHistory? That feels like a cla
|
download_history_->AddEntry(item, |
base::Bind(&ChromeDownloadManagerDelegate::OnItemAddedToPersistentStore, |
base::Unretained(this))); |
@@ -433,6 +439,9 @@ void ChromeDownloadManagerDelegate::RemoveItemFromPersistentStore( |
void ChromeDownloadManagerDelegate::RemoveItemsFromPersistentStoreBetween( |
base::Time remove_begin, |
base::Time remove_end) { |
+ if (profile_->HasOffTheRecordProfile() && |
+ (profile_ == profile_->GetOffTheRecordProfile())) |
+ return; |
download_history_->RemoveEntriesBetween(remove_begin, remove_end); |
} |