| 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/local_discovery/privetv3_setup_flow.h" | 5 #include "chrome/browser/local_discovery/privetv3_setup_flow.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/local_discovery/gcd_registration_ticket_request.h" | 8 #include "chrome/browser/local_discovery/gcd_registration_ticket_request.h" |
| 9 | 9 |
| 10 namespace local_discovery { | 10 namespace local_discovery { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 base::DictionaryValue message; | 106 base::DictionaryValue message; |
| 107 message.SetString(kTicketJsonKeyName, ticket_id_); | 107 message.SetString(kTicketJsonKeyName, ticket_id_); |
| 108 message.SetString(kUserJsonKeyName, "me"); | 108 message.SetString(kUserJsonKeyName, "me"); |
| 109 session_->SendMessage("/privet/v3/setup/start", message, | 109 session_->SendMessage("/privet/v3/setup/start", message, |
| 110 base::Bind(&PrivetV3SetupFlow::OnSetupMessageSent, | 110 base::Bind(&PrivetV3SetupFlow::OnSetupMessageSent, |
| 111 weak_ptr_factory_.GetWeakPtr())); | 111 weak_ptr_factory_.GetWeakPtr())); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void PrivetV3SetupFlow::OnSetupMessageSent( | 114 void PrivetV3SetupFlow::OnSetupMessageSent( |
| 115 PrivetV3Session::Result result, | 115 PrivetV3Session::Result result, |
| 116 const base::DictionaryValue& responce) { | 116 const base::DictionaryValue& response) { |
| 117 if (result != PrivetV3Session::Result::STATUS_SUCCESS) | 117 if (result != PrivetV3Session::Result::STATUS_SUCCESS) |
| 118 return OnSetupError(); | 118 return OnSetupError(); |
| 119 delegate_->OnSetupDone(); | 119 delegate_->OnSetupDone(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace local_discovery | 122 } // namespace local_discovery |
| OLD | NEW |