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

Unified Diff: net/spdy/spdy_io_buffer.h

Issue 10185007: [net] Change order of RequestPriority to natural: higher > lower (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Responded to review Created 8 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: net/spdy/spdy_io_buffer.h
diff --git a/net/spdy/spdy_io_buffer.h b/net/spdy/spdy_io_buffer.h
index e96c946df4788a9087336d34c304a05156c75c4a..6f2ce359908aa26f452eccde7075cfd7cebcd820 100644
--- a/net/spdy/spdy_io_buffer.h
+++ b/net/spdy/spdy_io_buffer.h
@@ -22,10 +22,10 @@ class NET_EXPORT_PRIVATE SpdyIOBuffer {
// Constructor
// |buffer| is the actual data buffer.
// |size| is the size of the data buffer.
- // |priority| is the priority of this buffer. Lower numbers are higher
- // priority.
+ // |priority| is the priority of this buffer.
// |stream| is a pointer to the stream which is managing this buffer.
- SpdyIOBuffer(IOBuffer* buffer, int size, int priority, SpdyStream* stream);
+ SpdyIOBuffer(IOBuffer* buffer, int size, RequestPriority priority,
+ SpdyStream* stream);
SpdyIOBuffer();
~SpdyIOBuffer();
@@ -33,19 +33,19 @@ class NET_EXPORT_PRIVATE SpdyIOBuffer {
DrainableIOBuffer* buffer() const { return buffer_; }
size_t size() const { return buffer_->size(); }
void release();
- int priority() const { return priority_; }
+ RequestPriority priority() const { return priority_; }
const scoped_refptr<SpdyStream>& stream() const { return stream_; }
// Comparison operator to support sorting.
bool operator<(const SpdyIOBuffer& other) const {
if (priority_ != other.priority_)
- return priority_ > other.priority_;
+ return priority_ < other.priority_;
return position_ > other.position_;
}
private:
scoped_refptr<DrainableIOBuffer> buffer_;
- int priority_;
+ RequestPriority priority_;
uint64 position_;
scoped_refptr<SpdyStream> stream_;
static uint64 order_; // Maintains a FIFO order for equal priorities.

Powered by Google App Engine
This is Rietveld 408576698