| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_ |
| 7 |
| 8 // Uniquely identifies a URLRequest. |
| 9 struct GlobalRequestID { |
| 10 GlobalRequestID() : child_id(-1), request_id(-1) { |
| 11 } |
| 12 |
| 13 GlobalRequestID(int child_id, int request_id) |
| 14 : child_id(child_id), |
| 15 request_id(request_id) { |
| 16 } |
| 17 |
| 18 // The unique ID of the child process (different from OS's PID). |
| 19 int child_id; |
| 20 |
| 21 // The request ID (unique for the child). |
| 22 int request_id; |
| 23 |
| 24 bool operator<(const GlobalRequestID& other) const { |
| 25 if (child_id == other.child_id) |
| 26 return request_id < other.request_id; |
| 27 return child_id < other.child_id; |
| 28 } |
| 29 }; |
| 30 |
| 31 #endif // CHROME_BROWSER_RENDERER_HOST_GLOBAL_REQUEST_ID_H_ |
| OLD | NEW |