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

Side by Side Diff: webkit/browser/blob/view_blob_internals_job.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 "webkit/browser/blob/view_blob_internals_job.h" 5 #include "webkit/browser/blob/view_blob_internals_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 break; 212 break;
213 case BlobData::Item::TYPE_FILE_FILESYSTEM: 213 case BlobData::Item::TYPE_FILE_FILESYSTEM:
214 AddHTMLListItem(kType, "filesystem", out); 214 AddHTMLListItem(kType, "filesystem", out);
215 AddHTMLListItem(kURL, item.filesystem_url().spec(), out); 215 AddHTMLListItem(kURL, item.filesystem_url().spec(), out);
216 if (!item.expected_modification_time().is_null()) { 216 if (!item.expected_modification_time().is_null()) {
217 AddHTMLListItem(kModificationTime, UTF16ToUTF8( 217 AddHTMLListItem(kModificationTime, UTF16ToUTF8(
218 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), 218 TimeFormatFriendlyDateAndTime(item.expected_modification_time())),
219 out); 219 out);
220 } 220 }
221 break; 221 break;
222 #if defined(OS_ANDROID)
223 case BlobData::Item::TYPE_CONTENT_URL:
224 AddHTMLListItem(kType, "content_url", out);
225 AddHTMLListItem(kURL, item.content_url().spec(), out);
226 break;
227 #endif
222 case BlobData::Item::TYPE_UNKNOWN: 228 case BlobData::Item::TYPE_UNKNOWN:
223 NOTREACHED(); 229 NOTREACHED();
224 break; 230 break;
225 } 231 }
226 if (item.offset()) { 232 if (item.offset()) {
227 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber( 233 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber(
228 static_cast<int64>(item.offset()))), out); 234 static_cast<int64>(item.offset()))), out);
229 } 235 }
230 if (static_cast<int64>(item.length()) != -1) { 236 if (static_cast<int64>(item.length()) != -1) {
231 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber( 237 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber(
232 static_cast<int64>(item.length()))), out); 238 static_cast<int64>(item.length()))), out);
233 } 239 }
234 240
235 if (has_multi_items) 241 if (has_multi_items)
236 EndHTMLList(out); 242 EndHTMLList(out);
237 } 243 }
238 244
239 EndHTMLList(out); 245 EndHTMLList(out);
240 } 246 }
241 247
242 } // namespace webkit_blob 248 } // namespace webkit_blob
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698