#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_
#define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_
#include <string>
#include "chrome/browser/local_discovery/cloud_print_base_api_flow.h"
#include "net/url_request/url_request_context_getter.h"
namespace local_discovery {
class PrivetConfirmApiCallFlow : public CloudPrintBaseApiFlow::Delegate {
public:
typedef base::Callback<void(CloudPrintBaseApiFlow::Status )>
ResponseCallback;
PrivetConfirmApiCallFlow(net::URLRequestContextGetter* request_context,
OAuth2TokenService* token_service_,
const std::string& account_id,
const GURL& automated_claim_url,
const ResponseCallback& callback);
PrivetConfirmApiCallFlow(net::URLRequestContextGetter* request_context,
int user_index,
const std::string& xsrf_token,
const GURL& automated_claim_url,
const ResponseCallback& callback);
virtual ~PrivetConfirmApiCallFlow();
void Start();
virtual void OnCloudPrintAPIFlowError(
CloudPrintBaseApiFlow* flow,
CloudPrintBaseApiFlow::Status status) OVERRIDE;
virtual void OnCloudPrintAPIFlowComplete(
CloudPrintBaseApiFlow* flow,
const base::DictionaryValue* value) OVERRIDE;
CloudPrintBaseApiFlow* GetBaseApiFlowForTests() {
return &flow_;
}
private:
CloudPrintBaseApiFlow flow_;
ResponseCallback callback_;
};
}
#endif