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

Unified Diff: chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.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/ui/webui/local_discovery/local_discovery_ui_handler.cc
diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
index f31e1052de6799e2394836f35dcdc27e03bf9bd6..236843fd26b1b6be6634747bb779f136d01d7754 100644
--- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
+++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.cc
@@ -149,13 +149,14 @@ void LocalDiscoveryUIHandler::HandleCancelRegistration(
void LocalDiscoveryUIHandler::HandleRequestPrinterList(
const base::ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
- OAuth2TokenService* token_service =
+ ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
cloud_print_printer_list_.reset(new CloudPrintPrinterList(
profile->GetRequestContext(),
GetCloudPrintBaseUrl(),
token_service,
+ token_service->GetPrimaryAccountId(),
this));
cloud_print_printer_list_->Start();
}
@@ -229,7 +230,7 @@ void LocalDiscoveryUIHandler::OnPrivetRegisterClaimToken(
Profile* profile = Profile::FromWebUI(web_ui());
- OAuth2TokenService* token_service =
+ ProfileOAuth2TokenService* token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
if (!token_service) {
@@ -240,6 +241,7 @@ void LocalDiscoveryUIHandler::OnPrivetRegisterClaimToken(
confirm_api_call_flow_.reset(new PrivetConfirmApiCallFlow(
profile->GetRequestContext(),
token_service,
+ token_service->GetPrimaryAccountId(),
automated_claim_url,
base::Bind(&LocalDiscoveryUIHandler::OnConfirmDone,
base::Unretained(this))));
« no previous file with comments | « chrome/browser/ui/auto_login_prompter.cc ('k') | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698