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

Unified Diff: webkit/browser/blob/blob_data_handle.cc

Issue 539143002: Migrate webkit/browser/ to storage/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build Created 6 years, 3 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/browser/blob/blob_data_handle.h ('k') | webkit/browser/blob/blob_storage_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/blob/blob_data_handle.cc
diff --git a/webkit/browser/blob/blob_data_handle.cc b/webkit/browser/blob/blob_data_handle.cc
deleted file mode 100644
index 667228a4ed3bbfb257e5e3b00ae8b208affdf291..0000000000000000000000000000000000000000
--- a/webkit/browser/blob/blob_data_handle.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "webkit/browser/blob/blob_data_handle.h"
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/logging.h"
-#include "base/sequenced_task_runner.h"
-#include "webkit/browser/blob/blob_storage_context.h"
-#include "webkit/common/blob/blob_data.h"
-
-namespace storage {
-
-BlobDataHandle::BlobDataHandleShared::BlobDataHandleShared(
- BlobData* blob_data,
- BlobStorageContext* context,
- base::SequencedTaskRunner* task_runner)
- : blob_data_(blob_data),
- context_(context->AsWeakPtr()) {
- context_->IncrementBlobRefCount(blob_data->uuid());
-}
-
-BlobData* BlobDataHandle::BlobDataHandleShared::data() const {
- return blob_data_.get();
-}
-
-const std::string& BlobDataHandle::BlobDataHandleShared::uuid() const {
- return blob_data_->uuid();
-}
-
-BlobDataHandle::BlobDataHandleShared::~BlobDataHandleShared() {
- if (context_.get())
- context_->DecrementBlobRefCount(blob_data_->uuid());
-}
-
-BlobDataHandle::BlobDataHandle(BlobData* blob_data,
- BlobStorageContext* context,
- base::SequencedTaskRunner* task_runner)
- : io_task_runner_(task_runner),
- shared_(new BlobDataHandleShared(blob_data, context, task_runner)) {
- DCHECK(io_task_runner_.get());
- DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
-}
-
-BlobDataHandle::BlobDataHandle(const BlobDataHandle& other) {
- io_task_runner_ = other.io_task_runner_;
- shared_ = other.shared_;
-}
-
-BlobDataHandle::~BlobDataHandle() {
- BlobDataHandleShared* raw = shared_.get();
- raw->AddRef();
- shared_ = 0;
- io_task_runner_->ReleaseSoon(FROM_HERE, raw);
-}
-
-BlobData* BlobDataHandle::data() const {
- DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
- return shared_->data();
-}
-
-std::string BlobDataHandle::uuid() const {
- return shared_->uuid();
-}
-
-} // namespace storage
« no previous file with comments | « webkit/browser/blob/blob_data_handle.h ('k') | webkit/browser/blob/blob_storage_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698