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

Side by Side Diff: chrome/browser/chromeos/drive/drive_notification_manager_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
« no previous file with comments | « no previous file | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/drive/drive_notification_manager_factory.h" 5 #include "chrome/browser/drive/drive_notification_manager_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/chromeos/login/users/user_manager.h" 9 #include "chrome/browser/chromeos/login/users/user_manager.h"
10 #include "chrome/browser/chromeos/profiles/profile_helper.h" 10 #include "chrome/browser/chromeos/profiles/profile_helper.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 chromeos::login::kGuestUserName); 47 chromeos::login::kGuestUserName);
48 } 48 }
49 }; 49 };
50 50
51 // Verify that no DriveNotificationManager is instantiated for the sign-in 51 // Verify that no DriveNotificationManager is instantiated for the sign-in
52 // profile or the guest profile while a guest session is in progress. 52 // profile or the guest profile while a guest session is in progress.
53 IN_PROC_BROWSER_TEST_F(DriveNotificationManagerFactoryGuestBrowserTest, 53 IN_PROC_BROWSER_TEST_F(DriveNotificationManagerFactoryGuestBrowserTest,
54 NoDriveNotificationManager) { 54 NoDriveNotificationManager) {
55 chromeos::UserManager* user_manager = chromeos::UserManager::Get(); 55 chromeos::UserManager* user_manager = chromeos::UserManager::Get();
56 EXPECT_TRUE(user_manager->IsLoggedInAsGuest()); 56 EXPECT_TRUE(user_manager->IsLoggedInAsGuest());
57 Profile* guest_profile = chromeos::ProfileHelper::Get() 57 Profile* guest_profile =
58 ->GetProfileByUser(user_manager->GetActiveUser()) 58 chromeos::ProfileHelper::Get()
59 ->GetOriginalProfile(); 59 ->GetProfileByUserUnsafe(user_manager->GetActiveUser())
60 ->GetOriginalProfile();
60 Profile* signin_profile = 61 Profile* signin_profile =
61 chromeos::ProfileHelper::GetSigninProfile()->GetOriginalProfile(); 62 chromeos::ProfileHelper::GetSigninProfile()->GetOriginalProfile();
62 EXPECT_FALSE(DriveNotificationManagerFactory::FindForBrowserContext( 63 EXPECT_FALSE(DriveNotificationManagerFactory::FindForBrowserContext(
63 guest_profile)); 64 guest_profile));
64 EXPECT_FALSE(DriveNotificationManagerFactory::FindForBrowserContext( 65 EXPECT_FALSE(DriveNotificationManagerFactory::FindForBrowserContext(
65 signin_profile)); 66 signin_profile));
66 } 67 }
67 68
68 } // namespace drive 69 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698