[Downloads/History] Add tab-url and tab-referrer-url to DownloadRow

Also add a README.md file to components/test/data/history explaining how
to generate a history.NN.sql file.

[email protected], [email protected], [email protected]
BUG=602403

Review URL: https://codereview.chromium.org/1875033005

Cr-Commit-Position: refs/heads/master@{#387169}
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 9509f54..db6bc81 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -120,6 +120,8 @@
       const base::FilePath& target_path,
       const std::vector<GURL>& url_chain,
       const GURL& referrer_url,
+      const GURL& tab_url,
+      const GURL& tab_refererr_url,
       const std::string& mime_type,
       const std::string& original_mime_type,
       const base::Time& start_time,
@@ -134,27 +136,11 @@
       DownloadInterruptReason interrupt_reason,
       bool opened,
       const net::BoundNetLog& bound_net_log) override {
-    return new DownloadItemImpl(delegate,
-                                guid,
-                                download_id,
-                                current_path,
-                                target_path,
-                                url_chain,
-                                referrer_url,
-                                mime_type,
-                                original_mime_type,
-                                start_time,
-                                end_time,
-                                etag,
-                                last_modified,
-                                received_bytes,
-                                total_bytes,
-                                hash,
-                                state,
-                                danger_type,
-                                interrupt_reason,
-                                opened,
-                                bound_net_log);
+    return new DownloadItemImpl(
+        delegate, guid, download_id, current_path, target_path, url_chain,
+        referrer_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
+        start_time, end_time, etag, last_modified, received_bytes, total_bytes,
+        hash, state, danger_type, interrupt_reason, opened, bound_net_log);
   }
 
   DownloadItemImpl* CreateActiveItem(
@@ -619,6 +605,8 @@
     const base::FilePath& target_path,
     const std::vector<GURL>& url_chain,
     const GURL& referrer_url,
+    const GURL& tab_url,
+    const GURL& tab_refererr_url,
     const std::string& mime_type,
     const std::string& original_mime_type,
     const base::Time& start_time,
@@ -638,26 +626,10 @@
   }
   DCHECK(!ContainsKey(downloads_by_guid_, guid));
   DownloadItemImpl* item = item_factory_->CreatePersistedItem(
-      this,
-      guid,
-      id,
-      current_path,
-      target_path,
-      url_chain,
-      referrer_url,
-      mime_type,
-      original_mime_type,
-      start_time,
-      end_time,
-      etag,
-      last_modified,
-      received_bytes,
-      total_bytes,
-      hash,
-      state,
-      danger_type,
-      interrupt_reason,
-      opened,
+      this, guid, id, current_path, target_path, url_chain, referrer_url,
+      tab_url, tab_refererr_url, mime_type, original_mime_type, start_time,
+      end_time, etag, last_modified, received_bytes, total_bytes, hash, state,
+      danger_type, interrupt_reason, opened,
       net::BoundNetLog::Make(net_log_, net::NetLog::SOURCE_DOWNLOAD));
   downloads_[id] = item;
   downloads_by_guid_[guid] = item;