Index: chrome/browser/local_discovery/gcd_registration_ticket_creator.h |
diff --git a/chrome/browser/local_discovery/gcd_registration_ticket_creator.h b/chrome/browser/local_discovery/gcd_registration_ticket_creator.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..63e0b4d67c4eb6f91a0ac60929dfd8b22d7cca1f |
--- /dev/null |
+++ b/chrome/browser/local_discovery/gcd_registration_ticket_creator.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_CREATOR_H_ |
+#define CHROME_BROWSER_LOCAL_DISCOVERY_GCD_REGISTRATION_TICKET_CREATOR_H_ |
+ |
+#include <string> |
+ |
+#include "base/callback.h" |
+#include "base/values.h" |
+#include "chrome/browser/local_discovery/gcd_api_flow.h" |
+ |
+namespace local_discovery { |
+ |
+class GCDRegistrationTicketCreator : public GCDApiFlowRequest { |
Vitaly Buka (NO REVIEWS)
2014/06/03 21:30:49
maybe GCDRegistrationTicketCreator -> GCDRegistrat
Noam Samuel
2014/06/03 21:48:13
Worried people will think this is an object repres
Noam Samuel
2014/06/03 22:28:39
Renamed to GCDRegistrationTicketRequest
|
+ 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 GCDRegistrationTicketCreator(const ResponseCallback& callback); |
+ virtual ~GCDRegistrationTicketCreator(); |
+ |
+ // 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_CREATOR_H_ |