| Index: storage/browser/blob/view_blob_internals_job.cc
|
| diff --git a/webkit/browser/blob/view_blob_internals_job.cc b/storage/browser/blob/view_blob_internals_job.cc
|
| similarity index 83%
|
| rename from webkit/browser/blob/view_blob_internals_job.cc
|
| rename to storage/browser/blob/view_blob_internals_job.cc
|
| index 86a3a8774c7f8567e4469779bd1fd00bb44c01a0..b36b0446ee0d0834f90ccdec40a26d7b314bbd22 100644
|
| --- a/webkit/browser/blob/view_blob_internals_job.cc
|
| +++ b/storage/browser/blob/view_blob_internals_job.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "webkit/browser/blob/view_blob_internals_job.h"
|
| +#include "storage/browser/blob/view_blob_internals_job.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/compiler_specific.h"
|
| @@ -18,8 +18,8 @@
|
| #include "net/base/escape.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/url_request/url_request.h"
|
| -#include "webkit/browser/blob/blob_storage_context.h"
|
| -#include "webkit/common/blob/blob_data.h"
|
| +#include "storage/browser/blob/blob_storage_context.h"
|
| +#include "storage/common/blob/blob_data.h"
|
|
|
| namespace {
|
|
|
| @@ -87,7 +87,7 @@ void AddHorizontalRule(std::string* out) {
|
|
|
| } // namespace
|
|
|
| -namespace webkit_blob {
|
| +namespace storage {
|
|
|
| ViewBlobInternalsJob::ViewBlobInternalsJob(
|
| net::URLRequest* request,
|
| @@ -150,9 +150,8 @@ void ViewBlobInternalsJob::GenerateHTML(std::string* out) const {
|
| iter != blob_storage_context_->blob_map_.end();
|
| ++iter) {
|
| AddHTMLBoldText(iter->first, out);
|
| - GenerateHTMLForBlobData(*(iter->second.data.get()),
|
| - iter->second.refcount,
|
| - out);
|
| + GenerateHTMLForBlobData(
|
| + *(iter->second.data.get()), iter->second.refcount, out);
|
| }
|
| if (!blob_storage_context_->public_blob_urls_.empty()) {
|
| AddHorizontalRule(out);
|
| @@ -181,8 +180,10 @@ void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data,
|
|
|
| bool has_multi_items = blob_data.items().size() > 1;
|
| if (has_multi_items) {
|
| - AddHTMLListItem(kCount,
|
| - base::UTF16ToUTF8(base::FormatNumber(blob_data.items().size())), out);
|
| + AddHTMLListItem(
|
| + kCount,
|
| + base::UTF16ToUTF8(base::FormatNumber(blob_data.items().size())),
|
| + out);
|
| }
|
|
|
| for (size_t i = 0; i < blob_data.items().size(); ++i) {
|
| @@ -198,25 +199,26 @@ void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data,
|
| break;
|
| case BlobData::Item::TYPE_FILE:
|
| AddHTMLListItem(kType, "file", out);
|
| - AddHTMLListItem(kPath,
|
| - net::EscapeForHTML(item.path().AsUTF8Unsafe()),
|
| - out);
|
| + AddHTMLListItem(
|
| + kPath, net::EscapeForHTML(item.path().AsUTF8Unsafe()), out);
|
| if (!item.expected_modification_time().is_null()) {
|
| - AddHTMLListItem(kModificationTime, base::UTF16ToUTF8(
|
| - TimeFormatFriendlyDateAndTime(item.expected_modification_time())),
|
| - out);
|
| + AddHTMLListItem(kModificationTime,
|
| + base::UTF16ToUTF8(TimeFormatFriendlyDateAndTime(
|
| + item.expected_modification_time())),
|
| + out);
|
| }
|
| break;
|
| case BlobData::Item::TYPE_BLOB:
|
| - NOTREACHED(); // Should be flattened in the storage context.
|
| + NOTREACHED(); // Should be flattened in the storage context.
|
| break;
|
| case BlobData::Item::TYPE_FILE_FILESYSTEM:
|
| AddHTMLListItem(kType, "filesystem", out);
|
| AddHTMLListItem(kURL, item.filesystem_url().spec(), out);
|
| if (!item.expected_modification_time().is_null()) {
|
| - AddHTMLListItem(kModificationTime, base::UTF16ToUTF8(
|
| - TimeFormatFriendlyDateAndTime(item.expected_modification_time())),
|
| - out);
|
| + AddHTMLListItem(kModificationTime,
|
| + base::UTF16ToUTF8(TimeFormatFriendlyDateAndTime(
|
| + item.expected_modification_time())),
|
| + out);
|
| }
|
| break;
|
| case BlobData::Item::TYPE_UNKNOWN:
|
| @@ -224,12 +226,16 @@ void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data,
|
| break;
|
| }
|
| if (item.offset()) {
|
| - AddHTMLListItem(kOffset, base::UTF16ToUTF8(base::FormatNumber(
|
| - static_cast<int64>(item.offset()))), out);
|
| + AddHTMLListItem(kOffset,
|
| + base::UTF16ToUTF8(base::FormatNumber(
|
| + static_cast<int64>(item.offset()))),
|
| + out);
|
| }
|
| if (static_cast<int64>(item.length()) != -1) {
|
| - AddHTMLListItem(kLength, base::UTF16ToUTF8(base::FormatNumber(
|
| - static_cast<int64>(item.length()))), out);
|
| + AddHTMLListItem(kLength,
|
| + base::UTF16ToUTF8(base::FormatNumber(
|
| + static_cast<int64>(item.length()))),
|
| + out);
|
| }
|
|
|
| if (has_multi_items)
|
| @@ -239,4 +245,4 @@ void ViewBlobInternalsJob::GenerateHTMLForBlobData(const BlobData& blob_data,
|
| EndHTMLList(out);
|
| }
|
|
|
| -} // namespace webkit_blob
|
| +} // namespace storage
|
|
|