summaryrefslogtreecommitdiffstats
path: root/content/browser/streams/stream_context.cc
diff options
context:
space:
mode:
authorzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-11 11:23:25 +0000
committerzork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-11 11:23:25 +0000
commite19a0936b577c524ee26d506c97bd5d48521cce5 (patch)
tree7c2528effbe49016f6291dfc092646fe05f41b11 /content/browser/streams/stream_context.cc
parenteb0e52e386277785069e84e5ab89077e43a011a6 (diff)
downloadchromium_src-e19a0936b577c524ee26d506c97bd5d48521cce5.zip
chromium_src-e19a0936b577c524ee26d506c97bd5d48521cce5.tar.gz
chromium_src-e19a0936b577c524ee26d506c97bd5d48521cce5.tar.bz2
Revert 187230
> Implement the Stream registry in content > > This is the first part of the content side of the Streams api. > See: > https://bugs.webkit.org/show_bug.cgi?id=110194 > https://dvcs.w3.org/hg/streams-api/raw-file/tip/Overview.htm > > BUG=171585 > > > Review URL: https://chromiumcodereview.appspot.com/12335087 TBR=zork@chromium.org Review URL: https://codereview.chromium.org/12611018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187274 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/streams/stream_context.cc')
-rw-r--r--content/browser/streams/stream_context.cc44
1 files changed, 0 insertions, 44 deletions
diff --git a/content/browser/streams/stream_context.cc b/content/browser/streams/stream_context.cc
deleted file mode 100644
index ca77df1..0000000
--- a/content/browser/streams/stream_context.cc
+++ /dev/null
@@ -1,44 +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 "content/browser/streams/stream_context.h"
-
-#include "base/bind.h"
-#include "content/browser/streams/stream_registry.h"
-#include "content/public/browser/browser_context.h"
-
-using base::UserDataAdapter;
-
-namespace {
-const char* kStreamContextKeyName = "content_stream_context";
-}
-
-namespace content {
-
-StreamContext::StreamContext() {}
-
-StreamContext* StreamContext::GetFor(BrowserContext* context) {
- if (!context->GetUserData(kStreamContextKeyName)) {
- scoped_refptr<StreamContext> stream = new StreamContext();
- context->SetUserData(kStreamContextKeyName,
- new UserDataAdapter<StreamContext>(stream));
- // Check first to avoid memory leak in unittests.
- if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
- base::Bind(&StreamContext::InitializeOnIOThread, stream));
- }
- }
-
- return UserDataAdapter<StreamContext>::Get(context, kStreamContextKeyName);
-}
-
-void StreamContext::InitializeOnIOThread() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- registry_.reset(new StreamRegistry());
-}
-
-StreamContext::~StreamContext() {}
-
-} // namespace content