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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1618193003: arc: Pass auth token from Chrome to ARC instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored. Added LSO UI Created 4 years, 11 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/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 0a145993d8c347da68a2f27d5198852ce6fd6ee2..64d4bac2c02605d8dd792e30e7ffad42d3995727 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -33,6 +33,7 @@
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
#include "chrome/browser/chromeos/base/locale_util.h"
#include "chrome/browser/chromeos/boot_times_recorder.h"
#include "chrome/browser/chromeos/first_run/first_run.h"
@@ -1145,6 +1146,7 @@ void UserSessionManager::FinalizePrepareProfile(Profile* profile) {
DCHECK(arc::ArcServiceManager::Get());
arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(
multi_user_util::GetAccountIdFromProfile(profile));
+ arc::ArcAuthService::Get()->SetProfile(profile);
xiyuan 2016/01/26 23:37:05 nit: Prefer to have something similar to ArcServic
khmel 2016/01/27 22:36:21 Sounds better, thanks
}
}
@@ -1785,6 +1787,11 @@ bool UserSessionManager::TokenHandlesEnabled() {
}
void UserSessionManager::Shutdown() {
+ if (arc::ArcBridgeService::GetEnabled(
+ base::CommandLine::ForCurrentProcess())) {
+ DCHECK(arc::ArcServiceManager::Get());
+ arc::ArcAuthService::Get()->SetProfile(nullptr);
xiyuan 2016/01/26 23:37:05 nit: Similarly, prefer to have something like ArcS
khmel 2016/01/27 22:36:21 Done.
+ }
token_handle_fetcher_.reset();
token_handle_util_.reset();
first_run::GoodiesDisplayer::Delete();

Powered by Google App Engine
This is Rietveld 408576698