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

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

Issue 46303005: Fix chrome upload with content uri (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 WriteParam(m, p.expected_modification_time()); 49 WriteParam(m, p.expected_modification_time());
50 break; 50 break;
51 } 51 }
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 #if defined(OS_ANDROID)
60 case webkit_common::DataElement::TYPE_CONTENT_URL: {
61 WriteParam(m, p.content_url());
62 WriteParam(m, p.offset());
63 WriteParam(m, p.length());
64 WriteParam(m, p.expected_modification_time());
65 break;
66 }
67 #endif
59 default: { 68 default: {
60 DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB); 69 DCHECK(p.type() == webkit_common::DataElement::TYPE_BLOB);
61 WriteParam(m, p.blob_uuid()); 70 WriteParam(m, p.blob_uuid());
62 WriteParam(m, p.offset()); 71 WriteParam(m, p.offset());
63 WriteParam(m, p.length()); 72 WriteParam(m, p.length());
64 break; 73 break;
65 } 74 }
66 } 75 }
67 } 76 }
68 77
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (!ReadParam(m, iter, &offset)) 114 if (!ReadParam(m, iter, &offset))
106 return false; 115 return false;
107 if (!ReadParam(m, iter, &length)) 116 if (!ReadParam(m, iter, &length))
108 return false; 117 return false;
109 if (!ReadParam(m, iter, &expected_modification_time)) 118 if (!ReadParam(m, iter, &expected_modification_time))
110 return false; 119 return false;
111 r->SetToFileSystemUrlRange(file_system_url, offset, length, 120 r->SetToFileSystemUrlRange(file_system_url, offset, length,
112 expected_modification_time); 121 expected_modification_time);
113 break; 122 break;
114 } 123 }
124 #if defined(OS_ANDROID)
125 case webkit_common::DataElement::TYPE_CONTENT_URL: {
126 GURL content_url;
127 uint64 offset, length;
128 base::Time expected_modification_time;
129 if (!ReadParam(m, iter, &content_url))
130 return false;
131 if (!ReadParam(m, iter, &offset))
132 return false;
133 if (!ReadParam(m, iter, &length))
134 return false;
135 if (!ReadParam(m, iter, &expected_modification_time))
136 return false;
137 r->SetToContentUrlRange(content_url, offset, length,
138 expected_modification_time);
kinuko 2013/10/29 02:52:31 nit: indent is off
qinmin 2013/10/29 19:14:21 Done.
139 break;
140 }
141 #endif
115 default: { 142 default: {
116 DCHECK(type == webkit_common::DataElement::TYPE_BLOB); 143 DCHECK(type == webkit_common::DataElement::TYPE_BLOB);
117 std::string blob_uuid; 144 std::string blob_uuid;
118 uint64 offset, length; 145 uint64 offset, length;
119 if (!ReadParam(m, iter, &blob_uuid)) 146 if (!ReadParam(m, iter, &blob_uuid))
120 return false; 147 return false;
121 if (!ReadParam(m, iter, &offset)) 148 if (!ReadParam(m, iter, &offset))
122 return false; 149 return false;
123 if (!ReadParam(m, iter, &length)) 150 if (!ReadParam(m, iter, &length))
124 return false; 151 return false;
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 (*r)->set_identifier(identifier); 316 (*r)->set_identifier(identifier);
290 return true; 317 return true;
291 } 318 }
292 319
293 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log( 320 void ParamTraits<scoped_refptr<webkit_glue::ResourceRequestBody> >::Log(
294 const param_type& p, std::string* l) { 321 const param_type& p, std::string* l) {
295 l->append("<webkit_glue::ResourceRequestBody>"); 322 l->append("<webkit_glue::ResourceRequestBody>");
296 } 323 }
297 324
298 } // namespace IPC 325 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698