OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_PROFILES_PROFILE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // TODO(dzhioev): remove this method. http://crbug.com/361528 | 143 // TODO(dzhioev): remove this method. http://crbug.com/361528 |
144 Profile* GetProfileByUserUnsafe(const user_manager::User* user); | 144 Profile* GetProfileByUserUnsafe(const user_manager::User* user); |
145 | 145 |
146 // Returns NULL if User is not created. | 146 // Returns NULL if User is not created. |
147 const user_manager::User* GetUserByProfile(const Profile* profile) const; | 147 const user_manager::User* GetUserByProfile(const Profile* profile) const; |
148 user_manager::User* GetUserByProfile(Profile* profile) const; | 148 user_manager::User* GetUserByProfile(Profile* profile) const; |
149 | 149 |
150 static std::string GetUserIdHashByUserIdForTesting( | 150 static std::string GetUserIdHashByUserIdForTesting( |
151 const std::string& user_id); | 151 const std::string& user_id); |
152 | 152 |
| 153 void SetActiveUserIdForTesting(const std::string& user_id); |
| 154 |
153 // Flushes all files of |profile|. | 155 // Flushes all files of |profile|. |
154 void FlushProfile(Profile* profile); | 156 void FlushProfile(Profile* profile); |
155 | 157 |
156 private: | 158 private: |
157 // TODO(nkostylev): Create a test API class that will be the only one allowed | 159 // TODO(nkostylev): Create a test API class that will be the only one allowed |
158 // to access private test methods. | 160 // to access private test methods. |
159 friend class CryptohomeAuthenticatorTest; | 161 friend class CryptohomeAuthenticatorTest; |
160 friend class DeviceSettingsTestBase; | 162 friend class DeviceSettingsTestBase; |
161 friend class policy::DeviceStatusCollectorTest; | 163 friend class policy::DeviceStatusCollectorTest; |
162 friend class ExistingUserControllerTest; | 164 friend class ExistingUserControllerTest; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 std::unique_ptr<FileFlusher> profile_flusher_; | 242 std::unique_ptr<FileFlusher> profile_flusher_; |
241 | 243 |
242 base::WeakPtrFactory<ProfileHelper> weak_factory_; | 244 base::WeakPtrFactory<ProfileHelper> weak_factory_; |
243 | 245 |
244 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); | 246 DISALLOW_COPY_AND_ASSIGN(ProfileHelper); |
245 }; | 247 }; |
246 | 248 |
247 } // namespace chromeos | 249 } // namespace chromeos |
248 | 250 |
249 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ | 251 #endif // CHROME_BROWSER_CHROMEOS_PROFILES_PROFILE_HELPER_H_ |
OLD | NEW |