Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3070)

Unified Diff: chrome/browser/local_discovery/gcd_registration_ticket_request.h

Issue 307353008: GCD registration ticket creation flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/local_discovery/gcd_registration_ticket_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/gcd_registration_ticket_request.h
diff --git a/chrome/browser/local_discovery/gcd_registration_ticket_request.h b/chrome/browser/local_discovery/gcd_registration_ticket_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..bfbb975c0d8233d9eb096ab636d817ab50cc3ce1
--- /dev/null
+++ b/chrome/browser/local_discovery/gcd_registration_ticket_request.h
@@ -0,0 +1,40 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_GCD_REGISTRATION_TICKET_REQUEST_H_
+#define CHROME_BROWSER_LOCAL_DISCOVERY_GCD_REGISTRATION_TICKET_REQUEST_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/values.h"
+#include "chrome/browser/local_discovery/gcd_api_flow.h"
+
+namespace local_discovery {
+
+class GCDRegistrationTicketRequest : public GCDApiFlowRequest {
+ public:
+ // |ticket_id| contains the registration ticket ID, or an empty string in case
+ // of an error.
+ typedef base::Callback<void(const std::string& ticket_id)> ResponseCallback;
+
+ explicit GCDRegistrationTicketRequest(const ResponseCallback& callback);
+ virtual ~GCDRegistrationTicketRequest();
+
+ // GCDApiFlow::Request implementation.
+ virtual void GetUploadData(std::string* upload_type,
+ std::string* upload_data) OVERRIDE;
+ virtual net::URLFetcher::RequestType GetRequestType() OVERRIDE;
+ virtual void OnGCDAPIFlowError(GCDApiFlow::Status status) OVERRIDE;
+ virtual void OnGCDAPIFlowComplete(
+ const base::DictionaryValue& value) OVERRIDE;
+ virtual GURL GetURL() OVERRIDE;
+
+ private:
+ ResponseCallback callback_;
+};
+
+} // namespace local_discovery
+
+#endif // CHROME_BROWSER_LOCAL_DISCOVERY_GCD_REGISTRATION_TICKET_REQUEST_H_
« no previous file with comments | « no previous file | chrome/browser/local_discovery/gcd_registration_ticket_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698