| Index: chrome/browser/policy/profile_policy_connector.cc
|
| diff --git a/chrome/browser/policy/profile_policy_connector.cc b/chrome/browser/policy/profile_policy_connector.cc
|
| index 12b5b44e65566fd688605f7ba6298f9cdcd9f62b..894c305da7e464818353eaceb9b51125bfaf16d7 100644
|
| --- a/chrome/browser/policy/profile_policy_connector.cc
|
| +++ b/chrome/browser/policy/profile_policy_connector.cc
|
| @@ -131,8 +131,11 @@ void ProfilePolicyConnector::Init(
|
| #endif
|
| }
|
|
|
| -void ProfilePolicyConnector::InitForTesting(scoped_ptr<PolicyService> service) {
|
| +void ProfilePolicyConnector::InitForTesting(
|
| + scoped_ptr<PolicyService> service,
|
| + CloudPolicyManager* user_cloud_policy_manager) {
|
| policy_service_ = service.Pass();
|
| + user_cloud_policy_manager_ = user_cloud_policy_manager;
|
| }
|
|
|
| void ProfilePolicyConnector::Shutdown() {
|
| @@ -153,9 +156,12 @@ bool ProfilePolicyConnector::IsManaged() const {
|
| }
|
|
|
| std::string ProfilePolicyConnector::GetManagementDomain() const {
|
| + LOG(ERROR) << "cloud policy mgr " << user_cloud_policy_manager_;
|
| if (!user_cloud_policy_manager_)
|
| return "";
|
| CloudPolicyStore* store = user_cloud_policy_manager_->core()->store();
|
| + LOG(ERROR) << "store " << (store != nullptr) << " is_managed "
|
| + << (store ? store->is_managed() : false);
|
| if (store && store->is_managed() && store->policy()->has_username())
|
| return gaia::ExtractDomainName(store->policy()->username());
|
| return "";
|
|
|