summaryrefslogtreecommitdiffstats
path: root/content/browser/mock_resource_context.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 18:58:10 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-15 18:58:10 +0000
commite89b77dfdb077be0254ce8f0ca84ea536ab4d6e7 (patch)
treed5b6744a7feaa6249d049f58d29c42ea74bb7fc2 /content/browser/mock_resource_context.cc
parente6b761eb74e0ac2909afca9e209de1ccdd2eb097 (diff)
downloadchromium_src-e89b77dfdb077be0254ce8f0ca84ea536ab4d6e7.zip
chromium_src-e89b77dfdb077be0254ce8f0ca84ea536ab4d6e7.tar.gz
chromium_src-e89b77dfdb077be0254ce8f0ca84ea536ab4d6e7.tar.bz2
Create a content::ResourceContext.
Each Profile will have a ResourceContext which lives within the ProfileIOData on the IO thread, although it is created on the UI thread (since that's where the ProfileIOData is created). Move webkit_database::DatabaseTracker into ResourceContext and out of ChromeURLRequestContext. Fixed WorkerProcessHost to create its own ResourceMessageFilter that uses a URLRequestContextOverride pointing to its own URLRequestContext, rather than using the default request context. BUG=78596 TEST=existing Review URL: http://codereview.chromium.org/6825038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/mock_resource_context.cc')
-rw-r--r--content/browser/mock_resource_context.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/content/browser/mock_resource_context.cc b/content/browser/mock_resource_context.cc
new file mode 100644
index 0000000..5e5e976
--- /dev/null
+++ b/content/browser/mock_resource_context.cc
@@ -0,0 +1,23 @@
+// 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/mock_resource_context.h"
+
+#include "base/lazy_instance.h"
+
+namespace content {
+
+static base::LazyInstance<MockResourceContext>
+ g_mock_resource_context(base::LINKER_INITIALIZED);
+
+const ResourceContext& MockResourceContext::GetInstance() {
+ return g_mock_resource_context.Get();
+}
+
+MockResourceContext::MockResourceContext() {}
+MockResourceContext::~MockResourceContext() {}
+
+void MockResourceContext::EnsureInitialized() const {}
+
+} // namespace content