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

Side by Side Diff: chrome/test/base/testing_profile_manager.h

Issue 847733005: Move User Manager onto a System profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/test/base/testing_profile_manager.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 (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_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Small helper for creating testing profiles. Just forwards to above. 60 // Small helper for creating testing profiles. Just forwards to above.
61 TestingProfile* CreateTestingProfile(const std::string& name); 61 TestingProfile* CreateTestingProfile(const std::string& name);
62 62
63 // Creates a new guest TestingProfile whose data lives in the guest profile 63 // Creates a new guest TestingProfile whose data lives in the guest profile
64 // test environment directory, as specified by the profile manager. 64 // test environment directory, as specified by the profile manager.
65 // This profile will not be added to the ProfileInfoCache. This will 65 // This profile will not be added to the ProfileInfoCache. This will
66 // register the TestingProfile with the profile subsystem as well. 66 // register the TestingProfile with the profile subsystem as well.
67 // The subsystem owns the Profile and returns a weak pointer. 67 // The subsystem owns the Profile and returns a weak pointer.
68 TestingProfile* CreateGuestProfile(); 68 TestingProfile* CreateGuestProfile();
69 69
70 // Creates a new system TestingProfile whose data lives in the system profile
71 // test environment directory, as specified by the profile manager.
72 // This profile will not be added to the ProfileInfoCache. This will
73 // register the TestingProfile with the profile subsystem as well.
74 // The subsystem owns the Profile and returns a weak pointer.
75 TestingProfile* CreateSystemProfile();
76
70 // Deletes a TestingProfile from the profile subsystem. 77 // Deletes a TestingProfile from the profile subsystem.
71 void DeleteTestingProfile(const std::string& profile_name); 78 void DeleteTestingProfile(const std::string& profile_name);
72 79
73 // Deletes all TestingProfiles from the profile subsystem, including guest 80 // Deletes all TestingProfiles from the profile subsystem, including guest
74 // profiles. 81 // profiles.
75 void DeleteAllTestingProfiles(); 82 void DeleteAllTestingProfiles();
76 83
77 // Deletes a guest TestingProfile from the profile manager. 84 // Deletes a guest TestingProfile from the profile manager.
78 void DeleteGuestProfile(); 85 void DeleteGuestProfile();
79 86
87 // Deletes a system TestingProfile from the profile manager.
88 void DeleteSystemProfile();
89
80 // Deletes the cache instance. This is useful for testing that the cache is 90 // Deletes the cache instance. This is useful for testing that the cache is
81 // properly persisting data. 91 // properly persisting data.
82 void DeleteProfileInfoCache(); 92 void DeleteProfileInfoCache();
83 93
84 // Sets ProfileManager's logged_in state. This is only useful on ChromeOS. 94 // Sets ProfileManager's logged_in state. This is only useful on ChromeOS.
85 void SetLoggedIn(bool logged_in); 95 void SetLoggedIn(bool logged_in);
86 96
87 // Sets the last used profile; also sets the active time to now. 97 // Sets the last used profile; also sets the active time to now.
88 void UpdateLastUser(Profile* last_active); 98 void UpdateLastUser(Profile* last_active);
89 99
(...skipping 25 matching lines...) Expand all
115 // Weak reference to the profile manager. 125 // Weak reference to the profile manager.
116 ProfileManager* profile_manager_; 126 ProfileManager* profile_manager_;
117 127
118 // Map of profile_name to TestingProfile* from CreateTestingProfile(). 128 // Map of profile_name to TestingProfile* from CreateTestingProfile().
119 TestingProfilesMap testing_profiles_; 129 TestingProfilesMap testing_profiles_;
120 130
121 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager); 131 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager);
122 }; 132 };
123 133
124 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ 134 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_constants.cc ('k') | chrome/test/base/testing_profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698