Chromium Code Reviews| Index: content/browser/loader/global_routing_id.h |
| diff --git a/content/browser/loader/global_routing_id.h b/content/browser/loader/global_routing_id.h |
| index df5f202c22e568612508915e54f9fa4d753d83a9..363e153d5164ba2405dd78e95def41b27e87cc8d 100644 |
| --- a/content/browser/loader/global_routing_id.h |
| +++ b/content/browser/loader/global_routing_id.h |
| @@ -38,6 +38,36 @@ struct GlobalRoutingID { |
| } |
| }; |
| +// Same as GlobalRoutingID except the route_id must be a render frame routing |
|
nasko
2016/01/20 22:22:09
s/render frame/RenderFrameHost/
Charlie Harrison
2016/01/21 18:52:55
Done.
|
| +// id. |
| +struct GlobalFrameRoutingId { |
| + GlobalFrameRoutingId() : child_id(-1), route_id(-1) { |
|
nasko
2016/01/20 22:22:09
s/-1/0/ for child_id.
s/-1/MSG_ROUTING_NONE/ for r
Charlie Harrison
2016/01/21 18:52:55
Done.
|
| + } |
| + |
| + GlobalFrameRoutingId(int child_id, int route_id) |
| + : child_id(child_id), |
| + route_id(route_id) { |
| + } |
| + |
| + // The unique ID of the child process (different from OS's PID). |
| + int child_id; |
| + |
| + // The route ID (unique for each URLRequest source). |
| + int route_id; |
| + |
| + bool operator<(const GlobalFrameRoutingId& other) const { |
| + return std::tie(child_id, route_id) < |
| + std::tie(other.child_id, other.route_id); |
| + } |
| + bool operator==(const GlobalFrameRoutingId& other) const { |
| + return child_id == other.child_id && |
| + route_id == other.route_id; |
| + } |
| + bool operator!=(const GlobalFrameRoutingId& other) const { |
| + return !(*this == other); |
| + } |
| +}; |
| + |
| } // namespace content |
| #endif // CONTENT_BROWSER_LOADER_GLOBAL_ROUTING_ID_H_ |