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

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

Issue 1492283004: ABANDONED CL: Introducing a compile-time-safe SavePackageId type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@type-safe-id-base
Patch Set: 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..136efd296dc891bf7e63143687df79cc0f2f98c2 100644
--- a/content/browser/download/save_types.h
+++ b/content/browser/download/save_types.h
@@ -11,9 +11,14 @@
#include "base/basictypes.h"
#include "base/files/file_path.h"
+#include "base/id_type.h"
#include "url/gurl.h"
namespace content {
+
+class SavePackage;
+using SavePackageId = base::IdType<SavePackage, int, 0>;
+
typedef std::vector<std::pair<int, base::FilePath> > FinalNameList;
typedef std::vector<int> SaveIDList;
@@ -53,7 +58,7 @@ struct SaveFileCreateInfo {
// the SaveFileManager for its internal record keeping.
int save_id;
// ID of SavePackage object.
- int save_package_id;
+ SavePackageId save_package_id;
// IDs for looking up the contents we are associated with.
int render_process_id;
int render_frame_routing_id;
« 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