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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 if (!item.expected_modification_time().is_null()) { | 208 if (!item.expected_modification_time().is_null()) { |
209 AddHTMLListItem(kModificationTime, UTF16ToUTF8( | 209 AddHTMLListItem(kModificationTime, UTF16ToUTF8( |
210 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), | 210 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), |
211 out); | 211 out); |
212 } | 212 } |
213 break; | 213 break; |
214 case BlobData::Item::TYPE_BLOB: | 214 case BlobData::Item::TYPE_BLOB: |
215 AddHTMLListItem(kType, "blob", out); | 215 AddHTMLListItem(kType, "blob", out); |
216 AddHTMLListItem(kURL, item.url().spec(), out); | 216 AddHTMLListItem(kURL, item.url().spec(), out); |
217 break; | 217 break; |
| 218 case BlobData::Item::TYPE_FILE_FILESYSTEM: |
| 219 AddHTMLListItem(kType, "filesystem", out); |
| 220 AddHTMLListItem(kURL, item.url().spec(), out); |
| 221 if (!item.expected_modification_time().is_null()) { |
| 222 AddHTMLListItem(kModificationTime, UTF16ToUTF8( |
| 223 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), |
| 224 out); |
| 225 } |
| 226 break; |
218 case BlobData::Item::TYPE_UNKNOWN: | 227 case BlobData::Item::TYPE_UNKNOWN: |
219 NOTREACHED(); | 228 NOTREACHED(); |
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 |