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

Unified Diff: content/browser/resource_context.cc

Issue 11230028: Split ResourceContext into its own file, and make it compile on iOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | content/browser/resource_context_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context.cc
diff --git a/content/browser/resource_context.cc b/content/browser/resource_context.cc
new file mode 100644
index 0000000000000000000000000000000000000000..56984662c932e2108cfdeb11d63b7f6decbccc50
--- /dev/null
+++ b/content/browser/resource_context.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 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/resource_context_impl.h"
+
+#if !defined(OS_IOS)
+#include "content/browser/renderer_host/resource_dispatcher_host_impl.h"
+#endif
+
+namespace content {
+
+ResourceContext::ResourceContext() {
+#if !defined(OS_IOS)
+ if (ResourceDispatcherHostImpl::Get())
+ ResourceDispatcherHostImpl::Get()->AddResourceContext(this);
+#endif
+}
+
+ResourceContext::~ResourceContext() {
+#if !defined(OS_IOS)
+ ResourceDispatcherHostImpl* rdhi = ResourceDispatcherHostImpl::Get();
+ if (rdhi) {
+ rdhi->CancelRequestsForContext(this);
+ rdhi->RemoveResourceContext(this);
+ }
+#endif
+}
+
+} // namespace content
« no previous file with comments | « no previous file | content/browser/resource_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698