| 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_H_ | 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> |
| 10 #include <vector> |
| 9 | 11 |
| 10 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
| 14 #include "components/domain_reliability/clear_mode.h" | 16 #include "components/domain_reliability/clear_mode.h" |
| 15 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 17 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
| 16 | 18 |
| 17 namespace content { | 19 namespace content { |
| 18 class MockResourceContext; | 20 class MockResourceContext; |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 #endif | 159 #endif |
| 158 scoped_ptr<PrefServiceSyncable> prefs, | 160 scoped_ptr<PrefServiceSyncable> prefs, |
| 159 TestingProfile* parent, | 161 TestingProfile* parent, |
| 160 bool guest_session, | 162 bool guest_session, |
| 161 const std::string& supervised_user_id, | 163 const std::string& supervised_user_id, |
| 162 scoped_ptr<policy::PolicyService> policy_service, | 164 scoped_ptr<policy::PolicyService> policy_service, |
| 163 const TestingFactories& factories); | 165 const TestingFactories& factories); |
| 164 | 166 |
| 165 ~TestingProfile() override; | 167 ~TestingProfile() override; |
| 166 | 168 |
| 169 // Creates the fallback icon service. |
| 170 void CreateFallbackIconService(); |
| 171 |
| 167 // Creates the favicon service. Consequent calls would recreate the service. | 172 // Creates the favicon service. Consequent calls would recreate the service. |
| 168 void CreateFaviconService(); | 173 void CreateFaviconService(); |
| 169 | 174 |
| 170 // Creates the history service. If |delete_file| is true, the history file is | 175 // Creates the history service. If |delete_file| is true, the history file is |
| 171 // deleted first, then the HistoryService is created. As TestingProfile | 176 // deleted first, then the HistoryService is created. As TestingProfile |
| 172 // deletes the directory containing the files used by HistoryService, this | 177 // deletes the directory containing the files used by HistoryService, this |
| 173 // only matters if you're recreating the HistoryService. If |no_db| is true, | 178 // only matters if you're recreating the HistoryService. If |no_db| is true, |
| 174 // the history backend will fail to initialize its database; this is useful | 179 // the history backend will fail to initialize its database; this is useful |
| 175 // for testing error conditions. Returns true on success. | 180 // for testing error conditions. Returns true on success. |
| 176 bool CreateHistoryService(bool delete_file, bool no_db) WARN_UNUSED_RESULT; | 181 bool CreateHistoryService(bool delete_file, bool no_db) WARN_UNUSED_RESULT; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 411 |
| 407 // Weak pointer to a delegate for indicating that a profile was created. | 412 // Weak pointer to a delegate for indicating that a profile was created. |
| 408 Delegate* delegate_; | 413 Delegate* delegate_; |
| 409 | 414 |
| 410 std::string profile_name_; | 415 std::string profile_name_; |
| 411 | 416 |
| 412 scoped_ptr<policy::PolicyService> policy_service_; | 417 scoped_ptr<policy::PolicyService> policy_service_; |
| 413 }; | 418 }; |
| 414 | 419 |
| 415 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 420 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |