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

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

Issue 2953863002: [CrOS Tether] ProximityAuth WebUI improvement: show the local device's ID. (Closed)
Patch Set: Rebased. 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 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 "chrome/browser/signin/chrome_proximity_auth_client.h" 5 #include "chrome/browser/signin/chrome_proximity_auth_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "base/sys_info.h" 11 #include "base/sys_info.h"
12 #include "base/version.h" 12 #include "base/version.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/browser/cryptauth/chrome_cryptauth_service_factory.h" 14 #include "chrome/browser/cryptauth/chrome_cryptauth_service_factory.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/profiles/profile_window.h" 16 #include "chrome/browser/profiles/profile_window.h"
17 #include "chrome/browser/signin/easy_unlock_service.h" 17 #include "chrome/browser/signin/easy_unlock_service.h"
18 #include "chrome/browser/signin/easy_unlock_service_regular.h" 18 #include "chrome/browser/signin/easy_unlock_service_regular.h"
19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 19 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
20 #include "chrome/browser/signin/signin_manager_factory.h" 20 #include "chrome/browser/signin/signin_manager_factory.h"
21 #include "components/cryptauth/cryptauth_client_impl.h" 21 #include "components/cryptauth/cryptauth_client_impl.h"
22 #include "components/cryptauth/cryptauth_device_manager.h" 22 #include "components/cryptauth/cryptauth_device_manager.h"
23 #include "components/cryptauth/cryptauth_enrollment_manager.h" 23 #include "components/cryptauth/cryptauth_enrollment_manager.h"
24 #include "components/cryptauth/local_device_data_provider.h"
24 #include "components/cryptauth/secure_message_delegate.h" 25 #include "components/cryptauth/secure_message_delegate.h"
25 #include "components/prefs/pref_service.h" 26 #include "components/prefs/pref_service.h"
26 #include "components/proximity_auth/logging/logging.h" 27 #include "components/proximity_auth/logging/logging.h"
27 #include "components/signin/core/browser/profile_oauth2_token_service.h" 28 #include "components/signin/core/browser/profile_oauth2_token_service.h"
28 #include "components/signin/core/browser/signin_manager_base.h" 29 #include "components/signin/core/browser/signin_manager_base.h"
29 #include "components/version_info/version_info.h" 30 #include "components/version_info/version_info.h"
30 31
31 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
32 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h" 33 #include "chrome/browser/chromeos/login/easy_unlock/secure_message_delegate_chro meos.h"
33 #include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h" 34 #include "chrome/browser/signin/easy_unlock_service_signin_chromeos.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 128
128 cryptauth::CryptAuthDeviceManager* 129 cryptauth::CryptAuthDeviceManager*
129 ChromeProximityAuthClient::GetCryptAuthDeviceManager() { 130 ChromeProximityAuthClient::GetCryptAuthDeviceManager() {
130 return GetCryptAuthService()->GetCryptAuthDeviceManager(); 131 return GetCryptAuthService()->GetCryptAuthDeviceManager();
131 } 132 }
132 133
133 cryptauth::CryptAuthService* ChromeProximityAuthClient::GetCryptAuthService() { 134 cryptauth::CryptAuthService* ChromeProximityAuthClient::GetCryptAuthService() {
134 return ChromeCryptAuthServiceFactory::GetInstance()->GetForBrowserContext( 135 return ChromeCryptAuthServiceFactory::GetInstance()->GetForBrowserContext(
135 profile_); 136 profile_);
136 } 137 }
138
139 std::string ChromeProximityAuthClient::GetLocalDevicePublicKey() {
140 cryptauth::LocalDeviceDataProvider provider(GetCryptAuthService());
141 std::string local_public_key;
142 provider.GetLocalDeviceData(&local_public_key, nullptr);
143 return local_public_key;
144 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_proximity_auth_client.h ('k') | components/proximity_auth/mock_proximity_auth_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698