| Index: content/browser/fileapi/blob_storage_host_impl.cc
|
| diff --git a/content/browser/fileapi/blob_storage_host.cc b/content/browser/fileapi/blob_storage_host_impl.cc
|
| similarity index 75%
|
| rename from content/browser/fileapi/blob_storage_host.cc
|
| rename to content/browser/fileapi/blob_storage_host_impl.cc
|
| index cc51dbb37a7ef7162d6084bdea30e8be514b5aa1..de65a0af9ae3e3497f2b9eed0f30f6109ffefecb 100644
|
| --- a/content/browser/fileapi/blob_storage_host.cc
|
| +++ b/content/browser/fileapi/blob_storage_host_impl.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 "content/browser/fileapi/blob_storage_host.h"
|
| +#include "content/browser/fileapi/blob_storage_host_impl.h"
|
|
|
| #include "base/sequenced_task_runner.h"
|
| #include "base/strings/string_util.h"
|
| @@ -15,11 +15,11 @@ using webkit_blob::BlobData;
|
|
|
| namespace content {
|
|
|
| -BlobStorageHost::BlobStorageHost(BlobStorageContext* context)
|
| +BlobStorageHostImpl::BlobStorageHostImpl(BlobStorageContext* context)
|
| : context_(context->AsWeakPtr()) {
|
| }
|
|
|
| -BlobStorageHost::~BlobStorageHost() {
|
| +BlobStorageHostImpl::~BlobStorageHostImpl() {
|
| if (!context_.get())
|
| return;
|
| for (std::set<GURL>::iterator iter = public_blob_urls_.begin();
|
| @@ -33,7 +33,7 @@ BlobStorageHost::~BlobStorageHost() {
|
| }
|
| }
|
|
|
| -bool BlobStorageHost::StartBuildingBlob(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::StartBuildingBlob(const std::string& uuid) {
|
| if (!context_.get() || uuid.empty() || context_->IsInUse(uuid))
|
| return false;
|
| context_->StartBuildingBlob(uuid);
|
| @@ -41,7 +41,7 @@ bool BlobStorageHost::StartBuildingBlob(const std::string& uuid) {
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::AppendBlobDataItem(
|
| +bool BlobStorageHostImpl::AppendBlobDataItem(
|
| const std::string& uuid, const BlobData::Item& data_item) {
|
| if (!context_.get() || !IsBeingBuiltInHost(uuid))
|
| return false;
|
| @@ -49,7 +49,7 @@ bool BlobStorageHost::AppendBlobDataItem(
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::CancelBuildingBlob(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::CancelBuildingBlob(const std::string& uuid) {
|
| if (!context_.get() || !IsBeingBuiltInHost(uuid))
|
| return false;
|
| blobs_inuse_map_.erase(uuid);
|
| @@ -57,7 +57,7 @@ bool BlobStorageHost::CancelBuildingBlob(const std::string& uuid) {
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::FinishBuildingBlob(
|
| +bool BlobStorageHostImpl::FinishBuildingBlob(
|
| const std::string& uuid, const std::string& content_type) {
|
| if (!context_.get() || !IsBeingBuiltInHost(uuid))
|
| return false;
|
| @@ -65,7 +65,7 @@ bool BlobStorageHost::FinishBuildingBlob(
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::IncrementBlobRefCount(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::IncrementBlobRefCount(const std::string& uuid) {
|
| if (!context_.get() || !context_->IsInUse(uuid) ||
|
| context_->IsBeingBuilt(uuid))
|
| return false;
|
| @@ -74,7 +74,7 @@ bool BlobStorageHost::IncrementBlobRefCount(const std::string& uuid) {
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::DecrementBlobRefCount(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::DecrementBlobRefCount(const std::string& uuid) {
|
| if (!context_.get() || !IsInUseInHost(uuid))
|
| return false;
|
| context_->DecrementBlobRefCount(uuid);
|
| @@ -84,7 +84,7 @@ bool BlobStorageHost::DecrementBlobRefCount(const std::string& uuid) {
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::RegisterPublicBlobURL(
|
| +bool BlobStorageHostImpl::RegisterPublicBlobURL(
|
| const GURL& blob_url, const std::string& uuid) {
|
| if (!context_.get() || !IsInUseInHost(uuid) ||
|
| context_->IsUrlRegistered(blob_url))
|
| @@ -94,7 +94,7 @@ bool BlobStorageHost::RegisterPublicBlobURL(
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::RevokePublicBlobURL(const GURL& blob_url) {
|
| +bool BlobStorageHostImpl::RevokePublicBlobURL(const GURL& blob_url) {
|
| if (!context_.get() || !IsUrlRegisteredInHost(blob_url))
|
| return false;
|
| context_->RevokePublicBlobURL(blob_url);
|
| @@ -102,15 +102,15 @@ bool BlobStorageHost::RevokePublicBlobURL(const GURL& blob_url) {
|
| return true;
|
| }
|
|
|
| -bool BlobStorageHost::IsInUseInHost(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::IsInUseInHost(const std::string& uuid) {
|
| return blobs_inuse_map_.find(uuid) != blobs_inuse_map_.end();
|
| }
|
|
|
| -bool BlobStorageHost::IsBeingBuiltInHost(const std::string& uuid) {
|
| +bool BlobStorageHostImpl::IsBeingBuiltInHost(const std::string& uuid) {
|
| return IsInUseInHost(uuid) && context_->IsBeingBuilt(uuid);
|
| }
|
|
|
| -bool BlobStorageHost::IsUrlRegisteredInHost(const GURL& blob_url) {
|
| +bool BlobStorageHostImpl::IsUrlRegisteredInHost(const GURL& blob_url) {
|
| return public_blob_urls_.find(blob_url) != public_blob_urls_.end();
|
| }
|
|
|
|
|