diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 23:02:11 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-07 23:02:11 +0000 |
commit | 4b3c95dd199586b4c540800be8cd223e948e5e3f (patch) | |
tree | c97ef865a3c85f09e920d8b1bc4024a56bb8e8cf /net/http/http_response_headers.h | |
parent | d160ec0e875e98829684f040d843e6a292dbb3ba (diff) | |
download | chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.zip chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.tar.gz chromium_src-4b3c95dd199586b4c540800be8cd223e948e5e3f.tar.bz2 |
Start reordering the methods in headers in net/.
This patch also starts reordering some of the cc files to match their
headers. More of both cleanups will be done in future patches.
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6085013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_response_headers.h')
-rw-r--r-- | net/http/http_response_headers.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h index aacd35a..2b556b3 100644 --- a/net/http/http_response_headers.h +++ b/net/http/http_response_headers.h @@ -27,6 +27,16 @@ namespace net { class HttpResponseHeaders : public base::RefCountedThreadSafe<HttpResponseHeaders> { public: + // Persist options. + typedef int PersistOptions; + static const PersistOptions PERSIST_RAW = -1; // Raw, unparsed headers. + static const PersistOptions PERSIST_ALL = 0; // Parsed headers. + static const PersistOptions PERSIST_SANS_COOKIES = 1 << 0; + static const PersistOptions PERSIST_SANS_CHALLENGES = 1 << 1; + static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; + static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; + static const PersistOptions PERSIST_SANS_RANGES = 1 << 4; + // Parses the given raw_headers. raw_headers should be formatted thus: // includes the http status response line, each line is \0-terminated, and // it's terminated by an empty line (ie, 2 \0s in a row). @@ -45,16 +55,6 @@ class HttpResponseHeaders // be passed to the pickle's various Read* methods. HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); - // Persist options. - typedef int PersistOptions; - static const PersistOptions PERSIST_RAW = -1; // Raw, unparsed headers. - static const PersistOptions PERSIST_ALL = 0; // Parsed headers. - static const PersistOptions PERSIST_SANS_COOKIES = 1 << 0; - static const PersistOptions PERSIST_SANS_CHALLENGES = 1 << 1; - static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; - static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; - static const PersistOptions PERSIST_SANS_RANGES = 1 << 4; - // Appends a representation of this object to the given pickle. // The options argument can be a combination of PersistOptions. void Persist(Pickle* pickle, PersistOptions options); @@ -253,6 +253,19 @@ class HttpResponseHeaders typedef base::hash_set<std::string> HeaderSet; + // The members of this structure point into raw_headers_. + struct ParsedHeader { + std::string::const_iterator name_begin; + std::string::const_iterator name_end; + std::string::const_iterator value_begin; + std::string::const_iterator value_end; + + // A header "continuation" contains only a subsequent value for the + // preceding header. (Header values are comma separated.) + bool is_continuation() const { return name_begin == name_end; } + }; + typedef std::vector<ParsedHeader> HeaderList; + HttpResponseHeaders(); ~HttpResponseHeaders(); @@ -319,19 +332,6 @@ class HttpResponseHeaders // Adds the set of content range response headers. static void AddHopContentRangeHeaders(HeaderSet* header_names); - // The members of this structure point into raw_headers_. - struct ParsedHeader { - std::string::const_iterator name_begin; - std::string::const_iterator name_end; - std::string::const_iterator value_begin; - std::string::const_iterator value_end; - - // A header "continuation" contains only a subsequent value for the - // preceding header. (Header values are comma separated.) - bool is_continuation() const { return name_begin == name_end; } - }; - typedef std::vector<ParsedHeader> HeaderList; - // We keep a list of ParsedHeader objects. These tell us where to locate the // header-value pairs within raw_headers_. HeaderList parsed_; |