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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_regular.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
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_signin_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_regular.h" 5 #include "chrome/browser/signin/easy_unlock_service_regular.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 dict->SetString("name", device.name); 141 dict->SetString("name", device.name);
142 dict->SetString("psk", b64_psk); 142 dict->SetString("psk", b64_psk);
143 dict->SetString("bluetoothAddress", device.bluetooth_address); 143 dict->SetString("bluetoothAddress", device.bluetooth_address);
144 dict->SetString("permitId", "permit://google.com/easyunlock/v1/" + 144 dict->SetString("permitId", "permit://google.com/easyunlock/v1/" +
145 proximity_auth_client()->GetAccountId()); 145 proximity_auth_client()->GetAccountId());
146 dict->SetString("permitRecord.id", b64_public_key); 146 dict->SetString("permitRecord.id", b64_public_key);
147 dict->SetString("permitRecord.type", "license"); 147 dict->SetString("permitRecord.type", "license");
148 dict->SetString("permitRecord.data", b64_public_key); 148 dict->SetString("permitRecord.data", b64_public_key);
149 149
150 // TODO(tengs): Retrieve the actual BeaconSeeds from the RemoteDevice.
151 std::vector<cryptauth::BeaconSeed> beacon_seeds;
152 std::unique_ptr<base::ListValue> beacon_seed_list(new base::ListValue()); 150 std::unique_ptr<base::ListValue> beacon_seed_list(new base::ListValue());
153 for (const auto& beacon_seed : beacon_seeds) { 151 for (const auto& beacon_seed : device.beacon_seeds) {
154 std::string b64_beacon_seed; 152 std::string b64_beacon_seed;
155 base::Base64UrlEncode(beacon_seed.SerializeAsString(), 153 base::Base64UrlEncode(beacon_seed.SerializeAsString(),
156 base::Base64UrlEncodePolicy::INCLUDE_PADDING, 154 base::Base64UrlEncodePolicy::INCLUDE_PADDING,
157 &b64_beacon_seed); 155 &b64_beacon_seed);
158 beacon_seed_list->AppendString(b64_beacon_seed); 156 beacon_seed_list->AppendString(b64_beacon_seed);
159 } 157 }
160 158
161 std::string serialized_beacon_seeds; 159 std::string serialized_beacon_seeds;
162 JSONStringValueSerializer serializer(&serialized_beacon_seeds); 160 JSONStringValueSerializer serializer(&serialized_beacon_seeds);
163 serializer.Serialize(*beacon_seed_list); 161 serializer.Serialize(*beacon_seed_list);
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 631
634 cryptauth::CryptAuthDeviceManager* 632 cryptauth::CryptAuthDeviceManager*
635 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() { 633 EasyUnlockServiceRegular::GetCryptAuthDeviceManager() {
636 cryptauth::CryptAuthDeviceManager* manager = 634 cryptauth::CryptAuthDeviceManager* manager =
637 ChromeCryptAuthServiceFactory::GetInstance() 635 ChromeCryptAuthServiceFactory::GetInstance()
638 ->GetForBrowserContext(profile()) 636 ->GetForBrowserContext(profile())
639 ->GetCryptAuthDeviceManager(); 637 ->GetCryptAuthDeviceManager();
640 DCHECK(manager); 638 DCHECK(manager);
641 return manager; 639 return manager;
642 } 640 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/easy_unlock_service_signin_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698