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

Unified Diff: chrome/browser/ui/webui/options/chromeos/accounts_options_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: rebased 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
Index: chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc b/chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc
index f55e4bac852649c2e156964d30ebe31a502a5b09..fa78c5285a8039af29a1ee4af121aa1882412474 100644
--- a/chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc
+++ b/chrome/browser/ui/webui/options/chromeos/accounts_options_browsertest.cc
@@ -11,12 +11,14 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/stub_cros_settings_provider.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chromeos/settings/cros_settings_names.h"
+#include "components/signin/core/browser/signin_manager.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
@@ -63,8 +65,8 @@ class AccountsOptionsTest : public LoginManagerTest {
protected:
void CheckAccountsUI(const user_manager::User* user, bool is_owner) {
Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(user);
- profile->GetPrefs()->SetString(prefs::kGoogleServicesUsername,
- user->email());
+ SigninManagerFactory::GetForProfile(profile)->
+ SetAuthenticatedUsername(user->email());
xiyuan 2014/12/04 19:02:29 I am not sure why we need to do this explicitly. L
Roger Tawa OOO till Jul 10th 2014/12/04 22:26:47 Yup, you are correct. No need to set authenticated
ui_test_utils::BrowserAddedObserver observer;
Browser* browser = CreateBrowser(profile);

Powered by Google App Engine
This is Rietveld 408576698