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

Unified Diff: webkit/browser/quota/quota_task.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/quota/quota_task.h ('k') | webkit/browser/quota/quota_temporary_storage_evictor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/quota/quota_task.cc
diff --git a/webkit/browser/quota/quota_task.cc b/webkit/browser/quota/quota_task.cc
deleted file mode 100644
index 98594a9f8e582864c19a1722c4cef58b5c1f2cdc..0000000000000000000000000000000000000000
--- a/webkit/browser/quota/quota_task.cc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 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/quota/quota_task.h"
-
-#include <algorithm>
-#include <functional>
-
-#include "base/bind.h"
-#include "base/location.h"
-#include "base/message_loop/message_loop.h"
-#include "base/message_loop/message_loop_proxy.h"
-#include "base/single_thread_task_runner.h"
-
-using base::TaskRunner;
-
-namespace storage {
-
-// QuotaTask ---------------------------------------------------------------
-
-QuotaTask::~QuotaTask() {
-}
-
-void QuotaTask::Start() {
- DCHECK(observer_);
- observer()->RegisterTask(this);
- Run();
-}
-
-QuotaTask::QuotaTask(QuotaTaskObserver* observer)
- : observer_(observer),
- original_task_runner_(base::MessageLoopProxy::current()),
- delete_scheduled_(false) {
-}
-
-void QuotaTask::CallCompleted() {
- DCHECK(original_task_runner_->BelongsToCurrentThread());
- if (observer_) {
- observer_->UnregisterTask(this);
- Completed();
- }
-}
-
-void QuotaTask::Abort() {
- DCHECK(original_task_runner_->BelongsToCurrentThread());
- observer_ = NULL;
- Aborted();
-}
-
-void QuotaTask::DeleteSoon() {
- DCHECK(original_task_runner_->BelongsToCurrentThread());
- if (delete_scheduled_)
- return;
- delete_scheduled_ = true;
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
-}
-
-// QuotaTaskObserver -------------------------------------------------------
-
-QuotaTaskObserver::~QuotaTaskObserver() {
- std::for_each(running_quota_tasks_.begin(),
- running_quota_tasks_.end(),
- std::mem_fun(&QuotaTask::Abort));
-}
-
-QuotaTaskObserver::QuotaTaskObserver() {
-}
-
-void QuotaTaskObserver::RegisterTask(QuotaTask* task) {
- running_quota_tasks_.insert(task);
-}
-
-void QuotaTaskObserver::UnregisterTask(QuotaTask* task) {
- DCHECK(running_quota_tasks_.find(task) != running_quota_tasks_.end());
- running_quota_tasks_.erase(task);
-}
-
-} // namespace storage
« no previous file with comments | « webkit/browser/quota/quota_task.h ('k') | webkit/browser/quota/quota_temporary_storage_evictor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698