| 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/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" | 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/single_thread_task_runner.h" |
| 12 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 13 #include "chrome/browser/browser_process_platform_part.h" | 14 #include "chrome/browser/browser_process_platform_part.h" |
| 14 #include "chrome/browser/chromeos/login/enrollment/enrollment_uma.h" | 15 #include "chrome/browser/chromeos/login/enrollment/enrollment_uma.h" |
| 15 #include "chrome/browser/chromeos/login/startup_utils.h" | 16 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 17 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 17 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" | 18 #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" |
| 18 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" | 19 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" |
| 19 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" | 20 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" |
| 20 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 21 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 21 #include "chromeos/dbus/dbus_thread_manager.h" | 22 #include "chromeos/dbus/dbus_thread_manager.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 50 } | 51 } |
| 51 | 52 |
| 52 TokenRevoker::~TokenRevoker() { | 53 TokenRevoker::~TokenRevoker() { |
| 53 } | 54 } |
| 54 | 55 |
| 55 void TokenRevoker::Start(const std::string& token) { | 56 void TokenRevoker::Start(const std::string& token) { |
| 56 gaia_fetcher_.StartRevokeOAuth2Token(token); | 57 gaia_fetcher_.StartRevokeOAuth2Token(token); |
| 57 } | 58 } |
| 58 | 59 |
| 59 void TokenRevoker::OnOAuth2RevokeTokenCompleted() { | 60 void TokenRevoker::OnOAuth2RevokeTokenCompleted() { |
| 60 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 61 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); |
| 61 } | 62 } |
| 62 | 63 |
| 63 } // namespace | 64 } // namespace |
| 64 | 65 |
| 65 namespace chromeos { | 66 namespace chromeos { |
| 66 | 67 |
| 67 EnterpriseEnrollmentHelperImpl::EnterpriseEnrollmentHelperImpl( | 68 EnterpriseEnrollmentHelperImpl::EnterpriseEnrollmentHelperImpl( |
| 68 EnrollmentStatusConsumer* status_consumer, | 69 EnrollmentStatusConsumer* status_consumer, |
| 69 const policy::EnrollmentConfig& enrollment_config, | 70 const policy::EnrollmentConfig& enrollment_config, |
| 70 const std::string& enrolling_user_domain) | 71 const std::string& enrolling_user_domain) |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 EnrollmentUMA(sample, enrollment_config_.mode); | 409 EnrollmentUMA(sample, enrollment_config_.mode); |
| 409 } | 410 } |
| 410 | 411 |
| 411 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( | 412 void EnterpriseEnrollmentHelperImpl::OnSigninProfileCleared( |
| 412 const base::Closure& callback) { | 413 const base::Closure& callback) { |
| 413 auth_data_cleared_ = true; | 414 auth_data_cleared_ = true; |
| 414 callback.Run(); | 415 callback.Run(); |
| 415 } | 416 } |
| 416 | 417 |
| 417 } // namespace chromeos | 418 } // namespace chromeos |
| OLD | NEW |