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

Unified Diff: webkit/blob/view_blob_internals_job.cc

Issue 10827414: Factor out common Element struct from BlobData and ResourceRequestBody (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: webkit/common -> webkit/base Created 8 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/blob/blob_url_request_job.cc ('k') | webkit/blob/webkit_blob.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/blob/view_blob_internals_job.cc
diff --git a/webkit/blob/view_blob_internals_job.cc b/webkit/blob/view_blob_internals_job.cc
index e5eb6aa8729b2cc91516ec504157d61ac304abb2..03029efd283cc8d85bb2feb2c0a2ee972eacdb6a 100644
--- a/webkit/blob/view_blob_internals_job.cc
+++ b/webkit/blob/view_blob_internals_job.cc
@@ -194,38 +194,36 @@ void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data,
}
const BlobData::Item& item = blob_data.items().at(i);
- switch (item.type) {
- case BlobData::TYPE_DATA:
- case BlobData::TYPE_DATA_EXTERNAL:
+ switch (item.type()) {
+ case BlobData::Item::TYPE_BYTES:
AddHTMLListItem(kType, "data", out);
break;
- case BlobData::TYPE_FILE:
+ case BlobData::Item::TYPE_FILE:
AddHTMLListItem(kType, "file", out);
AddHTMLListItem(kPath,
-#if defined(OS_WIN)
- net::EscapeForHTML(WideToUTF8(item.file_path.value())),
-#else
- net::EscapeForHTML(item.file_path.value()),
-#endif
+ net::EscapeForHTML(item.path().AsUTF8Unsafe()),
out);
- if (!item.expected_modification_time.is_null()) {
+ if (!item.expected_modification_time().is_null()) {
AddHTMLListItem(kModificationTime, UTF16ToUTF8(
- TimeFormatFriendlyDateAndTime(item.expected_modification_time)),
+ TimeFormatFriendlyDateAndTime(item.expected_modification_time())),
out);
}
break;
- case BlobData::TYPE_BLOB:
+ case BlobData::Item::TYPE_BLOB:
AddHTMLListItem(kType, "blob", out);
- AddHTMLListItem(kURL, item.blob_url.spec(), out);
+ AddHTMLListItem(kURL, item.url().spec(), out);
+ break;
+ case BlobData::Item::TYPE_UNKNOWN:
+ NOTREACHED();
break;
}
- if (item.offset) {
+ if (item.offset()) {
AddHTMLListItem(kOffset, UTF16ToUTF8(base::FormatNumber(
- static_cast<int64>(item.offset))), out);
+ static_cast<int64>(item.offset()))), out);
}
- if (static_cast<int64>(item.length) != -1) {
+ if (static_cast<int64>(item.length()) != -1) {
AddHTMLListItem(kLength, UTF16ToUTF8(base::FormatNumber(
- static_cast<int64>(item.length))), out);
+ static_cast<int64>(item.length()))), out);
}
if (has_multi_items)
« no previous file with comments | « webkit/blob/blob_url_request_job.cc ('k') | webkit/blob/webkit_blob.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698