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

Unified Diff: chrome/browser/renderer_host/global_request_id.h

Issue 460108: Implement ResourceQueue, an object that makes it easy to delay starting (Closed)
Patch Set: nitfixing Created 11 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
Index: chrome/browser/renderer_host/global_request_id.h
diff --git a/chrome/browser/renderer_host/global_request_id.h b/chrome/browser/renderer_host/global_request_id.h
new file mode 100644
index 0000000000000000000000000000000000000000..89f8db52172b8e3b2a042cfb2924fa33629d4ef7
--- /dev/null
+++ b/chrome/browser/renderer_host/global_request_id.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_
+#define CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_
+
+// Uniquely identifies a URLRequest.
+struct GlobalRequestID {
+ GlobalRequestID() : child_id(-1), request_id(-1) {
+ }
+
+ GlobalRequestID(int child_id, int request_id)
+ : child_id(child_id),
+ request_id(request_id) {
+ }
+
+ // The unique ID of the child process (different from OS's PID).
+ int child_id;
+
+ // The request ID (unique for the child).
+ int request_id;
+
+ bool operator<(const GlobalRequestID& other) const {
+ if (child_id == other.child_id)
+ return request_id < other.request_id;
+ return child_id < other.child_id;
+ }
+};
+
+#endif // CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_

Powered by Google App Engine
This is Rietveld 408576698