OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 virtual WebDataService* GetWebDataServiceWithoutCreating() { | 107 virtual WebDataService* GetWebDataServiceWithoutCreating() { |
108 return NULL; | 108 return NULL; |
109 } | 109 } |
110 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { | 110 virtual PasswordStore* GetPasswordStore(ServiceAccessType access) { |
111 return NULL; | 111 return NULL; |
112 } | 112 } |
113 virtual PrefService* GetPrefs() { | 113 virtual PrefService* GetPrefs() { |
114 if (!prefs_.get()) { | 114 if (!prefs_.get()) { |
115 FilePath prefs_filename = | 115 FilePath prefs_filename = |
116 path_.Append(FILE_PATH_LITERAL("TestPreferences")); | 116 path_.Append(FILE_PATH_LITERAL("TestPreferences")); |
117 prefs_.reset(new PrefService(prefs_filename, NULL)); | 117 prefs_.reset(new PrefService(prefs_filename)); |
118 Profile::RegisterUserPrefs(prefs_.get()); | 118 Profile::RegisterUserPrefs(prefs_.get()); |
119 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); | 119 browser::RegisterAllPrefs(prefs_.get(), prefs_.get()); |
120 } | 120 } |
121 return prefs_.get(); | 121 return prefs_.get(); |
122 } | 122 } |
123 virtual TemplateURLModel* GetTemplateURLModel() { | 123 virtual TemplateURLModel* GetTemplateURLModel() { |
124 return template_url_model_.get(); | 124 return template_url_model_.get(); |
125 } | 125 } |
126 virtual TemplateURLFetcher* GetTemplateURLFetcher() { return NULL; } | 126 virtual TemplateURLFetcher* GetTemplateURLFetcher() { return NULL; } |
127 virtual ThumbnailStore* GetThumbnailStore() { return NULL; } | 127 virtual ThumbnailStore* GetThumbnailStore() { return NULL; } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 246 |
247 virtual ProfileId GetRuntimeId() { | 247 virtual ProfileId GetRuntimeId() { |
248 return original_profile_->GetRuntimeId(); | 248 return original_profile_->GetRuntimeId(); |
249 } | 249 } |
250 | 250 |
251 protected: | 251 protected: |
252 Profile* original_profile_; | 252 Profile* original_profile_; |
253 }; | 253 }; |
254 | 254 |
255 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 255 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |