OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/browser/graph/browser_context_configuration.h" |
| 6 |
| 7 #include "content/public/browser/graph/browser_context_dependency_manager.h" |
| 8 |
| 9 namespace content { |
| 10 |
| 11 BrowserContextConfiguration::BrowserContextConfiguration( |
| 12 const scoped_refptr<base::SequencedTaskRunner>& runner) |
| 13 : default_configuration_( |
| 14 new graph::KeyedDependencyManagerConfiguration<BrowserContext*>( |
| 15 runner)), |
| 16 off_the_record_configuration_( |
| 17 new graph::KeyedDependencyManagerConfiguration<BrowserContext*>( |
| 18 runner)) {} |
| 19 |
| 20 BrowserContextConfiguration::~BrowserContextConfiguration() {} |
| 21 |
| 22 // static |
| 23 scoped_ptr<BrowserContextDependencyManager> |
| 24 BrowserContextConfiguration::CreateDependencyManager( |
| 25 scoped_ptr<BrowserContextConfiguration> configuration) { |
| 26 return make_scoped_ptr(new BrowserContextDependencyManager( |
| 27 graph::KeyedDependencyManagerConfiguration<BrowserContext*>:: |
| 28 CreateKeyedDependencyManager( |
| 29 configuration->default_configuration_.Pass()), |
| 30 graph::KeyedDependencyManagerConfiguration<BrowserContext*>:: |
| 31 CreateKeyedDependencyManager( |
| 32 configuration->off_the_record_configuration_.Pass()))); |
| 33 } |
| 34 |
| 35 graph::TypeGraphConfiguration* |
| 36 BrowserContextConfiguration::default_type_graph_configuration() { |
| 37 return default_configuration_->type_graph_configuration(); |
| 38 } |
| 39 |
| 40 graph::TypeGraphConfiguration* |
| 41 BrowserContextConfiguration::off_the_record_type_graph_configuration() { |
| 42 return off_the_record_configuration_->type_graph_configuration(); |
| 43 } |
| 44 |
| 45 graph::ParameterConfiguration<BrowserContext*>* |
| 46 BrowserContextConfiguration::default_parameter_configuration() { |
| 47 return default_configuration_->parameter_configuration(); |
| 48 } |
| 49 |
| 50 graph::ParameterConfiguration<BrowserContext*>* |
| 51 BrowserContextConfiguration::off_the_record_parameter_configuration() { |
| 52 return off_the_record_configuration_->parameter_configuration(); |
| 53 } |
| 54 |
| 55 } // namespace content |
OLD | NEW |