OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_ |
6 #define CHROME_TEST_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_TESTING_PROFILE_H_ |
7 | 7 |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 virtual HistoryService* GetHistoryService(ServiceAccessType access) { | 96 virtual HistoryService* GetHistoryService(ServiceAccessType access) { |
97 return history_service_.get(); | 97 return history_service_.get(); |
98 } | 98 } |
99 void set_has_history_service(bool has_history_service) { | 99 void set_has_history_service(bool has_history_service) { |
100 has_history_service_ = has_history_service; | 100 has_history_service_ = has_history_service; |
101 } | 101 } |
102 virtual WebDataService* GetWebDataService(ServiceAccessType access) { | 102 virtual WebDataService* GetWebDataService(ServiceAccessType access) { |
103 return NULL; | 103 return NULL; |
104 } | 104 } |
105 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { | |
106 return NULL; | |
107 } | |
108 virtual PrefService* GetPrefs() { | 105 virtual PrefService* GetPrefs() { |
109 FilePath prefs_filename; | 106 FilePath prefs_filename; |
110 PathService::Get(base::DIR_TEMP, &prefs_filename); | 107 PathService::Get(base::DIR_TEMP, &prefs_filename); |
111 prefs_filename = | 108 prefs_filename = |
112 prefs_filename.Append(FILE_PATH_LITERAL("TestPreferences")); | 109 prefs_filename.Append(FILE_PATH_LITERAL("TestPreferences")); |
113 if (!prefs_.get()) { | 110 if (!prefs_.get()) { |
114 prefs_.reset(new PrefService(prefs_filename, NULL)); | 111 prefs_.reset(new PrefService(prefs_filename, NULL)); |
115 Profile::RegisterUserPrefs(prefs_.get()); | 112 Profile::RegisterUserPrefs(prefs_.get()); |
116 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); | 113 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); |
117 } | 114 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 244 |
248 std::wstring id_; | 245 std::wstring id_; |
249 | 246 |
250 bool off_the_record_; | 247 bool off_the_record_; |
251 | 248 |
252 // Did the last session exit cleanly? Default is true. | 249 // Did the last session exit cleanly? Default is true. |
253 bool last_session_exited_cleanly_; | 250 bool last_session_exited_cleanly_; |
254 }; | 251 }; |
255 | 252 |
256 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 253 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |