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

Side by Side Diff: content/common/resource_messages.cc

Issue 29513003: Cleanup deprecated and no longer needed blob revamp stuff, deadcode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/common/resource_messages.h" 5 #include "content/common/resource_messages.h"
6 6
7 #include "net/base/load_timing_info.h" 7 #include "net/base/load_timing_info.h"
8 #include "net/http/http_response_headers.h" 8 #include "net/http/http_response_headers.h"
9 9
10 namespace IPC { 10 namespace IPC {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 case webkit_common::DataElement::TYPE_FILE_FILESYSTEM: { 52 case webkit_common::DataElement::TYPE_FILE_FILESYSTEM: {
53 WriteParam(m, p.filesystem_url()); 53 WriteParam(m, p.filesystem_url());
54 WriteParam(m, p.offset()); 54 WriteParam(m, p.offset());
55 WriteParam(m, p.length()); 55 WriteParam(m, p.length());
56 WriteParam(m, p.expected_modification_time()); 56 WriteParam(m, p.expected_modification_time());
57 break; 57 break;
58 } 58 }
59 default: { 59 default: {
60 DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB); 60 DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB);
61 WriteParam(m, p.blob_uuid()); 61 WriteParam(m, p.blob_uuid());
62 WriteParam(m, p.blob_url());
63 WriteParam(m, p.offset()); 62 WriteParam(m, p.offset());
64 WriteParam(m, p.length()); 63 WriteParam(m, p.length());
65 break; 64 break;
66 } 65 }
67 } 66 }
68 } 67 }
69 68
70 bool ParamTraits<webkit_common::DataElement>::Read( 69 bool ParamTraits<webkit_common::DataElement>::Read(
71 const Message* m, PickleIterator* iter, param_type* r) { 70 const Message* m, PickleIterator* iter, param_type* r) {
72 int type; 71 int type;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return false; 108 return false;
110 if (!ReadParam(m, iter, &expected_modification_time)) 109 if (!ReadParam(m, iter, &expected_modification_time))
111 return false; 110 return false;
112 r->SetToFileSystemUrlRange(file_system_url, offset, length, 111 r->SetToFileSystemUrlRange(file_system_url, offset, length,
113 expected_modification_time); 112 expected_modification_time);
114 break; 113 break;
115 } 114 }
116 default: { 115 default: {
117 DCHECK(type == webkit_common::DataElement::TYPE_BLOB); 116 DCHECK(type == webkit_common::DataElement::TYPE_BLOB);
118 std::string blob_uuid; 117 std::string blob_uuid;
119 GURL blob_url;
120 uint64 offset, length; 118 uint64 offset, length;
121 if (!ReadParam(m, iter, &blob_uuid)) 119 if (!ReadParam(m, iter, &blob_uuid))
122 return false; 120 return false;
123 if (!ReadParam(m, iter, &blob_url))
124 return false;
125 if (!ReadParam(m, iter, &offset)) 121 if (!ReadParam(m, iter, &offset))
126 return false; 122 return false;
127 if (!ReadParam(m, iter, &length)) 123 if (!ReadParam(m, iter, &length))
128 return false; 124 return false;
129 if (!blob_uuid.empty()) 125 r->SetToBlobRange(blob_uuid, offset, length);
130 r->SetToBlobRange(blob_uuid, offset, length);
131 else
132 r->SetToBlobUrlRange(blob_url, offset, length);
133 break; 126 break;
134 } 127 }
135 } 128 }
136 return true; 129 return true;
137 } 130 }
138 131
139 void ParamTraits<webkit_common::DataElement>::Log( 132 void ParamTraits<webkit_common::DataElement>::Log(
140 const param_type& p, std::string* l) { 133 const param_type& p, std::string* l) {
141 l->append("<webkit_common::DataElement>"); 134 l->append("<webkit_common::DataElement>");
142 } 135 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 (*r)->set_identifier(identifier); 289 (*r)->set_identifier(identifier);
297 return true; 290 return true;
298 } 291 }
299 292
300 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log( 293 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log(
301 const param_type& p, std::string* l) { 294 const param_type& p, std::string* l) {
302 l->append("<webkit_glue::ResourceRequestBody>"); 295 l->append("<webkit_glue::ResourceRequestBody>");
303 } 296 }
304 297
305 } // namespace IPC 298 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/page_state_serialization_unittest.cc ('k') | content/public/renderer/history_item_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698