| 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 "base/values.h" | 5 #include "base/values.h" |
| 6 #include "chrome/browser/local_discovery/cloud_print_base_api_flow.h" | 6 #include "chrome/browser/local_discovery/cloud_print_base_api_flow.h" |
| 7 #include "chrome/browser/local_discovery/privet_confirm_api_flow.h" | 7 #include "chrome/browser/local_discovery/privet_confirm_api_flow.h" |
| 8 #include "chrome/common/cloud_print/cloud_print_constants.h" | 8 #include "chrome/common/cloud_print/cloud_print_constants.h" |
| 9 | 9 |
| 10 namespace local_discovery { | 10 namespace local_discovery { |
| 11 | 11 |
| 12 PrivetConfirmApiCallFlow::PrivetConfirmApiCallFlow( | 12 PrivetConfirmApiCallFlow::PrivetConfirmApiCallFlow( |
| 13 net::URLRequestContextGetter* request_context, | 13 net::URLRequestContextGetter* request_context, |
| 14 OAuth2TokenService* token_service, | 14 OAuth2TokenService* token_service, |
| 15 const std::string& account_id, |
| 15 const GURL& automated_claim_url, | 16 const GURL& automated_claim_url, |
| 16 const ResponseCallback& callback) | 17 const ResponseCallback& callback) |
| 17 : flow_(request_context, | 18 : flow_(request_context, |
| 18 token_service, | 19 token_service, |
| 20 account_id, |
| 19 automated_claim_url, | 21 automated_claim_url, |
| 20 this), | 22 this), |
| 21 callback_(callback) { | 23 callback_(callback) { |
| 22 } | 24 } |
| 23 | 25 |
| 24 PrivetConfirmApiCallFlow::PrivetConfirmApiCallFlow( | 26 PrivetConfirmApiCallFlow::PrivetConfirmApiCallFlow( |
| 25 net::URLRequestContextGetter* request_context, | 27 net::URLRequestContextGetter* request_context, |
| 26 int user_index, | 28 int user_index, |
| 27 const std::string& xsrf_token, | 29 const std::string& xsrf_token, |
| 28 const GURL& automated_claim_url, | 30 const GURL& automated_claim_url, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 59 } | 61 } |
| 60 | 62 |
| 61 if (success) { | 63 if (success) { |
| 62 callback_.Run(CloudPrintBaseApiFlow::SUCCESS); | 64 callback_.Run(CloudPrintBaseApiFlow::SUCCESS); |
| 63 } else { | 65 } else { |
| 64 callback_.Run(CloudPrintBaseApiFlow::ERROR_FROM_SERVER); | 66 callback_.Run(CloudPrintBaseApiFlow::ERROR_FROM_SERVER); |
| 65 } | 67 } |
| 66 } | 68 } |
| 67 | 69 |
| 68 } // namespace local_discovery | 70 } // namespace local_discovery |
| OLD | NEW |