Add GCMChannelStatusSyncer to schedule requests and enable/disable GCM
[chromium-blink-merge.git] / chrome / browser / local_discovery / privet_confirm_api_flow.h
blob5da9a61cecb075fba4f0eb22019e24e80b05a319
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_
8 #include <string>
10 #include "base/values.h"
11 #include "chrome/browser/local_discovery/gcd_api_flow.h"
12 #include "net/url_request/url_request_context_getter.h"
14 namespace local_discovery {
16 // API call flow for server-side communication with CloudPrint for registration.
17 class PrivetConfirmApiCallFlow : public CloudPrintApiFlowRequest {
18 public:
19 typedef base::Callback<void(GCDApiFlow::Status /*success*/)> ResponseCallback;
21 // Create an OAuth2-based confirmation
22 PrivetConfirmApiCallFlow(const std::string& token,
23 const ResponseCallback& callback);
25 virtual ~PrivetConfirmApiCallFlow();
27 virtual void OnGCDAPIFlowError(GCDApiFlow::Status status) OVERRIDE;
28 virtual void OnGCDAPIFlowComplete(
29 const base::DictionaryValue& value) OVERRIDE;
30 virtual net::URLFetcher::RequestType GetRequestType() OVERRIDE;
32 virtual GURL GetURL() OVERRIDE;
34 private:
35 ResponseCallback callback_;
36 std::string token_;
39 } // namespace local_discovery
41 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_CONFIRM_API_FLOW_H_