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

Side by Side Diff: chrome/browser/invalidation/profile_invalidation_provider_factory_browsertest.cc

Issue 445353004: GetProfileByUser deprecated and renamed to GetProfileByUserUnsafe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "chrome/browser/chromeos/profiles/profile_helper.h" 8 #include "chrome/browser/chromeos/profiles/profile_helper.h"
9 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 9 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser, 109 command_line->AppendSwitchASCII(chromeos::switches::kLoginUser,
110 chromeos::login::kGuestUserName); 110 chromeos::login::kGuestUserName);
111 } 111 }
112 112
113 // Verify that no InvalidationService is instantiated for the login profile or 113 // Verify that no InvalidationService is instantiated for the login profile or
114 // the guest profile while a guest session is in progress. 114 // the guest profile while a guest session is in progress.
115 IN_PROC_BROWSER_TEST_F(ProfileInvalidationProviderFactoryGuestBrowserTest, 115 IN_PROC_BROWSER_TEST_F(ProfileInvalidationProviderFactoryGuestBrowserTest,
116 NoInvalidationService) { 116 NoInvalidationService) {
117 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 117 chromeos::UserManager* user_manager = chromeos::UserManager::Get();
118 EXPECT_TRUE(user_manager->IsLoggedInAsGuest()); 118 EXPECT_TRUE(user_manager->IsLoggedInAsGuest());
119 Profile* guest_profile = chromeos::ProfileHelper::Get() 119 Profile* guest_profile =
120 ->GetProfileByUser(user_manager->GetActiveUser()) 120 chromeos::ProfileHelper::Get()
121 ->GetOriginalProfile(); 121 ->GetProfileByUserUnsafe(user_manager->GetActiveUser())
122 ->GetOriginalProfile();
122 Profile* login_profile = 123 Profile* login_profile =
123 chromeos::ProfileHelper::GetSigninProfile()->GetOriginalProfile(); 124 chromeos::ProfileHelper::GetSigninProfile()->GetOriginalProfile();
124 EXPECT_FALSE(CanConstructProfileInvalidationProvider(guest_profile)); 125 EXPECT_FALSE(CanConstructProfileInvalidationProvider(guest_profile));
125 EXPECT_FALSE(CanConstructProfileInvalidationProvider(login_profile)); 126 EXPECT_FALSE(CanConstructProfileInvalidationProvider(login_profile));
126 } 127 }
127 128
128 } // namespace invalidation 129 } // namespace invalidation
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698