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

Unified Diff: chrome/browser/chromeos/file_manager/file_manager_browsertest.cc

Issue 763673002: Replace direct access to kGoogleServicesUsername with calls to SigninManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 6 years 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/fake_login_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index e8efbfedfef1954cbf12f3688d706fc5917016ac..56503cccb0265f02f3df09be728241b6c2993548 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -36,11 +36,13 @@
#include "chrome/browser/notifications/notification.h"
#include "chrome/browser/notifications/notification_ui_manager.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
+#include "components/signin/core/browser/signin_manager.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/test/test_utils.h"
@@ -1204,8 +1206,9 @@ class MultiProfileFileManagerBrowserTest : public FileManagerBrowserTestBase {
user_manager->UserLoggedIn(info.email, info.hash, false);
user_manager->SaveUserDisplayName(info.email,
base::UTF8ToUTF16(info.display_name));
- chromeos::ProfileHelper::GetProfileByUserIdHash(info.hash)->GetPrefs()->
- SetString(prefs::kGoogleServicesUsername, info.email);
+ SigninManagerFactory::GetForProfile(
+ chromeos::ProfileHelper::GetProfileByUserIdHash(info.hash))->
+ SetAuthenticatedUsername(info.email);
}
private:
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/fake_login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698