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

Unified Diff: content/public/browser/graph/browser_context_configuration.cc

Issue 18796007: Content API changes to integrate base/graph. (Closed) Base URL: marinoni.mon:/usr/local/google/src/chromium/src@base_graph_review
Patch Set: Created 7 years, 5 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/public/browser/graph/browser_context_configuration.cc
diff --git a/content/public/browser/graph/browser_context_configuration.cc b/content/public/browser/graph/browser_context_configuration.cc
new file mode 100644
index 0000000000000000000000000000000000000000..6e8677d0cc34769ef2a7f8c933cd1a3cbb7f0c5e
--- /dev/null
+++ b/content/public/browser/graph/browser_context_configuration.cc
@@ -0,0 +1,55 @@
+// 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/public/browser/graph/browser_context_configuration.h"
+
+#include "content/public/browser/graph/browser_context_dependency_manager.h"
+
+namespace content {
+
+BrowserContextConfiguration::BrowserContextConfiguration(
+ const scoped_refptr<base::SequencedTaskRunner>& runner)
+ : default_configuration_(
+ new graph::KeyedDependencyManagerConfiguration<BrowserContext*>(
+ runner)),
+ off_the_record_configuration_(
+ new graph::KeyedDependencyManagerConfiguration<BrowserContext*>(
+ runner)) {}
+
+BrowserContextConfiguration::~BrowserContextConfiguration() {}
+
+// static
+scoped_ptr<BrowserContextDependencyManager>
+BrowserContextConfiguration::CreateDependencyManager(
+ scoped_ptr<BrowserContextConfiguration> configuration) {
+ return make_scoped_ptr(new BrowserContextDependencyManager(
+ graph::KeyedDependencyManagerConfiguration<BrowserContext*>::
+ CreateKeyedDependencyManager(
+ configuration->default_configuration_.Pass()),
+ graph::KeyedDependencyManagerConfiguration<BrowserContext*>::
+ CreateKeyedDependencyManager(
+ configuration->off_the_record_configuration_.Pass())));
+}
+
+graph::TypeGraphConfiguration*
+BrowserContextConfiguration::default_type_graph_configuration() {
+ return default_configuration_->type_graph_configuration();
+}
+
+graph::TypeGraphConfiguration*
+BrowserContextConfiguration::off_the_record_type_graph_configuration() {
+ return off_the_record_configuration_->type_graph_configuration();
+}
+
+graph::ParameterConfiguration<BrowserContext*>*
+BrowserContextConfiguration::default_parameter_configuration() {
+ return default_configuration_->parameter_configuration();
+}
+
+graph::ParameterConfiguration<BrowserContext*>*
+BrowserContextConfiguration::off_the_record_parameter_configuration() {
+ return off_the_record_configuration_->parameter_configuration();
+}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698