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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 105 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { |
106 return NULL; | 106 return NULL; |
107 } | 107 } |
108 virtual PrefService* GetPrefs() { | 108 virtual PrefService* GetPrefs() { |
109 FilePath prefs_filename; | |
110 PathService::Get(base::DIR_TEMP, &prefs_filename); | |
111 prefs_filename = | |
112 prefs_filename.Append(FILE_PATH_LITERAL("TestPreferences")); | |
113 if (!prefs_.get()) { | 109 if (!prefs_.get()) { |
| 110 FilePath prefs_filename = |
| 111 path_.Append(FILE_PATH_LITERAL("TestPreferences")); |
114 prefs_.reset(new PrefService(prefs_filename, NULL)); | 112 prefs_.reset(new PrefService(prefs_filename, NULL)); |
115 Profile::RegisterUserPrefs(prefs_.get()); | 113 Profile::RegisterUserPrefs(prefs_.get()); |
116 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); | 114 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); |
117 } | 115 } |
118 return prefs_.get(); | 116 return prefs_.get(); |
119 } | 117 } |
120 virtual TemplateURLModel* GetTemplateURLModel() { | 118 virtual TemplateURLModel* GetTemplateURLModel() { |
121 return template_url_model_.get(); | 119 return template_url_model_.get(); |
122 } | 120 } |
123 virtual TemplateURLFetcher* GetTemplateURLFetcher() { | 121 virtual TemplateURLFetcher* GetTemplateURLFetcher() { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 | 245 |
248 std::wstring id_; | 246 std::wstring id_; |
249 | 247 |
250 bool off_the_record_; | 248 bool off_the_record_; |
251 | 249 |
252 // Did the last session exit cleanly? Default is true. | 250 // Did the last session exit cleanly? Default is true. |
253 bool last_session_exited_cleanly_; | 251 bool last_session_exited_cleanly_; |
254 }; | 252 }; |
255 | 253 |
256 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 254 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |