#ifndef CONTENT_PUBLIC_BROWSER_GLOBAL_REQUEST_ID_H_
#define CONTENT_PUBLIC_BROWSER_GLOBAL_REQUEST_ID_H_
namespace content {
struct GlobalRequestID {
GlobalRequestID() : child_id(-1), request_id(-1) {
}
GlobalRequestID(int child_id, int request_id)
: child_id(child_id),
request_id(request_id) {
}
int child_id;
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;
}
bool operator==(const GlobalRequestID& other) const {
return child_id == other.child_id &&
request_id == other.request_id;
}
bool operator!=(const GlobalRequestID& other) const {
return child_id != other.child_id ||
request_id != other.request_id;
}
};
}
#endif