| 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/managed/managed_user_creation_controller
_old.h" | 5 #include "chrome/browser/chromeos/login/managed/managed_user_creation_controller
_old.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| 11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "base/sys_info.h" | 12 #include "base/sys_info.h" |
| 13 #include "base/task_runner_util.h" | 13 #include "base/task_runner_util.h" |
| 14 #include "base/threading/sequenced_worker_pool.h" | 14 #include "base/threading/sequenced_worker_pool.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "chrome/browser/chromeos/login/auth/key.h" | |
| 17 #include "chrome/browser/chromeos/login/auth/mount_manager.h" | 16 #include "chrome/browser/chromeos/login/auth/mount_manager.h" |
| 18 #include "chrome/browser/chromeos/login/auth/user_context.h" | |
| 19 #include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h
" | 17 #include "chrome/browser/chromeos/login/managed/locally_managed_user_constants.h
" |
| 20 #include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h
" | 18 #include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h
" |
| 21 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 19 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 22 #include "chrome/browser/chromeos/login/users/user.h" | 20 #include "chrome/browser/chromeos/login/users/user.h" |
| 23 #include "chrome/browser/chromeos/login/users/user_manager.h" | 21 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 24 #include "chrome/browser/lifetime/application_lifetime.h" | 22 #include "chrome/browser/lifetime/application_lifetime.h" |
| 25 #include "chrome/browser/sync/profile_sync_service.h" | 23 #include "chrome/browser/sync/profile_sync_service.h" |
| 26 #include "chrome/browser/sync/profile_sync_service_factory.h" | 24 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 27 #include "chromeos/dbus/dbus_thread_manager.h" | 25 #include "chromeos/dbus/dbus_thread_manager.h" |
| 28 #include "chromeos/dbus/session_manager_client.h" | 26 #include "chromeos/dbus/session_manager_client.h" |
| 27 #include "chromeos/login/auth/key.h" |
| 28 #include "chromeos/login/auth/user_context.h" |
| 29 #include "content/public/browser/browser_thread.h" | 29 #include "content/public/browser/browser_thread.h" |
| 30 #include "content/public/browser/user_metrics.h" | 30 #include "content/public/browser/user_metrics.h" |
| 31 #include "crypto/random.h" | 31 #include "crypto/random.h" |
| 32 #include "google_apis/gaia/google_service_auth_error.h" | 32 #include "google_apis/gaia/google_service_auth_error.h" |
| 33 | 33 |
| 34 namespace chromeos { | 34 namespace chromeos { |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 const int kUserCreationTimeoutSeconds = 30; // 30 seconds. | 38 const int kUserCreationTimeoutSeconds = 30; // 30 seconds. |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 // Assume that new token is valid. It will be automatically invalidated if | 299 // Assume that new token is valid. It will be automatically invalidated if |
| 300 // sync service fails to use it. | 300 // sync service fails to use it. |
| 301 UserManager::Get()->SaveUserOAuthStatus(creation_context_->local_user_id, | 301 UserManager::Get()->SaveUserOAuthStatus(creation_context_->local_user_id, |
| 302 User::OAUTH2_TOKEN_STATUS_VALID); | 302 User::OAUTH2_TOKEN_STATUS_VALID); |
| 303 UserManager::Get()->GetSupervisedUserManager()->CommitCreationTransaction(); | 303 UserManager::Get()->GetSupervisedUserManager()->CommitCreationTransaction(); |
| 304 if (consumer_) | 304 if (consumer_) |
| 305 consumer_->OnCreationSuccess(); | 305 consumer_->OnCreationSuccess(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 } // namespace chromeos | 308 } // namespace chromeos |
| OLD | NEW |