| OLD | NEW |
| 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/blob/view_blob_internals_job.h" | 5 #include "webkit/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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 #endif | 209 #endif |
| 210 out); | 210 out); |
| 211 if (!item.expected_modification_time.is_null()) { | 211 if (!item.expected_modification_time.is_null()) { |
| 212 AddHTMLListItem(kModificationTime, UTF16ToUTF8( | 212 AddHTMLListItem(kModificationTime, UTF16ToUTF8( |
| 213 TimeFormatFriendlyDateAndTime(item.expected_modification_time)), | 213 TimeFormatFriendlyDateAndTime(item.expected_modification_time)), |
| 214 out); | 214 out); |
| 215 } | 215 } |
| 216 break; | 216 break; |
| 217 case BlobData::TYPE_BLOB: | 217 case BlobData::TYPE_BLOB: |
| 218 AddHTMLListItem(kType, "blob", out); | 218 AddHTMLListItem(kType, "blob", out); |
| 219 AddHTMLListItem(kURL, item.blob_url.spec(), out); | 219 AddHTMLListItem(kURL, item.url.spec(), out); |
| 220 break; |
| 221 case BlobData::TYPE_FILE_FILESYSTEM: |
| 222 AddHTMLListItem(kType, "filesystem", out); |
| 223 AddHTMLListItem(kURL, item.url.spec(), out); |
| 224 if (!item.expected_modification_time.is_null()) { |
| 225 AddHTMLListItem(kModificationTime, UTF16ToUTF8( |
| 226 TimeFormatFriendlyDateAndTime(item.expected_modification_time)), |
| 227 out); |
| 228 } |
| 220 break; | 229 break; |
| 221 } | 230 } |
| 222 if (item.offset) { | 231 if (item.offset) { |
| 223 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber( | 232 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber( |
| 224 static_cast<int64>(item.offset))), out); | 233 static_cast<int64>(item.offset))), out); |
| 225 } | 234 } |
| 226 if (static_cast<int64>(item.length) != -1) { | 235 if (static_cast<int64>(item.length) != -1) { |
| 227 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber( | 236 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber( |
| 228 static_cast<int64>(item.length))), out); | 237 static_cast<int64>(item.length))), out); |
| 229 } | 238 } |
| 230 | 239 |
| 231 if (has_multi_items) | 240 if (has_multi_items) |
| 232 EndHTMLList(out); | 241 EndHTMLList(out); |
| 233 } | 242 } |
| 234 | 243 |
| 235 EndHTMLList(out); | 244 EndHTMLList(out); |
| 236 } | 245 } |
| 237 | 246 |
| 238 } // namespace webkit_blob | 247 } // namespace webkit_blob |
| OLD | NEW |