| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/fileapi/chrome_blob_storage_context.h" | 5 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/guid.h" | 8 #include "base/guid.h" |
| 9 #include "content/public/browser/blob_handle.h" | 9 #include "content/public/browser/blob_handle.h" |
| 10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 const char kBlobStorageContextKeyName[] = "content_blob_storage_context"; | 22 const char kBlobStorageContextKeyName[] = "content_blob_storage_context"; |
| 23 | 23 |
| 24 class BlobHandleImpl : public BlobHandle { | 24 class BlobHandleImpl : public BlobHandle { |
| 25 public: | 25 public: |
| 26 explicit BlobHandleImpl(scoped_ptr<storage::BlobDataHandle> handle) | 26 explicit BlobHandleImpl(scoped_ptr<storage::BlobDataHandle> handle) |
| 27 : handle_(handle.Pass()) { | 27 : handle_(handle.Pass()) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 virtual ~BlobHandleImpl() {} | 30 virtual ~BlobHandleImpl() {} |
| 31 | 31 |
| 32 virtual std::string GetUUID() OVERRIDE { | 32 virtual std::string GetUUID() override { |
| 33 return handle_->uuid(); | 33 return handle_->uuid(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 scoped_ptr<storage::BlobDataHandle> handle_; | 37 scoped_ptr<storage::BlobDataHandle> handle_; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace | 40 } // namespace |
| 41 | 41 |
| 42 ChromeBlobStorageContext::ChromeBlobStorageContext() {} | 42 ChromeBlobStorageContext::ChromeBlobStorageContext() {} |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 void ChromeBlobStorageContext::DeleteOnCorrectThread() const { | 89 void ChromeBlobStorageContext::DeleteOnCorrectThread() const { |
| 90 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) && | 90 if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) && |
| 91 !BrowserThread::CurrentlyOn(BrowserThread::IO)) { | 91 !BrowserThread::CurrentlyOn(BrowserThread::IO)) { |
| 92 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); | 92 BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this); |
| 93 return; | 93 return; |
| 94 } | 94 } |
| 95 delete this; | 95 delete this; |
| 96 } | 96 } |
| 97 | 97 |
| 98 } // namespace content | 98 } // namespace content |
| OLD | NEW |