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 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ |
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/local_discovery/gcd_api_flow.h" | 10 #include "chrome/browser/local_discovery/gcd_api_flow.h" |
11 #include "net/url_request/url_request_context_getter.h" | 11 #include "net/url_request/url_request_context_getter.h" |
12 | 12 |
13 | 13 |
14 namespace local_discovery { | 14 namespace local_discovery { |
15 | 15 |
16 // API call flow for server-side communication with CloudPrint for registration. | 16 // API call flow for server-side communication with CloudPrint for registration. |
17 class PrivetConfirmApiCallFlow : public CloudPrintApiFlowRequest { | 17 class PrivetConfirmApiCallFlow : public CloudPrintApiFlowRequest { |
18 public: | 18 public: |
19 typedef base::Callback<void(GCDApiFlow::Status /*success*/)> ResponseCallback; | 19 typedef base::Callback<void(GCDApiFlowInterface::Status /*success*/)> |
| 20 ResponseCallback; |
20 | 21 |
21 // Create an OAuth2-based confirmation | 22 // Create an OAuth2-based confirmation |
22 PrivetConfirmApiCallFlow(const std::string& token, | 23 PrivetConfirmApiCallFlow(const std::string& token, |
23 const ResponseCallback& callback); | 24 const ResponseCallback& callback); |
24 | 25 |
25 virtual ~PrivetConfirmApiCallFlow(); | 26 virtual ~PrivetConfirmApiCallFlow(); |
26 | 27 |
27 virtual void OnGCDAPIFlowError(GCDApiFlow::Status status) OVERRIDE; | 28 virtual void OnGCDAPIFlowError(GCDApiFlowInterface::Status status) OVERRIDE; |
28 virtual void OnGCDAPIFlowComplete( | 29 virtual void OnGCDAPIFlowComplete( |
29 const base::DictionaryValue& value) OVERRIDE; | 30 const base::DictionaryValue& value) OVERRIDE; |
30 virtual net::URLFetcher::RequestType GetRequestType() OVERRIDE; | 31 virtual net::URLFetcher::RequestType GetRequestType() OVERRIDE; |
31 | 32 |
32 virtual GURL GetURL() OVERRIDE; | 33 virtual GURL GetURL() OVERRIDE; |
33 | 34 |
34 private: | 35 private: |
35 ResponseCallback callback_; | 36 ResponseCallback callback_; |
36 std::string token_; | 37 std::string token_; |
37 }; | 38 }; |
38 | 39 |
39 } // namespace local_discovery | 40 } // namespace local_discovery |
40 | 41 |
41 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ | 42 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_ |
OLD | NEW |