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

Unified Diff: content/browser/chrome_blob_storage_context.cc

Issue 9558006: Rename content/{common,browser}/file_system to fileapi and move blob stuff into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 10 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
Index: content/browser/chrome_blob_storage_context.cc
diff --git a/content/browser/chrome_blob_storage_context.cc b/content/browser/chrome_blob_storage_context.cc
deleted file mode 100644
index e244fe4a7f079eec4918cb058e20dabef90cab99..0000000000000000000000000000000000000000
--- a/content/browser/chrome_blob_storage_context.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2011 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 "content/browser/chrome_blob_storage_context.h"
-
-#include "base/bind.h"
-#include "content/public/browser/browser_context.h"
-#include "webkit/blob/blob_storage_controller.h"
-
-using base::UserDataAdapter;
-using content::BrowserContext;
-using content::BrowserThread;
-using webkit_blob::BlobStorageController;
-
-static const char* kBlobStorageContextKeyName = "content_blob_storage_context";
-
-ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor(
- BrowserContext* context) {
- if (!context->GetUserData(kBlobStorageContextKeyName)) {
- scoped_refptr<ChromeBlobStorageContext> blob =
- new ChromeBlobStorageContext();
- context->SetUserData(kBlobStorageContextKeyName,
- new UserDataAdapter<ChromeBlobStorageContext>(blob));
- // Check first to avoid memory leak in unittests.
- if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&ChromeBlobStorageContext::InitializeOnIOThread, blob));
- }
- }
-
- return UserDataAdapter<ChromeBlobStorageContext>::Get(
- context, kBlobStorageContextKeyName);
-}
-
-ChromeBlobStorageContext::ChromeBlobStorageContext() {
-}
-
-void ChromeBlobStorageContext::InitializeOnIOThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- controller_.reset(new BlobStorageController());
-}
-
-ChromeBlobStorageContext::~ChromeBlobStorageContext() {
-}
-
-void ChromeBlobStorageContext::DeleteOnCorrectThread() const {
- if (BrowserThread::IsMessageLoopValid(BrowserThread::IO) &&
- !BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::DeleteSoon(BrowserThread::IO, FROM_HERE, this);
- return;
- }
- delete this;
-}

Powered by Google App Engine
This is Rietveld 408576698