| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/blob/blob_storage_host.h" | 5 #include "content/browser/fileapi/blob_storage_host.h" |
| 6 | 6 |
| 7 #include "base/sequenced_task_runner.h" | 7 #include "base/sequenced_task_runner.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 #include "webkit/browser/blob/blob_data_handle.h" | 10 #include "webkit/browser/blob/blob_data_handle.h" |
| 11 #include "webkit/browser/blob/blob_storage_context.h" | 11 #include "webkit/browser/blob/blob_storage_context.h" |
| 12 | 12 |
| 13 namespace webkit_blob { | 13 using webkit_blob::BlobStorageContext; |
| 14 using webkit_blob::BlobData; |
| 15 |
| 16 namespace content { |
| 14 | 17 |
| 15 BlobStorageHost::BlobStorageHost(BlobStorageContext* context) | 18 BlobStorageHost::BlobStorageHost(BlobStorageContext* context) |
| 16 : context_(context->AsWeakPtr()) { | 19 : context_(context->AsWeakPtr()) { |
| 17 } | 20 } |
| 18 | 21 |
| 19 BlobStorageHost::~BlobStorageHost() { | 22 BlobStorageHost::~BlobStorageHost() { |
| 20 if (!context_.get()) | 23 if (!context_.get()) |
| 21 return; | 24 return; |
| 22 for (std::set<GURL>::iterator iter = public_blob_urls_.begin(); | 25 for (std::set<GURL>::iterator iter = public_blob_urls_.begin(); |
| 23 iter != public_blob_urls_.end(); ++iter) { | 26 iter != public_blob_urls_.end(); ++iter) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 } | 107 } |
| 105 | 108 |
| 106 bool BlobStorageHost::IsBeingBuiltInHost(const std::string& uuid) { | 109 bool BlobStorageHost::IsBeingBuiltInHost(const std::string& uuid) { |
| 107 return IsInUseInHost(uuid) && context_->IsBeingBuilt(uuid); | 110 return IsInUseInHost(uuid) && context_->IsBeingBuilt(uuid); |
| 108 } | 111 } |
| 109 | 112 |
| 110 bool BlobStorageHost::IsUrlRegisteredInHost(const GURL& blob_url) { | 113 bool BlobStorageHost::IsUrlRegisteredInHost(const GURL& blob_url) { |
| 111 return public_blob_urls_.find(blob_url) != public_blob_urls_.end(); | 114 return public_blob_urls_.find(blob_url) != public_blob_urls_.end(); |
| 112 } | 115 } |
| 113 | 116 |
| 114 } // namespace webkit_blob | 117 } // namespace content |
| OLD | NEW |