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

Unified Diff: chrome/browser/local_discovery/privetv3_setup_flow.cc

Issue 877613002: Added pairing with Spake SHA224 key exchange. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@brillo1
Patch Set: Sun 01/25/2015 23:51:07.99 Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/privetv3_setup_flow.cc
diff --git a/chrome/browser/local_discovery/privetv3_setup_flow.cc b/chrome/browser/local_discovery/privetv3_setup_flow.cc
index 59feaa093bf5b19cacdff73677da42f6eb8d467d..81c94159e9f8c0fcdc1ddfc5d07d0ca074d4170f 100644
--- a/chrome/browser/local_discovery/privetv3_setup_flow.cc
+++ b/chrome/browser/local_discovery/privetv3_setup_flow.cc
@@ -86,11 +86,15 @@ void PrivetV3SetupFlow::OnCodeConfirmed(bool success) {
void PrivetV3SetupFlow::OnSessionInitialized(
PrivetV3Session::Result result,
const std::vector<PrivetV3Session::PairingType>& types) {
- if (result != PrivetV3Session::Result::STATUS_SUCCESS)
+ if (result != PrivetV3Session::Result::STATUS_SUCCESS ||
+ !std::count(types.begin(), types.end(),
+ PrivetV3Session::PairingType::PAIRING_TYPE_EMBEDDEDCODE)) {
Aleksey Shlyapnikov 2015/01/26 21:47:45 std::count will iterate over all elements, use std
return OnSetupError();
- session_->StartPairing(PrivetV3Session::PairingType::PAIRING_TYPE_PINCODE,
- base::Bind(&PrivetV3SetupFlow::OnPairingStarted,
- weak_ptr_factory_.GetWeakPtr()));
+ }
+ session_->StartPairing(
+ PrivetV3Session::PairingType::PAIRING_TYPE_EMBEDDEDCODE,
+ base::Bind(&PrivetV3SetupFlow::OnPairingStarted,
+ weak_ptr_factory_.GetWeakPtr()));
}
void PrivetV3SetupFlow::OnPairingStarted(PrivetV3Session::Result result) {

Powered by Google App Engine
This is Rietveld 408576698