| 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/browser/policy/cloud/user_policy_signin_service.h" | 5 #include "chrome/browser/policy/cloud/user_policy_signin_service.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 if (client_->is_registered()) { | 197 if (client_->is_registered()) { |
| 198 // Client should not be registered yet. | 198 // Client should not be registered yet. |
| 199 NOTREACHED(); | 199 NOTREACHED(); |
| 200 RequestCompleted(); | 200 RequestCompleted(); |
| 201 return; | 201 return; |
| 202 } | 202 } |
| 203 | 203 |
| 204 // Kick off registration of the CloudPolicyClient with our newly minted | 204 // Kick off registration of the CloudPolicyClient with our newly minted |
| 205 // oauth_access_token_. | 205 // oauth_access_token_. |
| 206 client_->Register(em::DeviceRegisterRequest::BROWSER, oauth_access_token_, | 206 client_->Register(em::DeviceRegisterRequest::BROWSER, oauth_access_token_, |
| 207 std::string(), false); | 207 std::string(), false, std::string()); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void CloudPolicyClientRegistrationHelper::OnRegistrationStateChanged( | 210 void CloudPolicyClientRegistrationHelper::OnRegistrationStateChanged( |
| 211 policy::CloudPolicyClient* client) { | 211 policy::CloudPolicyClient* client) { |
| 212 DVLOG(1) << "Client registration succeeded"; | 212 DVLOG(1) << "Client registration succeeded"; |
| 213 DCHECK_EQ(client, client_); | 213 DCHECK_EQ(client, client_); |
| 214 DCHECK(client->is_registered()); | 214 DCHECK(client->is_registered()); |
| 215 RequestCompleted(); | 215 RequestCompleted(); |
| 216 } | 216 } |
| 217 | 217 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 // before UserCloudPolicyManager shuts down the CloudPolicyClient. | 586 // before UserCloudPolicyManager shuts down the CloudPolicyClient. |
| 587 registration_helper_.reset(); | 587 registration_helper_.reset(); |
| 588 StopObserving(); | 588 StopObserving(); |
| 589 } | 589 } |
| 590 | 590 |
| 591 UserCloudPolicyManager* UserPolicySigninService::GetManager() { | 591 UserCloudPolicyManager* UserPolicySigninService::GetManager() { |
| 592 return UserCloudPolicyManagerFactory::GetForProfile(profile_); | 592 return UserCloudPolicyManagerFactory::GetForProfile(profile_); |
| 593 } | 593 } |
| 594 | 594 |
| 595 } // namespace policy | 595 } // namespace policy |
| OLD | NEW |