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 "storage/browser/blob/view_blob_internals_job.h" | 5 #include "storage/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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 break; | 211 break; |
212 case DataElement::TYPE_FILE_FILESYSTEM: | 212 case DataElement::TYPE_FILE_FILESYSTEM: |
213 AddHTMLListItem(kType, "filesystem", out); | 213 AddHTMLListItem(kType, "filesystem", out); |
214 AddHTMLListItem(kURL, item.filesystem_url().spec(), out); | 214 AddHTMLListItem(kURL, item.filesystem_url().spec(), out); |
215 if (!item.expected_modification_time().is_null()) { | 215 if (!item.expected_modification_time().is_null()) { |
216 AddHTMLListItem(kModificationTime, base::UTF16ToUTF8( | 216 AddHTMLListItem(kModificationTime, base::UTF16ToUTF8( |
217 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), | 217 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), |
218 out); | 218 out); |
219 } | 219 } |
220 break; | 220 break; |
| 221 case DataElement::TYPE_DISK_CACHE_ENTRY: |
| 222 AddHTMLListItem(kType, "disk cache entry", out); |
| 223 AddHTMLListItem(kURL, item.disk_cache_entry()->GetKey(), out); |
| 224 NOTREACHED(); |
| 225 break; |
221 case DataElement::TYPE_UNKNOWN: | 226 case DataElement::TYPE_UNKNOWN: |
222 NOTREACHED(); | 227 NOTREACHED(); |
223 break; | 228 break; |
224 } | 229 } |
225 if (item.GetOffset()) { | 230 if (item.GetOffset()) { |
226 AddHTMLListItem(kOffset, base::UTF16ToUTF8(base::FormatNumber( | 231 AddHTMLListItem(kOffset, base::UTF16ToUTF8(base::FormatNumber( |
227 static_cast<int64>(item.GetOffset()))), out); | 232 static_cast<int64>(item.GetOffset()))), out); |
228 } | 233 } |
229 if (static_cast<int64>(item.GetLength()) != -1) { | 234 if (static_cast<int64>(item.GetLength()) != -1) { |
230 AddHTMLListItem(kLength, base::UTF16ToUTF8(base::FormatNumber( | 235 AddHTMLListItem(kLength, base::UTF16ToUTF8(base::FormatNumber( |
231 static_cast<int64>(item.GetLength()))), out); | 236 static_cast<int64>(item.GetLength()))), out); |
232 } | 237 } |
233 | 238 |
234 if (has_multi_items) | 239 if (has_multi_items) |
235 EndHTMLList(out); | 240 EndHTMLList(out); |
236 } | 241 } |
237 | 242 |
238 EndHTMLList(out); | 243 EndHTMLList(out); |
239 } | 244 } |
240 | 245 |
241 } // namespace storage | 246 } // namespace storage |
OLD | NEW |