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 |