OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 case BlobData::TYPE_FILE: | 203 case BlobData::TYPE_FILE: |
204 AddHTMLListItem(kType, "file", out); | 204 AddHTMLListItem(kType, "file", out); |
205 AddHTMLListItem(kPath, | 205 AddHTMLListItem(kPath, |
206 #if defined(OS_WIN) | 206 #if defined(OS_WIN) |
207 EscapeForHTML(WideToUTF8(item.file_path().value())), | 207 EscapeForHTML(WideToUTF8(item.file_path().value())), |
208 #else | 208 #else |
209 EscapeForHTML(item.file_path().value()), | 209 EscapeForHTML(item.file_path().value()), |
210 #endif | 210 #endif |
211 out); | 211 out); |
212 if (!item.expected_modification_time().is_null()) { | 212 if (!item.expected_modification_time().is_null()) { |
213 AddHTMLListItem(kModificationTime, WideToUTF8( | 213 AddHTMLListItem(kModificationTime, UTF16ToUTF8( |
214 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), | 214 TimeFormatFriendlyDateAndTime(item.expected_modification_time())), |
215 out); | 215 out); |
216 } | 216 } |
217 break; | 217 break; |
218 case BlobData::TYPE_BLOB: | 218 case BlobData::TYPE_BLOB: |
219 AddHTMLListItem(kType, "blob", out); | 219 AddHTMLListItem(kType, "blob", out); |
220 AddHTMLListItem(kURL, item.blob_url().spec(), out); | 220 AddHTMLListItem(kURL, item.blob_url().spec(), out); |
221 break; | 221 break; |
222 } | 222 } |
223 if (item.offset()) { | 223 if (item.offset()) { |
224 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber( | 224 AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber( |
225 static_cast<int64>(item.offset()))), out); | 225 static_cast<int64>(item.offset()))), out); |
226 } | 226 } |
227 if (static_cast<int64>(item.length()) != -1) { | 227 if (static_cast<int64>(item.length()) != -1) { |
228 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber( | 228 AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber( |
229 static_cast<int64>(item.length()))), out); | 229 static_cast<int64>(item.length()))), out); |
230 } | 230 } |
231 | 231 |
232 if (has_multi_items) | 232 if (has_multi_items) |
233 EndHTMLList(out); | 233 EndHTMLList(out); |
234 } | 234 } |
235 | 235 |
236 EndHTMLList(out); | 236 EndHTMLList(out); |
237 } | 237 } |
238 | 238 |
239 } // namespace webkit_blob | 239 } // namespace webkit_blob |
OLD | NEW |