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

Unified Diff: content/browser/download/save_item.cc

Issue 1529363006: Introducing SavePackageId and SaveItemId as distinct IdType<...>-based types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from Daniel. Created 4 years, 11 months 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_item.h ('k') | content/browser/download/save_package.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_item.cc
diff --git a/content/browser/download/save_item.cc b/content/browser/download/save_item.cc
index 604d659643528166d6c7488391060d3e588b2edd..edea26328044adbc7d319587f0a7956e08b015ab 100644
--- a/content/browser/download/save_item.cc
+++ b/content/browser/download/save_item.cc
@@ -15,10 +15,10 @@ namespace content {
namespace {
-int GetNextSaveItemId() {
- static int g_next_save_item_id = 0;
+SaveItemId GetNextSaveItemId() {
+ static int g_next_save_item_id = 1;
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- return g_next_save_item_id++;
+ return SaveItemId::FromUnsafeValue(g_next_save_item_id++);
}
} // namespace
« no previous file with comments | « content/browser/download/save_item.h ('k') | content/browser/download/save_package.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698