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

Unified Diff: chrome/browser/download/download_history.cc

Issue 319703002: Add mime type information to the download database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DownloadUIController_HistoryDownload test failure 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
« no previous file with comments | « no previous file | chrome/browser/download/download_history_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_history.cc
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 112ecac77c61d9c4982dfd6cf82578b423bbec05..6ca2a734cd7af5d40fdcab1c44c803baaff9f387 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -128,6 +128,8 @@ history::DownloadRow GetDownloadRow(
item->GetTargetFilePath(),
item->GetUrlChain(),
item->GetReferrerUrl(),
+ item->GetMimeType(),
+ item->GetOriginalMimeType(),
item->GetStartTime(),
item->GetEndTime(),
item->GetETag(),
@@ -145,7 +147,8 @@ history::DownloadRow GetDownloadRow(
bool ShouldUpdateHistory(const history::DownloadRow* previous,
const history::DownloadRow& current) {
- // Ignore url, referrer, start_time, id, which don't change.
+ // Ignore url, referrer, mime_type, original_mime_type, start_time,
+ // id, db_handle, which don't change.
return ((previous == NULL) ||
(previous->current_path != current.current_path) ||
(previous->target_path != current.target_path) ||
@@ -262,6 +265,8 @@ void DownloadHistory::QueryCallback(scoped_ptr<InfoVector> infos) {
it->target_path,
it->url_chain,
it->referrer_url,
+ it->mime_type,
+ it->original_mime_type,
it->start_time,
it->end_time,
it->etag,
« no previous file with comments | « no previous file | chrome/browser/download/download_history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698