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

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

Issue 11410019: ********** Chromium Blob hacking (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 10 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/http/http_response_headers.h" 7 #include "net/http/http_response_headers.h"
8 #include "webkit/glue/resource_loader_bridge.h" 8 #include "webkit/glue/resource_loader_bridge.h"
9 9
10 namespace IPC { 10 namespace IPC {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 break; 43 break;
44 } 44 }
45 case webkit_base::DataElement::TYPE_FILE: { 45 case webkit_base::DataElement::TYPE_FILE: {
46 WriteParam(m, p.path()); 46 WriteParam(m, p.path());
47 WriteParam(m, p.offset()); 47 WriteParam(m, p.offset());
48 WriteParam(m, p.length()); 48 WriteParam(m, p.length());
49 WriteParam(m, p.expected_modification_time()); 49 WriteParam(m, p.expected_modification_time());
50 break; 50 break;
51 } 51 }
52 case webkit_base::DataElement::TYPE_FILE_FILESYSTEM: { 52 case webkit_base::DataElement::TYPE_FILE_FILESYSTEM: {
53 WriteParam(m, p.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_base::DataElement::TYPE_BLOB); 60 DCHECK(p.type() == webkit_base::DataElement::TYPE_BLOB);
61 WriteParam(m, p.url()); 61 WriteParam(m, p.blob_uuid());
62 WriteParam(m, p.offset()); 62 WriteParam(m, p.offset());
63 WriteParam(m, p.length()); 63 WriteParam(m, p.length());
64 break; 64 break;
65 } 65 }
66 } 66 }
67 } 67 }
68 68
69 bool ParamTraits<webkit_base::DataElement>::Read( 69 bool ParamTraits<webkit_base::DataElement>::Read(
70 const Message* m, PickleIterator* iter, param_type* r) { 70 const Message* m, PickleIterator* iter, param_type* r) {
71 int type; 71 int type;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 if (!ReadParam(m, iter, &length)) 107 if (!ReadParam(m, iter, &length))
108 return false; 108 return false;
109 if (!ReadParam(m, iter, &expected_modification_time)) 109 if (!ReadParam(m, iter, &expected_modification_time))
110 return false; 110 return false;
111 r->SetToFileSystemUrlRange(file_system_url, offset, length, 111 r->SetToFileSystemUrlRange(file_system_url, offset, length,
112 expected_modification_time); 112 expected_modification_time);
113 break; 113 break;
114 } 114 }
115 default: { 115 default: {
116 DCHECK(type == webkit_base::DataElement::TYPE_BLOB); 116 DCHECK(type == webkit_base::DataElement::TYPE_BLOB);
117 GURL blob_url; 117 std::string blob_uuid;
118 uint64 offset, length; 118 uint64 offset, length;
119 if (!ReadParam(m, iter, &blob_url)) 119 if (!ReadParam(m, iter, &blob_uuid))
120 return false; 120 return false;
121 if (!ReadParam(m, iter, &offset)) 121 if (!ReadParam(m, iter, &offset))
122 return false; 122 return false;
123 if (!ReadParam(m, iter, &length)) 123 if (!ReadParam(m, iter, &length))
124 return false; 124 return false;
125 r->SetToBlobUrlRange(blob_url, offset, length); 125 r->SetToBlobRange(blob_uuid, offset, length);
126 break; 126 break;
127 } 127 }
128 } 128 }
129 return true; 129 return true;
130 } 130 }
131 131
132 void ParamTraits<webkit_base::DataElement>::Log( 132 void ParamTraits<webkit_base::DataElement>::Log(
133 const param_type& p, std::string* l) { 133 const param_type& p, std::string* l) {
134 l->append("<webkit_base::DataElement>"); 134 l->append("<webkit_base::DataElement>");
135 } 135 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 (*r)->set_identifier(identifier); 284 (*r)->set_identifier(identifier);
285 return true; 285 return true;
286 } 286 }
287 287
288 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log( 288 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log(
289 const param_type& p, std::string* l) { 289 const param_type& p, std::string* l) {
290 l->append("<webkit_glue::ResourceRequestBody>"); 290 l->append("<webkit_glue::ResourceRequestBody>");
291 } 291 }
292 292
293 } // namespace IPC 293 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/fileapi/webfilewriter_impl.cc ('k') | content/common/webkitplatformsupport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698