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

Unified Diff: content/browser/download/save_types.h

Issue 1484093002: Allowing multiple SaveItems to have same URLs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nested-frames-more-involved-fix
Patch Set: Rebasing... Created 5 years 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 | « content/browser/download/save_package.cc ('k') | content/browser/download/save_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_types.h
diff --git a/content/browser/download/save_types.h b/content/browser/download/save_types.h
index 504be2f3e107576dd00783eebe3b4f4d3f77edb3..c7da3bd563f2608e74700f3b5bfeb205653808fe 100644
--- a/content/browser/download/save_types.h
+++ b/content/browser/download/save_types.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
#define CONTENT_BROWSER_DOWNLOAD_SAVE_TYPES_H_
+#include <map>
#include <string>
#include <utility>
#include <vector>
@@ -14,8 +15,9 @@
#include "url/gurl.h"
namespace content {
-typedef std::vector<std::pair<int, base::FilePath> > FinalNameList;
-typedef std::vector<int> SaveIDList;
+
+// Map from save_item_id into final file path.
+typedef std::map<int, base::FilePath> FinalNamesMap;
// This structure is used to handle and deliver some info
// when processing each save item job.
@@ -33,12 +35,25 @@ struct SaveFileCreateInfo {
SAVE_FILE_FROM_FILE
};
+ // Constructor for SAVE_FILE_FROM_DOM and/or SAVE_FILE_FROM_FILE.
SaveFileCreateInfo(const base::FilePath& path,
const GURL& url,
- SaveFileSource save_source,
- int32 save_id);
+ int save_item_id,
+ int save_package_id,
+ int render_process_id,
+ int render_frame_routing_id,
+ SaveFileSource save_source);
- SaveFileCreateInfo();
+ // Constructor for SAVE_FILE_FROM_NET case.
+ SaveFileCreateInfo(const GURL& url,
+ const GURL& final_url,
+ int save_item_id,
+ int save_package_id,
+ int render_process_id,
+ int render_frame_routing_id,
+ int request_id,
+ const std::string& content_disposition,
+ int64 total_bytes);
~SaveFileCreateInfo();
@@ -49,9 +64,8 @@ struct SaveFileCreateInfo {
GURL url;
// Final URL of the saved resource since some URL might be redirected.
GURL final_url;
- // The unique identifier for saving job, assigned at creation by
- // the SaveFileManager for its internal record keeping.
- int save_id;
+ // The unique identifier of SaveItem object associated with this job.
+ int save_item_id;
// ID of SavePackage object.
int save_package_id;
// IDs for looking up the contents we are associated with.
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/browser/download/save_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698