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/extensions/api/networking_private/crypto_verify_impl.h" | 5 #include "chrome/browser/extensions/api/networking_private/crypto_verify_impl.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 if (properties.intermediate_certificates.get()) | 161 if (properties.intermediate_certificates.get()) |
162 intermediate_certificates = *properties.intermediate_certificates; | 162 intermediate_certificates = *properties.intermediate_certificates; |
163 signed_data = properties.signed_data; | 163 signed_data = properties.signed_data; |
164 | 164 |
165 std::vector<std::string> data_parts; | 165 std::vector<std::string> data_parts; |
166 data_parts.push_back(properties.device_ssid); | 166 data_parts.push_back(properties.device_ssid); |
167 data_parts.push_back(properties.device_serial); | 167 data_parts.push_back(properties.device_serial); |
168 data_parts.push_back(properties.device_bssid); | 168 data_parts.push_back(properties.device_bssid); |
169 data_parts.push_back(properties.public_key); | 169 data_parts.push_back(properties.public_key); |
170 data_parts.push_back(properties.nonce); | 170 data_parts.push_back(properties.nonce); |
171 unsigned_data = JoinString(data_parts, ","); | 171 unsigned_data = base::JoinString(data_parts, ","); |
172 | 172 |
173 device_bssid = properties.device_bssid; | 173 device_bssid = properties.device_bssid; |
174 public_key = properties.public_key; | 174 public_key = properties.public_key; |
175 } | 175 } |
176 | 176 |
177 CryptoVerifyImpl::Credentials::~Credentials() { | 177 CryptoVerifyImpl::Credentials::~Credentials() { |
178 } | 178 } |
179 | 179 |
180 CryptoVerifyImpl::CryptoVerifyImpl() { | 180 CryptoVerifyImpl::CryptoVerifyImpl() { |
181 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 181 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 228 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
229 Credentials credentials(verification_properties); | 229 Credentials credentials(verification_properties); |
230 base::PostTaskAndReplyWithResult( | 230 base::PostTaskAndReplyWithResult( |
231 blocking_pool_task_runner_.get(), FROM_HERE, | 231 blocking_pool_task_runner_.get(), FROM_HERE, |
232 base::Bind(&DoVerifyAndEncryptData, credentials, data), | 232 base::Bind(&DoVerifyAndEncryptData, credentials, data), |
233 base::Bind(&VerifyAndEncryptDataCompleted, success_callback, | 233 base::Bind(&VerifyAndEncryptDataCompleted, success_callback, |
234 failure_callback)); | 234 failure_callback)); |
235 } | 235 } |
236 | 236 |
237 } // namespace extensions | 237 } // namespace extensions |
OLD | NEW |