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

Side by Side Diff: chrome/test/base/testing_profile.cc

Issue 1150373002: platformKeys: Add policy and corporate key tagging. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@key_perm
Patch Set: Created 5 years, 6 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 unified diff | Download patch
OLDNEW
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 "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 784
785 if (!policy_service_) { 785 if (!policy_service_) {
786 #if defined(ENABLE_CONFIGURATION_POLICY) 786 #if defined(ENABLE_CONFIGURATION_POLICY)
787 std::vector<policy::ConfigurationPolicyProvider*> providers; 787 std::vector<policy::ConfigurationPolicyProvider*> providers;
788 policy_service_.reset(new policy::PolicyServiceImpl(providers)); 788 policy_service_.reset(new policy::PolicyServiceImpl(providers));
789 #else 789 #else
790 policy_service_.reset(new policy::PolicyServiceStub()); 790 policy_service_.reset(new policy::PolicyServiceStub());
791 #endif 791 #endif
792 } 792 }
793 profile_policy_connector_.reset(new policy::ProfilePolicyConnector()); 793 profile_policy_connector_.reset(new policy::ProfilePolicyConnector());
794 profile_policy_connector_->InitForTesting(policy_service_.Pass()); 794 profile_policy_connector_->InitForTesting(
795 policy_service_.Pass(), nullptr /* no user_cloud_policy_manager */);
795 policy::ProfilePolicyConnectorFactory::GetInstance()->SetServiceForTesting( 796 policy::ProfilePolicyConnectorFactory::GetInstance()->SetServiceForTesting(
796 this, profile_policy_connector_.get()); 797 this, profile_policy_connector_.get());
797 CHECK_EQ(profile_policy_connector_.get(), 798 CHECK_EQ(profile_policy_connector_.get(),
798 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(this)); 799 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(this));
799 } 800 }
800 801
801 PrefService* TestingProfile::GetPrefs() { 802 PrefService* TestingProfile::GetPrefs() {
802 DCHECK(prefs_); 803 DCHECK(prefs_);
803 return prefs_.get(); 804 return prefs_.get();
804 } 805 }
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 #if defined(ENABLE_EXTENSIONS) 1081 #if defined(ENABLE_EXTENSIONS)
1081 extension_policy_, 1082 extension_policy_,
1082 #endif 1083 #endif
1083 pref_service_.Pass(), 1084 pref_service_.Pass(),
1084 original_profile, 1085 original_profile,
1085 guest_session_, 1086 guest_session_,
1086 supervised_user_id_, 1087 supervised_user_id_,
1087 policy_service_.Pass(), 1088 policy_service_.Pass(),
1088 testing_factories_); 1089 testing_factories_);
1089 } 1090 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698