OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/proximity_auth/webui/reachable_phone_flow.h" | 5 #include "components/proximity_auth/webui/reachable_phone_flow.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "components/proximity_auth/cryptauth/cryptauth_client.h" | 13 #include "components/proximity_auth/cryptauth/cryptauth_client.h" |
14 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 14 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" |
15 #include "components/proximity_auth/logging/logging.h" | 15 #include "components/proximity_auth/logging/logging.h" |
16 | 16 |
17 namespace proximity_auth { | 17 namespace proximity_auth { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // The time, in milliseconds, to wait for phones to respond to the CryptAuth | 21 // The time, in milliseconds, to wait for phones to respond to the CryptAuth |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 response.eligible_devices().end(), reachable_phones.begin()); | 83 response.eligible_devices().end(), reachable_phones.begin()); |
84 callback_.Run(reachable_phones); | 84 callback_.Run(reachable_phones); |
85 } | 85 } |
86 | 86 |
87 void ReachablePhoneFlow::OnApiCallError(const std::string& error) { | 87 void ReachablePhoneFlow::OnApiCallError(const std::string& error) { |
88 PA_LOG(ERROR) << "Error making api call: " << error; | 88 PA_LOG(ERROR) << "Error making api call: " << error; |
89 callback_.Run(std::vector<cryptauth::ExternalDeviceInfo>()); | 89 callback_.Run(std::vector<cryptauth::ExternalDeviceInfo>()); |
90 } | 90 } |
91 | 91 |
92 } // namespace proximity_auth | 92 } // namespace proximity_auth |
OLD | NEW |