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

Unified Diff: content/browser/download/save_item.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_file_resource_handler.cc ('k') | content/browser/download/save_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_item.h
diff --git a/content/browser/download/save_item.h b/content/browser/download/save_item.h
index d7cbb4f0329ccb29fed9ba970690ec8c1faff064..468b1d238430244096fe3f747a82c2d2139dc27a 100644
--- a/content/browser/download/save_item.h
+++ b/content/browser/download/save_item.h
@@ -50,11 +50,10 @@ class SaveItem {
// Update path for SaveItem, the actual file is renamed on the file thread.
void Rename(const base::FilePath& full_path);
- void SetSaveId(int32 save_id);
-
void SetTotalBytes(int64 total_bytes);
// Accessors.
+ int id() const { return save_item_id_; }
SaveState state() const { return state_; }
const base::FilePath& full_path() const { return full_path_; }
const base::FilePath& file_name() const { return file_name_; }
@@ -62,7 +61,6 @@ class SaveItem {
const Referrer& referrer() const { return referrer_; }
int64 total_bytes() const { return total_bytes_; }
int64 received_bytes() const { return received_bytes_; }
- int32 save_id() const { return save_id_; }
bool has_final_name() const { return has_final_name_; }
bool success() const { return is_success_; }
SaveFileCreateInfo::SaveFileSource save_source() const {
@@ -74,8 +72,8 @@ class SaveItem {
// Internal helper for maintaining consistent received and total sizes.
void UpdateSize(int64 size);
- // Request ID assigned by the ResourceDispatcherHost.
- int32 save_id_;
+ // Unique identifier for this SaveItem instance.
+ const int save_item_id_;
// Full path to the save item file.
base::FilePath full_path_;
« no previous file with comments | « content/browser/download/save_file_resource_handler.cc ('k') | content/browser/download/save_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698