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

Side by Side Diff: chrome/browser/local_discovery/cloud_print_base_api_flow.h

Issue 23382008: Making OAuth2TokenService multi-login aware, updating callers, minor fixes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to include the update to ProfileSyncService: r224220 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_ 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_ 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/local_discovery/privet_constants.h" 10 #include "chrome/browser/local_discovery/privet_constants.h"
(...skipping 26 matching lines...) Expand all
37 virtual void OnCloudPrintAPIFlowError(CloudPrintBaseApiFlow* flow, 37 virtual void OnCloudPrintAPIFlowError(CloudPrintBaseApiFlow* flow,
38 Status status) = 0; 38 Status status) = 0;
39 virtual void OnCloudPrintAPIFlowComplete( 39 virtual void OnCloudPrintAPIFlowComplete(
40 CloudPrintBaseApiFlow* flow, 40 CloudPrintBaseApiFlow* flow,
41 const base::DictionaryValue* value) = 0; 41 const base::DictionaryValue* value) = 0;
42 }; 42 };
43 43
44 // Create an OAuth2-based confirmation. 44 // Create an OAuth2-based confirmation.
45 CloudPrintBaseApiFlow(net::URLRequestContextGetter* request_context, 45 CloudPrintBaseApiFlow(net::URLRequestContextGetter* request_context,
46 OAuth2TokenService* token_service_, 46 OAuth2TokenService* token_service_,
47 const std::string& account_id,
47 const GURL& automated_claim_url, 48 const GURL& automated_claim_url,
48 Delegate* delegate); 49 Delegate* delegate);
49 50
50 // Create a cookie-based confirmation. 51 // Create a cookie-based confirmation.
51 CloudPrintBaseApiFlow(net::URLRequestContextGetter* request_context, 52 CloudPrintBaseApiFlow(net::URLRequestContextGetter* request_context,
52 int user_index, 53 int user_index,
53 const std::string& xsrf_token, 54 const std::string& xsrf_token,
54 const GURL& automated_claim_url, 55 const GURL& automated_claim_url,
55 Delegate* delegate); 56 Delegate* delegate);
56 57
(...skipping 25 matching lines...) Expand all
82 83
83 private: 84 private:
84 bool UseOAuth2() { return user_index_ == kAccountIndexUseOAuth2; } 85 bool UseOAuth2() { return user_index_ == kAccountIndexUseOAuth2; }
85 86
86 void CreateRequest(const GURL& url); 87 void CreateRequest(const GURL& url);
87 88
88 scoped_ptr<net::URLFetcher> url_fetcher_; 89 scoped_ptr<net::URLFetcher> url_fetcher_;
89 scoped_ptr<OAuth2TokenService::Request> oauth_request_; 90 scoped_ptr<OAuth2TokenService::Request> oauth_request_;
90 scoped_refptr<net::URLRequestContextGetter> request_context_; 91 scoped_refptr<net::URLRequestContextGetter> request_context_;
91 OAuth2TokenService* token_service_; 92 OAuth2TokenService* token_service_;
93 std::string account_id_;
92 int user_index_; 94 int user_index_;
93 std::string xsrf_token_; 95 std::string xsrf_token_;
94 GURL url_; 96 GURL url_;
95 Delegate* delegate_; 97 Delegate* delegate_;
96 }; 98 };
97 99
98 } // namespace local_discovery 100 } // namespace local_discovery
99 101
100 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_ 102 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_PRINT_BASE_API_FLOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698