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

Side by Side Diff: chrome/browser/chromeos/login/mock_user_manager.h

Issue 9466005: Make sure the device recovers from policy loss in the consumer case. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT and cleaned up comments and unrelated changes. Created 8 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 24 matching lines...) Expand all
35 const std::string&)); 35 const std::string&));
36 MOCK_METHOD1(GetUserWallpaper, int(const std::string&)); 36 MOCK_METHOD1(GetUserWallpaper, int(const std::string&));
37 MOCK_METHOD2(SaveWallpaperDefaultIndex, void(const std::string&, int)); 37 MOCK_METHOD2(SaveWallpaperDefaultIndex, void(const std::string&, int));
38 MOCK_CONST_METHOD1(GetUserDisplayEmail, std::string(const std::string&)); 38 MOCK_CONST_METHOD1(GetUserDisplayEmail, std::string(const std::string&));
39 MOCK_METHOD2(SaveUserDefaultImageIndex, void(const std::string&, int)); 39 MOCK_METHOD2(SaveUserDefaultImageIndex, void(const std::string&, int));
40 MOCK_METHOD2(SaveUserImage, void(const std::string&, const SkBitmap&)); 40 MOCK_METHOD2(SaveUserImage, void(const std::string&, const SkBitmap&));
41 MOCK_METHOD2(SaveUserImageFromFile, void(const std::string&, 41 MOCK_METHOD2(SaveUserImageFromFile, void(const std::string&,
42 const FilePath&)); 42 const FilePath&));
43 MOCK_METHOD1(SaveUserImageFromProfileImage, void(const std::string&)); 43 MOCK_METHOD1(SaveUserImageFromProfileImage, void(const std::string&));
44 MOCK_METHOD1(DownloadProfileImage, void(const std::string&)); 44 MOCK_METHOD1(DownloadProfileImage, void(const std::string&));
45 MOCK_METHOD0(LoadKeyStore, void(void));
45 MOCK_CONST_METHOD0(IsCurrentUserOwner, bool(void)); 46 MOCK_CONST_METHOD0(IsCurrentUserOwner, bool(void));
46 MOCK_CONST_METHOD0(IsCurrentUserNew, bool(void)); 47 MOCK_CONST_METHOD0(IsCurrentUserNew, bool(void));
47 MOCK_CONST_METHOD0(IsCurrentUserEphemeral, bool(void)); 48 MOCK_CONST_METHOD0(IsCurrentUserEphemeral, bool(void));
48 MOCK_CONST_METHOD0(IsUserLoggedIn, bool(void)); 49 MOCK_CONST_METHOD0(IsUserLoggedIn, bool(void));
49 MOCK_CONST_METHOD0(IsLoggedInAsDemoUser, bool(void)); 50 MOCK_CONST_METHOD0(IsLoggedInAsDemoUser, bool(void));
50 MOCK_CONST_METHOD0(IsLoggedInAsGuest, bool(void)); 51 MOCK_CONST_METHOD0(IsLoggedInAsGuest, bool(void));
51 MOCK_CONST_METHOD0(IsLoggedInAsStub, bool(void)); 52 MOCK_CONST_METHOD0(IsLoggedInAsStub, bool(void));
52 MOCK_METHOD1(AddObserver, void(UserManager::Observer*)); 53 MOCK_METHOD1(AddObserver, void(UserManager::Observer*));
53 MOCK_METHOD1(RemoveObserver, void(UserManager::Observer*)); 54 MOCK_METHOD1(RemoveObserver, void(UserManager::Observer*));
54 MOCK_METHOD0(NotifyLocalStateChanged, void(void)); 55 MOCK_METHOD0(NotifyLocalStateChanged, void(void));
55 MOCK_CONST_METHOD0(DownloadedProfileImage, const SkBitmap& (void)); 56 MOCK_CONST_METHOD0(DownloadedProfileImage, const SkBitmap& (void));
56 57
57 // You can't mock this function easily because nobody can create User objects 58 // You can't mock this function easily because nobody can create User objects
58 // but the UserManagerImpl and us. 59 // but the UserManagerImpl and us.
59 virtual const User& GetLoggedInUser() const OVERRIDE; 60 virtual const User& GetLoggedInUser() const OVERRIDE;
60 61
61 // You can't mock this function easily because nobody can create User objects 62 // You can't mock this function easily because nobody can create User objects
62 // but the UserManagerImpl and us. 63 // but the UserManagerImpl and us.
63 virtual User& GetLoggedInUser() OVERRIDE; 64 virtual User& GetLoggedInUser() OVERRIDE;
64 65
65 // Sets a new User instance. 66 // Sets a new User instance.
66 void SetLoggedInUser(const std::string& email, bool guest); 67 void SetLoggedInUser(const std::string& email, bool guest);
67 68
68 User* user_; 69 User* user_;
69 }; 70 };
70 71
71 } // namespace chromeos 72 } // namespace chromeos
72 73
73 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_ 74 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698