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

Unified Diff: content/browser/resource_context.h

Issue 6825038: Create a content::ResourceContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test. Created 9 years, 8 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 | « content/browser/renderer_host/resource_message_filter.cc ('k') | content/browser/resource_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context.h
diff --git a/content/browser/resource_context.h b/content/browser/resource_context.h
new file mode 100644
index 0000000000000000000000000000000000000000..642102063fc1d66b8663ae3809638e8801222209
--- /dev/null
+++ b/content/browser/resource_context.h
@@ -0,0 +1,41 @@
+// 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.
+
+#ifndef CONTENT_BROWSER_RESOURCE_CONTEXT_H_
+#define CONTENT_BROWSER_RESOURCE_CONTEXT_H_
+
+#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
+
+namespace webkit_database {
+class DatabaseTracker;
+} // namespace webkit_database
+
+namespace content {
+
+// ResourceContext contains the relevant context information required for
+// resource loading. It lives on the IO thread, although it is constructed on
+// the UI thread. ResourceContext doesn't own anything it points to, it just
+// holds pointers to relevant objects to resource loading.
+class ResourceContext {
+ public:
+ virtual ~ResourceContext();
+
+ webkit_database::DatabaseTracker* database_tracker() const;
+ void set_database_tracker(webkit_database::DatabaseTracker* tracker);
+
+ protected:
+ ResourceContext();
+
+ private:
+ virtual void EnsureInitialized() const = 0;
+
+ webkit_database::DatabaseTracker* database_tracker_;
+
+ DISALLOW_COPY_AND_ASSIGN(ResourceContext);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_RESOURCE_CONTEXT_H_
« no previous file with comments | « content/browser/renderer_host/resource_message_filter.cc ('k') | content/browser/resource_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698