| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_mobile.h" | 5 #include "chrome/browser/policy/cloud/user_policy_signin_service_mobile.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 UserCloudPolicyManager* policy_manager, | 50 UserCloudPolicyManager* policy_manager, |
| 51 SigninManager* signin_manager, | 51 SigninManager* signin_manager, |
| 52 scoped_refptr<net::URLRequestContextGetter> system_request_context, | 52 scoped_refptr<net::URLRequestContextGetter> system_request_context, |
| 53 ProfileOAuth2TokenService* token_service) | 53 ProfileOAuth2TokenService* token_service) |
| 54 : UserPolicySigninServiceBase(profile, | 54 : UserPolicySigninServiceBase(profile, |
| 55 local_state, | 55 local_state, |
| 56 device_management_service, | 56 device_management_service, |
| 57 policy_manager, | 57 policy_manager, |
| 58 signin_manager, | 58 signin_manager, |
| 59 system_request_context), | 59 system_request_context), |
| 60 weak_factory_(this), | |
| 61 oauth2_token_service_(token_service), | 60 oauth2_token_service_(token_service), |
| 62 profile_prefs_(profile->GetPrefs()) { | 61 profile_prefs_(profile->GetPrefs()), |
| 62 weak_factory_(this) { |
| 63 #if defined(OS_IOS) | 63 #if defined(OS_IOS) |
| 64 // iOS doesn't create this service with the Profile; instead it's created | 64 // iOS doesn't create this service with the Profile; instead it's created |
| 65 // a little bit later. See UserPolicySigninServiceFactory. | 65 // a little bit later. See UserPolicySigninServiceFactory. |
| 66 InitializeOnProfileReady(profile); | 66 InitializeOnProfileReady(profile); |
| 67 #endif | 67 #endif |
| 68 } | 68 } |
| 69 | 69 |
| 70 UserPolicySigninService::~UserPolicySigninService() {} | 70 UserPolicySigninService::~UserPolicySigninService() {} |
| 71 | 71 |
| 72 void UserPolicySigninService::RegisterForPolicy( | 72 void UserPolicySigninService::RegisterForPolicy( |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 | 214 |
| 215 void UserPolicySigninService::CancelPendingRegistration() { | 215 void UserPolicySigninService::CancelPendingRegistration() { |
| 216 weak_factory_.InvalidateWeakPtrs(); | 216 weak_factory_.InvalidateWeakPtrs(); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void UserPolicySigninService::OnRegistrationDone() { | 219 void UserPolicySigninService::OnRegistrationDone() { |
| 220 registration_helper_.reset(); | 220 registration_helper_.reset(); |
| 221 } | 221 } |
| 222 | 222 |
| 223 } // namespace policy | 223 } // namespace policy |
| OLD | NEW |