OLD | NEW |
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 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/string16.h" | 13 #include "base/string16.h" |
14 #include "chrome/test/base/testing_pref_service.h" | 14 #include "chrome/test/base/testing_pref_service.h" |
15 | 15 |
16 class ProfileInfoCache; | 16 class ProfileInfoCache; |
17 class ProfileManager; | 17 class ProfileManager; |
18 class TestingBrowserProcess; | 18 class TestingBrowserProcess; |
19 class TestingProfile; | 19 class TestingProfile; |
20 | 20 |
21 // The TestingProfileManager is a TestingProfile factory for a multi-profile | 21 // The TestingProfileManager is a TestingProfile factory for a multi-profile |
22 // environment. It will bring up a full ProfileManager and attach it to the | 22 // environment. It will bring up a full ProfileManager and attach it to the |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 // Does the actual ASSERT-checked SetUp work. This function cannot have a | 69 // Does the actual ASSERT-checked SetUp work. This function cannot have a |
70 // return value, so it sets the |called_set_up_| flag on success and that is | 70 // return value, so it sets the |called_set_up_| flag on success and that is |
71 // returned in the public SetUp. | 71 // returned in the public SetUp. |
72 void SetUpInternal(); | 72 void SetUpInternal(); |
73 | 73 |
74 // Whether SetUp() was called to put the object in a valid state. | 74 // Whether SetUp() was called to put the object in a valid state. |
75 bool called_set_up_; | 75 bool called_set_up_; |
76 | 76 |
77 // The directory in which new profiles are placed. | 77 // The directory in which new profiles are placed. |
78 ScopedTempDir profiles_dir_; | 78 base::ScopedTempDir profiles_dir_; |
79 | 79 |
80 // Weak reference to the browser process on which the ProfileManager is set. | 80 // Weak reference to the browser process on which the ProfileManager is set. |
81 TestingBrowserProcess* browser_process_; | 81 TestingBrowserProcess* browser_process_; |
82 | 82 |
83 // Local state in which all the profiles are registered. | 83 // Local state in which all the profiles are registered. |
84 ScopedTestingLocalState local_state_; | 84 ScopedTestingLocalState local_state_; |
85 | 85 |
86 // Weak reference to the profile manager. | 86 // Weak reference to the profile manager. |
87 ProfileManager* profile_manager_; | 87 ProfileManager* profile_manager_; |
88 | 88 |
89 // Map of profile_name to TestingProfile* from CreateTestingProfile(). | 89 // Map of profile_name to TestingProfile* from CreateTestingProfile(). |
90 TestingProfilesMap testing_profiles_; | 90 TestingProfilesMap testing_profiles_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager); | 92 DISALLOW_COPY_AND_ASSIGN(TestingProfileManager); |
93 }; | 93 }; |
94 | 94 |
95 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ | 95 #endif // CHROME_TEST_BASE_TESTING_PROFILE_MANAGER_H_ |
OLD | NEW |