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

Unified Diff: chrome/browser/local_discovery/cloud_print_base_api_flow.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/local_discovery/cloud_print_base_api_flow.cc
diff --git a/chrome/browser/local_discovery/cloud_print_base_api_flow.cc b/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
index 0b8371d648e39093e80dffa8ed339af3b169f220..9a15917551c0138710ea12d328d2d3b986ca5eef 100644
--- a/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
+++ b/chrome/browser/local_discovery/cloud_print_base_api_flow.cc
@@ -25,10 +25,12 @@ const char kUserURLParameterKey[] = "user";
CloudPrintBaseApiFlow::CloudPrintBaseApiFlow(
net::URLRequestContextGetter* request_context,
OAuth2TokenService* token_service,
+ const std::string& account_id,
const GURL& automated_claim_url,
Delegate* delegate)
: request_context_(request_context),
token_service_(token_service),
+ account_id_(account_id),
user_index_(kAccountIndexUseOAuth2),
url_(automated_claim_url),
delegate_(delegate) {
@@ -42,6 +44,7 @@ CloudPrintBaseApiFlow::CloudPrintBaseApiFlow(
Delegate* delegate)
: request_context_(request_context),
token_service_(NULL),
+ account_id_(""),
user_index_(user_index),
xsrf_token_(xsrf_token),
url_(automated_claim_url),
@@ -55,6 +58,7 @@ CloudPrintBaseApiFlow::CloudPrintBaseApiFlow(
Delegate* delegate)
: request_context_(request_context),
token_service_(NULL),
+ account_id_(""),
user_index_(user_index),
url_(automated_claim_url),
delegate_(delegate) {
@@ -67,7 +71,9 @@ void CloudPrintBaseApiFlow::Start() {
if (UseOAuth2()) {
OAuth2TokenService::ScopeSet oauth_scopes;
oauth_scopes.insert(cloud_print::kCloudPrintAuth);
- oauth_request_ = token_service_->StartRequest(oauth_scopes, this);
+ oauth_request_ = token_service_->StartRequest(account_id_,
+ oauth_scopes,
+ this);
} else {
GURL cookie_url = url_;
« no previous file with comments | « chrome/browser/local_discovery/cloud_print_base_api_flow.h ('k') | chrome/browser/local_discovery/cloud_print_printer_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698