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

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

Issue 23530007: Move API flows for cloud print into common class CloudPrintBaseApiFlow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AppendQueryParameter Created 7 years, 3 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/cloud_print_account_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/local_discovery/cloud_print_account_manager.h
diff --git a/chrome/browser/local_discovery/cloud_print_account_manager.h b/chrome/browser/local_discovery/cloud_print_account_manager.h
index 7667b39d5b93c46b503355016779b91cccd88fd6..39c54487b65ac422c81c109ecb313be42a3e0a6a 100644
--- a/chrome/browser/local_discovery/cloud_print_account_manager.h
+++ b/chrome/browser/local_discovery/cloud_print_account_manager.h
@@ -10,12 +10,11 @@
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
-#include "net/url_request/url_fetcher.h"
-#include "net/url_request/url_fetcher_delegate.h"
+#include "chrome/browser/local_discovery/cloud_print_base_api_flow.h"
namespace local_discovery {
-class CloudPrintAccountManager : public net::URLFetcherDelegate {
+class CloudPrintAccountManager : public CloudPrintBaseApiFlow::Delegate {
public:
typedef base::Callback<void(
const std::vector<std::string>& /*accounts*/,
@@ -29,17 +28,20 @@ class CloudPrintAccountManager : public net::URLFetcherDelegate {
void Start();
- // URLFetcher implementation:
- virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
+ // BaseCloudPrintApiFlow::Delegate implementation.
+ virtual void OnCloudPrintAPIFlowError(
+ CloudPrintBaseApiFlow* flow,
+ CloudPrintBaseApiFlow::Status status) OVERRIDE;
+
+ virtual void OnCloudPrintAPIFlowComplete(
+ CloudPrintBaseApiFlow* flow,
+ const base::DictionaryValue* value) OVERRIDE;
private:
void ReportEmptyUserList();
- scoped_refptr<net::URLRequestContextGetter> request_context_;
- std::string cloud_print_url_;
- int token_user_index_;
+ CloudPrintBaseApiFlow flow_;
AccountsCallback callback_;
- scoped_ptr<net::URLFetcher> url_fetcher_;
};
} // namespace local_discovery
« no previous file with comments | « no previous file | chrome/browser/local_discovery/cloud_print_account_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698