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

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

Issue 298883012: Added GetURL, GetOAuthScope, GetExtraRequestHeaders into GCDBaseApiFlow::Delegate. (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
Index: chrome/browser/local_discovery/gcd_base_api_flow.h
diff --git a/chrome/browser/local_discovery/gcd_base_api_flow.h b/chrome/browser/local_discovery/gcd_base_api_flow.h
index 42920b56cd09e25bbbd25557ca607f189b53be1c..fdb044b334c297fcb6a633cf48aa0951848d6c53 100644
--- a/chrome/browser/local_discovery/gcd_base_api_flow.h
+++ b/chrome/browser/local_discovery/gcd_base_api_flow.h
@@ -39,11 +39,14 @@ class GCDBaseApiFlow : public net::URLFetcherDelegate,
virtual void OnGCDAPIFlowComplete(GCDBaseApiFlow* flow,
const base::DictionaryValue* value) = 0;
- // Return 1 if flow is for a Cloud Print device
- virtual bool GCDIsCloudPrint() = 0;
+ virtual GURL GetURL() = 0;
+
+ virtual std::string GetOAuthScope();
virtual net::URLFetcher::RequestType GetRequestType();
+ virtual std::vector<std::string> GetExtraRequestHeaders();
+
// If there is no data, set upload_type and upload_data to ""
virtual void GetUploadData(std::string* upload_type,
std::string* upload_data);
@@ -53,21 +56,6 @@ class GCDBaseApiFlow : public net::URLFetcherDelegate,
GCDBaseApiFlow(net::URLRequestContextGetter* request_context,
OAuth2TokenService* token_service,
const std::string& account_id,
- const GURL& url,
- Delegate* delegate);
-
- // Create a cookie-based confirmation.
- GCDBaseApiFlow(net::URLRequestContextGetter* request_context,
- int user_index,
- const std::string& xsrf_token,
- const GURL& url,
- Delegate* delegate);
-
- // Create a cookie-based confirmation with no XSRF token (for requests that
- // don't need an XSRF token).
- GCDBaseApiFlow(net::URLRequestContextGetter* request_context,
- int user_index,
- const GURL& url,
Delegate* delegate);
virtual ~GCDBaseApiFlow();
@@ -92,8 +80,21 @@ class GCDBaseApiFlow : public net::URLFetcherDelegate,
scoped_refptr<net::URLRequestContextGetter> request_context_;
OAuth2TokenService* token_service_;
std::string account_id_;
- GURL url_;
Delegate* delegate_;
+ DISALLOW_COPY_AND_ASSIGN(GCDBaseApiFlow);
+};
+
+class CloudPrintApiFlowDelegate : public GCDBaseApiFlow::Delegate {
+ public:
+ CloudPrintApiFlowDelegate();
+ virtual ~CloudPrintApiFlowDelegate();
+
+ // GCDBaseApiFlow::Delegate implementation
+ virtual std::string GetOAuthScope() OVERRIDE;
+ virtual std::vector<std::string> GetExtraRequestHeaders() OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(CloudPrintApiFlowDelegate);
};
} // namespace local_discovery
« no previous file with comments | « chrome/browser/local_discovery/cloud_print_printer_list.cc ('k') | chrome/browser/local_discovery/gcd_base_api_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698