Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(386)

Side by Side Diff: chrome/browser/signin/easy_unlock_service_signin_chromeos.cc

Issue 2918933002: [EasyUnlock] Make login work if command line flag is enabled. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 << " psk: " << device.psk; 507 << " psk: " << device.psk;
508 continue; 508 continue;
509 } 509 }
510 cryptauth::RemoteDevice remote_device( 510 cryptauth::RemoteDevice remote_device(
511 account_id.GetUserEmail(), std::string(), decoded_public_key, 511 account_id.GetUserEmail(), std::string(), decoded_public_key,
512 device.bluetooth_address, decoded_psk, decoded_challenge); 512 device.bluetooth_address, decoded_psk, decoded_challenge);
513 513
514 if (!device.serialized_beacon_seeds.empty()) { 514 if (!device.serialized_beacon_seeds.empty()) {
515 PA_LOG(INFO) << "Deserializing BeaconSeeds: " 515 PA_LOG(INFO) << "Deserializing BeaconSeeds: "
516 << device.serialized_beacon_seeds; 516 << device.serialized_beacon_seeds;
517 // TODO(tengs): Assign deserialized BeaconSeeds to the RemoteDevice. 517 remote_device.LoadBeaconSeeds(
518 DeserializeBeaconSeeds(device.serialized_beacon_seeds); 518 DeserializeBeaconSeeds(device.serialized_beacon_seeds));
519 } else { 519 } else {
520 PA_LOG(WARNING) << "No BeaconSeeds were loaded."; 520 PA_LOG(WARNING) << "No BeaconSeeds were loaded.";
521 } 521 }
522 522
523 remote_devices.push_back(remote_device); 523 remote_devices.push_back(remote_device);
524 PA_LOG(INFO) << "Loaded Remote Device:\n" 524 PA_LOG(INFO) << "Loaded Remote Device:\n"
525 << " user id: " << remote_device.user_id << "\n" 525 << " user id: " << remote_device.user_id << "\n"
526 << " name: " << remote_device.name << "\n" 526 << " name: " << remote_device.name << "\n"
527 << " public key" << device.public_key << "\n" 527 << " public key" << device.public_key << "\n"
528 << " bt_addr:" << remote_device.bluetooth_address; 528 << " bt_addr:" << remote_device.bluetooth_address;
529 } 529 }
530 530
531 SetProximityAuthDevices(account_id, remote_devices); 531 SetProximityAuthDevices(account_id, remote_devices);
532 } 532 }
533 533
534 const EasyUnlockServiceSignin::UserData* 534 const EasyUnlockServiceSignin::UserData*
535 EasyUnlockServiceSignin::FindLoadedDataForCurrentUser() const { 535 EasyUnlockServiceSignin::FindLoadedDataForCurrentUser() const {
536 if (!account_id_.is_valid()) 536 if (!account_id_.is_valid())
537 return nullptr; 537 return nullptr;
538 538
539 const auto it = user_data_.find(account_id_); 539 const auto it = user_data_.find(account_id_);
540 if (it == user_data_.end()) 540 if (it == user_data_.end())
541 return nullptr; 541 return nullptr;
542 if (it->second->state != USER_DATA_STATE_LOADED) 542 if (it->second->state != USER_DATA_STATE_LOADED)
543 return nullptr; 543 return nullptr;
544 return it->second.get(); 544 return it->second.get();
545 } 545 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/easy_unlock_service_regular.cc ('k') | components/proximity_auth/proximity_auth_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698