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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2701753003: [WIP] off-main-thread loading
Patch Set: small fix Created 3 years, 8 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
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 46c4968d6b8ae75c365af546b211abf2a136f244..ac737fcc2a2562f2703f559ebe48bba31f10787e 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -8,6 +8,7 @@
#include <utility>
+#include "base/atomic_sequence_num.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/debug/alias.h"
@@ -67,8 +68,8 @@ int MakeRequestID() {
// NOTE: The resource_dispatcher_host also needs probably unique
// request_ids, so they count down from -2 (-1 is a special we're
// screwed value), while the renderer process counts up.
- static int next_request_id = 0;
- return next_request_id++;
+ static base::StaticAtomicSequenceNumber sequence;
+ return sequence.GetNext(); // We start at zero.
}
void CheckSchemeForReferrerPolicy(const ResourceRequest& request) {

Powered by Google App Engine
This is Rietveld 408576698