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

Side by Side Diff: net/base/upload_data.h

Issue 3282003: Support handling blob URL and resolve blob references in upload data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_UPLOAD_DATA_H_ 5 #ifndef NET_BASE_UPLOAD_DATA_H_
6 #define NET_BASE_UPLOAD_DATA_H_ 6 #define NET_BASE_UPLOAD_DATA_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 private: 166 private:
167 friend class base::RefCounted<UploadData>; 167 friend class base::RefCounted<UploadData>;
168 168
169 ~UploadData() {} 169 ~UploadData() {}
170 170
171 std::vector<Element> elements_; 171 std::vector<Element> elements_;
172 int64 identifier_; 172 int64 identifier_;
173 }; 173 };
174 174
175 #if defined(UNIT_TEST)
176 inline bool operator==(const UploadData::Element& a,
177 const UploadData::Element& b) {
178 if (a.type() != b.type())
179 return false;
180 if (a.type() == UploadData::TYPE_BYTES)
181 return a.bytes() == b.bytes();
182 if (a.type() == UploadData::TYPE_FILE) {
183 return a.file_path() == b.file_path() &&
184 a.file_range_offset() == b.file_range_offset() &&
185 a.file_range_length() == b.file_range_length() &&
186 a.expected_file_modification_time() ==
187 b.expected_file_modification_time();
188 }
189 if (a.type() == UploadData::TYPE_BLOB)
190 return a.blob_url() == b.blob_url();
191 return false;
192 }
193
194 inline bool operator!=(const UploadData::Element& a,
195 const UploadData::Element& b) {
196 return !(a == b);
197 }
198 #endif // defined(UNIT_TEST)
199
175 } // namespace net 200 } // namespace net
176 201
177 #endif // NET_BASE_UPLOAD_DATA_H_ 202 #endif // NET_BASE_UPLOAD_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698