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

Unified Diff: content/browser/download/save_package.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_file_resource_handler.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_package.h
diff --git a/content/browser/download/save_package.h b/content/browser/download/save_package.h
index 8c0620895d403dd781b27f97d2abc2936d380644..5906332f4f742910adbecd92fda02fe7afc08613 100644
--- a/content/browser/download/save_package.h
+++ b/content/browser/download/save_package.h
@@ -15,6 +15,7 @@
#include "base/containers/hash_tables.h"
#include "base/files/file_path.h"
#include "base/gtest_prod_util.h"
+#include "base/id_type.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
@@ -119,7 +120,8 @@ class CONTENT_EXPORT SavePackage
bool canceled() const { return user_canceled_ || disk_error_occurred_; }
bool finished() const { return finished_; }
SavePageType save_type() const { return save_type_; }
- int id() const { return unique_id_; }
+
+ SavePackageId id() const { return unique_id_; }
void GetSaveInfo();
@@ -393,7 +395,7 @@ class CONTENT_EXPORT SavePackage
WaitState wait_state_;
// Unique ID for this SavePackage.
- const int unique_id_;
+ const SavePackageId unique_id_;
// Variables to record errors that happened so we can record them via
// UMA statistics.
« no previous file with comments | « content/browser/download/save_file_resource_handler.cc ('k') | content/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698