OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/test/base/testing_profile.h" | 5 #include "chrome/test/base/testing_profile.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 schema_registry_service_ = | 648 schema_registry_service_ = |
649 policy::SchemaRegistryServiceFactory::CreateForContext( | 649 policy::SchemaRegistryServiceFactory::CreateForContext( |
650 this, policy::Schema(), NULL); | 650 this, policy::Schema(), NULL); |
651 CHECK_EQ(schema_registry_service_.get(), | 651 CHECK_EQ(schema_registry_service_.get(), |
652 policy::SchemaRegistryServiceFactory::GetForContext(this)); | 652 policy::SchemaRegistryServiceFactory::GetForContext(this)); |
653 #endif // defined(ENABLE_CONFIGURATION_POLICY) | 653 #endif // defined(ENABLE_CONFIGURATION_POLICY) |
654 | 654 |
655 if (!policy_service_) { | 655 if (!policy_service_) { |
656 #if defined(ENABLE_CONFIGURATION_POLICY) | 656 #if defined(ENABLE_CONFIGURATION_POLICY) |
657 std::vector<policy::ConfigurationPolicyProvider*> providers; | 657 std::vector<policy::ConfigurationPolicyProvider*> providers; |
658 policy_service_.reset(new policy::PolicyServiceImpl( | 658 policy_service_.reset(new policy::PolicyServiceImpl(providers)); |
659 providers, policy::PolicyServiceImpl::PreprocessCallback())); | |
660 #else | 659 #else |
661 policy_service_.reset(new policy::PolicyServiceStub()); | 660 policy_service_.reset(new policy::PolicyServiceStub()); |
662 #endif | 661 #endif |
663 } | 662 } |
664 profile_policy_connector_.reset(new policy::ProfilePolicyConnector()); | 663 profile_policy_connector_.reset(new policy::ProfilePolicyConnector()); |
665 profile_policy_connector_->InitForTesting(policy_service_.Pass()); | 664 profile_policy_connector_->InitForTesting(policy_service_.Pass()); |
666 policy::ProfilePolicyConnectorFactory::GetInstance()->SetServiceForTesting( | 665 policy::ProfilePolicyConnectorFactory::GetInstance()->SetServiceForTesting( |
667 this, profile_policy_connector_.get()); | 666 this, profile_policy_connector_.get()); |
668 CHECK_EQ(profile_policy_connector_.get(), | 667 CHECK_EQ(profile_policy_connector_.get(), |
669 policy::ProfilePolicyConnectorFactory::GetForProfile(this)); | 668 policy::ProfilePolicyConnectorFactory::GetForProfile(this)); |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 path_, | 928 path_, |
930 delegate_, | 929 delegate_, |
931 extension_policy_, | 930 extension_policy_, |
932 pref_service_.Pass(), | 931 pref_service_.Pass(), |
933 incognito_, | 932 incognito_, |
934 guest_session_, | 933 guest_session_, |
935 managed_user_id_, | 934 managed_user_id_, |
936 policy_service_.Pass(), | 935 policy_service_.Pass(), |
937 testing_factories_)); | 936 testing_factories_)); |
938 } | 937 } |
OLD | NEW |