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 "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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
759 bool TestingProfile::HasOffTheRecordProfile() { | 759 bool TestingProfile::HasOffTheRecordProfile() { |
760 return incognito_profile_.get() != NULL; | 760 return incognito_profile_.get() != NULL; |
761 } | 761 } |
762 | 762 |
763 Profile* TestingProfile::GetOriginalProfile() { | 763 Profile* TestingProfile::GetOriginalProfile() { |
764 if (original_profile_) | 764 if (original_profile_) |
765 return original_profile_; | 765 return original_profile_; |
766 return this; | 766 return this; |
767 } | 767 } |
768 | 768 |
769 void TestingProfile::SetSupervisedUserId(const std::string& id) { | |
770 supervised_user_id_ = id; | |
Bernhard Bauer
2015/04/09 12:15:05
You could change the pref from here :)
Marc Treib
2015/04/09 12:37:27
Done.
| |
771 } | |
772 | |
769 bool TestingProfile::IsSupervised() { | 773 bool TestingProfile::IsSupervised() { |
770 return !supervised_user_id_.empty(); | 774 return !supervised_user_id_.empty(); |
771 } | 775 } |
772 | 776 |
773 bool TestingProfile::IsChild() { | 777 bool TestingProfile::IsChild() { |
774 #if defined(ENABLE_SUPERVISED_USERS) | 778 #if defined(ENABLE_SUPERVISED_USERS) |
775 return supervised_user_id_ == supervised_users::kChildAccountSUID; | 779 return supervised_user_id_ == supervised_users::kChildAccountSUID; |
776 #else | 780 #else |
777 return false; | 781 return false; |
778 #endif | 782 #endif |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1131 #if defined(ENABLE_EXTENSIONS) | 1135 #if defined(ENABLE_EXTENSIONS) |
1132 extension_policy_, | 1136 extension_policy_, |
1133 #endif | 1137 #endif |
1134 pref_service_.Pass(), | 1138 pref_service_.Pass(), |
1135 original_profile, | 1139 original_profile, |
1136 guest_session_, | 1140 guest_session_, |
1137 supervised_user_id_, | 1141 supervised_user_id_, |
1138 policy_service_.Pass(), | 1142 policy_service_.Pass(), |
1139 testing_factories_); | 1143 testing_factories_); |
1140 } | 1144 } |
OLD | NEW |