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/signin/easy_unlock_service_signin_chromeos.h" | 5 #include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/base64url.h" | 9 #include "base/base64url.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/sys_info.h" | 15 #include "base/sys_info.h" |
16 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrappe
r.h" | 18 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_challenge_wrappe
r.h" |
19 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" | 19 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" |
20 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.
h" | 20 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager.
h" |
21 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_
factory.h" | 21 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_tpm_key_manager_
factory.h" |
22 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 22 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
23 #include "chrome/browser/signin/easy_unlock_app_manager.h" | 23 #include "chrome/browser/signin/easy_unlock_app_manager.h" |
24 #include "chrome/browser/signin/easy_unlock_metrics.h" | 24 #include "chrome/browser/signin/easy_unlock_metrics.h" |
25 #include "chromeos/login/auth/user_context.h" | 25 #include "chromeos/login/auth/user_context.h" |
26 #include "chromeos/tpm/tpm_token_loader.h" | 26 #include "chromeos/tpm/tpm_token_loader.h" |
| 27 #include "components/cryptauth/remote_device.h" |
27 #include "components/proximity_auth/logging/logging.h" | 28 #include "components/proximity_auth/logging/logging.h" |
28 #include "components/proximity_auth/remote_device.h" | |
29 #include "components/proximity_auth/switches.h" | 29 #include "components/proximity_auth/switches.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 // The maximum allowed backoff interval when waiting for cryptohome to start. | 33 // The maximum allowed backoff interval when waiting for cryptohome to start. |
34 uint32_t kMaxCryptohomeBackoffIntervalMs = 10000u; | 34 uint32_t kMaxCryptohomeBackoffIntervalMs = 10000u; |
35 | 35 |
36 // If the data load fails, the initial interval after which the load will be | 36 // If the data load fails, the initial interval after which the load will be |
37 // retried. Further intervals will exponentially increas by factor 2. | 37 // retried. Further intervals will exponentially increas by factor 2. |
38 uint32_t kInitialCryptohomeBackoffIntervalMs = 200u; | 38 uint32_t kInitialCryptohomeBackoffIntervalMs = 200u; |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 if (!account_id_.is_valid()) | 469 if (!account_id_.is_valid()) |
470 return nullptr; | 470 return nullptr; |
471 | 471 |
472 const auto it = user_data_.find(account_id_); | 472 const auto it = user_data_.find(account_id_); |
473 if (it == user_data_.end()) | 473 if (it == user_data_.end()) |
474 return nullptr; | 474 return nullptr; |
475 if (it->second->state != USER_DATA_STATE_LOADED) | 475 if (it->second->state != USER_DATA_STATE_LOADED) |
476 return nullptr; | 476 return nullptr; |
477 return it->second.get(); | 477 return it->second.get(); |
478 } | 478 } |
OLD | NEW |