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

Side by Side Diff: chrome/browser/printing/cloud_print/gcd_api_flow.h

Issue 2742763002: Clean up Cloud Print API flow code. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ 5 #ifndef CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_
6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ 6 #define CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 29 matching lines...) Expand all
40 virtual void OnGCDApiFlowComplete(const base::DictionaryValue& value) = 0; 40 virtual void OnGCDApiFlowComplete(const base::DictionaryValue& value) = 0;
41 41
42 virtual GURL GetURL() = 0; 42 virtual GURL GetURL() = 0;
43 43
44 virtual std::string GetOAuthScope() = 0; 44 virtual std::string GetOAuthScope() = 0;
45 45
46 virtual net::URLFetcher::RequestType GetRequestType(); 46 virtual net::URLFetcher::RequestType GetRequestType();
47 47
48 virtual std::vector<std::string> GetExtraRequestHeaders() = 0; 48 virtual std::vector<std::string> GetExtraRequestHeaders() = 0;
49 49
50 // If there is no data, set upload_type and upload_data to ""
51 virtual void GetUploadData(std::string* upload_type,
52 std::string* upload_data);
53
54 private: 50 private:
55 DISALLOW_COPY_AND_ASSIGN(Request); 51 DISALLOW_COPY_AND_ASSIGN(Request);
56 }; 52 };
57 53
58 GCDApiFlow(); 54 GCDApiFlow();
59 virtual ~GCDApiFlow(); 55 virtual ~GCDApiFlow();
60 56
61 static std::unique_ptr<GCDApiFlow> Create( 57 static std::unique_ptr<GCDApiFlow> Create(
62 net::URLRequestContextGetter* request_context, 58 net::URLRequestContextGetter* request_context,
63 OAuth2TokenService* token_service, 59 OAuth2TokenService* token_service,
(...skipping 14 matching lines...) Expand all
78 std::string GetOAuthScope() override; 74 std::string GetOAuthScope() override;
79 std::vector<std::string> GetExtraRequestHeaders() override; 75 std::vector<std::string> GetExtraRequestHeaders() override;
80 76
81 private: 77 private:
82 DISALLOW_COPY_AND_ASSIGN(CloudPrintApiFlowRequest); 78 DISALLOW_COPY_AND_ASSIGN(CloudPrintApiFlowRequest);
83 }; 79 };
84 80
85 } // namespace cloud_print 81 } // namespace cloud_print
86 82
87 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_ 83 #endif // CHROME_BROWSER_PRINTING_CLOUD_PRINT_GCD_API_FLOW_H_
OLDNEW
« no previous file with comments | « chrome/browser/printing/cloud_print/cloud_print_printer_list.cc ('k') | chrome/browser/printing/cloud_print/gcd_api_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698