| 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/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
| 13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 17 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
| 19 #include "components/policy/core/common/cloud/cloud_policy_client_registration_h
elper.h" | 19 #include "components/policy/core/common/cloud/cloud_policy_client_registration_h
elper.h" |
| 20 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" | 20 #include "components/policy/core/common/cloud/user_cloud_policy_manager.h" |
| 21 #include "components/policy/core/common/policy_switches.h" | 21 #include "components/policy/core/common/policy_switches.h" |
| 22 #include "components/policy/proto/device_management_backend.pb.h" |
| 22 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
| 23 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 24 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 24 #include "components/signin/core/browser/signin_manager.h" | 25 #include "components/signin/core/browser/signin_manager.h" |
| 25 #include "net/base/network_change_notifier.h" | 26 #include "net/base/network_change_notifier.h" |
| 26 #include "net/url_request/url_request_context_getter.h" | 27 #include "net/url_request/url_request_context_getter.h" |
| 27 #include "policy/proto/device_management_backend.pb.h" | |
| 28 | 28 |
| 29 namespace em = enterprise_management; | 29 namespace em = enterprise_management; |
| 30 | 30 |
| 31 namespace policy { | 31 namespace policy { |
| 32 | 32 |
| 33 namespace { | 33 namespace { |
| 34 | 34 |
| 35 #if defined(OS_ANDROID) | 35 #if defined(OS_ANDROID) |
| 36 const em::DeviceRegisterRequest::Type kCloudPolicyRegistrationType = | 36 const em::DeviceRegisterRequest::Type kCloudPolicyRegistrationType = |
| 37 em::DeviceRegisterRequest::ANDROID_BROWSER; | 37 em::DeviceRegisterRequest::ANDROID_BROWSER; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 206 |
| 207 void UserPolicySigninService::CancelPendingRegistration() { | 207 void UserPolicySigninService::CancelPendingRegistration() { |
| 208 weak_factory_.InvalidateWeakPtrs(); | 208 weak_factory_.InvalidateWeakPtrs(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 void UserPolicySigninService::OnRegistrationDone() { | 211 void UserPolicySigninService::OnRegistrationDone() { |
| 212 registration_helper_.reset(); | 212 registration_helper_.reset(); |
| 213 } | 213 } |
| 214 | 214 |
| 215 } // namespace policy | 215 } // namespace policy |
| OLD | NEW |