OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/webui/local_discovery/local_discovery_ui_handler.h" | 5 #include "chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/local_discovery/privet_device_lister_impl.h" | 10 #include "chrome/browser/local_discovery/privet_device_lister_impl.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 void LocalDiscoveryUIHandler::OnPrivetRegisterDone( | 228 void LocalDiscoveryUIHandler::OnPrivetRegisterDone( |
229 PrivetRegisterOperation* operation, | 229 PrivetRegisterOperation* operation, |
230 const std::string& device_id) { | 230 const std::string& device_id) { |
231 current_register_operation_.reset(); | 231 current_register_operation_.reset(); |
232 current_http_client_.reset(); | 232 current_http_client_.reset(); |
233 | 233 |
234 SendRegisterDone(); | 234 SendRegisterDone(); |
235 } | 235 } |
236 | 236 |
237 void LocalDiscoveryUIHandler::OnConfirmDone( | 237 void LocalDiscoveryUIHandler::OnConfirmDone( |
238 PrivetConfirmApiCallFlow::Status status) { | 238 CloudPrintBaseApiFlow::Status status) { |
239 if (status == PrivetConfirmApiCallFlow::SUCCESS) { | 239 if (status == CloudPrintBaseApiFlow::SUCCESS) { |
240 DLOG(INFO) << "Confirm success."; | |
241 confirm_api_call_flow_.reset(); | 240 confirm_api_call_flow_.reset(); |
242 current_register_operation_->CompleteRegistration(); | 241 current_register_operation_->CompleteRegistration(); |
243 } else { | 242 } else { |
244 // TODO(noamsml): Add detailed error message. | 243 // TODO(noamsml): Add detailed error message. |
245 SendRegisterError(); | 244 SendRegisterError(); |
246 } | 245 } |
247 } | 246 } |
248 | 247 |
249 void LocalDiscoveryUIHandler::DeviceChanged( | 248 void LocalDiscoveryUIHandler::DeviceChanged( |
250 bool added, | 249 bool added, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 371 |
373 confirm_api_call_flow_.reset(); | 372 confirm_api_call_flow_.reset(); |
374 privet_resolution_.reset(); | 373 privet_resolution_.reset(); |
375 cloud_print_account_manager_.reset(); | 374 cloud_print_account_manager_.reset(); |
376 xsrf_token_for_primary_user_.clear(); | 375 xsrf_token_for_primary_user_.clear(); |
377 current_register_user_index_ = 0; | 376 current_register_user_index_ = 0; |
378 current_http_client_.reset(); | 377 current_http_client_.reset(); |
379 } | 378 } |
380 | 379 |
381 } // namespace local_discovery | 380 } // namespace local_discovery |
OLD | NEW |