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

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

Issue 23780002: Actual cancelation of registration when cancel buttons pressed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: chrome/browser/local_discovery/privet_http_impl.h
diff --git a/chrome/browser/local_discovery/privet_http_impl.h b/chrome/browser/local_discovery/privet_http_impl.h
index 8de33129f2fd06a3530716d4fe8f62bddd6d7a42..b8d5496a0846a5477e4e74599aa18f285831916f 100644
--- a/chrome/browser/local_discovery/privet_http_impl.h
+++ b/chrome/browser/local_discovery/privet_http_impl.h
@@ -66,6 +66,25 @@ class PrivetRegisterOperationImpl
virtual PrivetHTTPClient* GetHTTPClient() OVERRIDE;
private:
+ class Cancelation : public PrivetURLFetcher::Delegate {
+ public:
+ Cancelation(PrivetHTTPClientImpl* privet_client,
+ const std::string& user);
+ virtual ~Cancelation();
+
+ virtual void OnError(PrivetURLFetcher* fetcher,
+ PrivetURLFetcher::ErrorType error) OVERRIDE;
+
+ virtual void OnParsedJson(PrivetURLFetcher* fetcher,
+ const base::DictionaryValue* value,
+ bool has_error) OVERRIDE;
+
+ void Cleanup();
+
+ private:
+ scoped_ptr<PrivetURLFetcher> url_fetcher_;
+ };
+
// Arguments is JSON value from request.
typedef base::Callback<void(const base::DictionaryValue&)>
ResponseHandler;
@@ -80,6 +99,11 @@ class PrivetRegisterOperationImpl
bool PrivetErrorTransient(const std::string& error);
+ static GURL GetURLForActionAndUser(
+ PrivetHTTPClientImpl* privet_client,
+ const std::string& action,
+ const std::string& user);
+
std::string user_;
std::string current_action_;
scoped_ptr<PrivetURLFetcher> url_fetcher_;
« no previous file with comments | « chrome/browser/local_discovery/privet_constants.cc ('k') | chrome/browser/local_discovery/privet_http_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698