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

Unified Diff: net/base/upload_data.h

Issue 52028: Net module changes to support caching responses to a POST request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « no previous file | net/http/http_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/upload_data.h
===================================================================
--- net/base/upload_data.h (revision 12361)
+++ net/base/upload_data.h (working copy)
@@ -14,7 +14,7 @@
class UploadData : public base::RefCounted<UploadData> {
public:
- UploadData() {}
+ UploadData() : identifier_(0) {}
enum Type {
TYPE_BYTES,
@@ -91,8 +91,19 @@
elements_ = elements;
}
+ void swap_elements(std::vector<Element>* elements) {
+ elements_.swap(*elements);
+ }
+
+ // Identifies a particular upload instance, which is used by the cache to
+ // formulate a cache key. This value should be unique across browser
+ // sessions. A value of 0 is used to indicate an unspecified identifier.
+ void set_identifier(int64 id) { identifier_ = id; }
+ int64 identifier() const { return identifier_; }
+
private:
- std::vector<Element> elements_;
+ std::vector<Element> elements_;
+ int64 identifier_;
};
} // namespace net
« no previous file with comments | « no previous file | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698