OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 virtual TabRestoreService* GetTabRestoreService() { return NULL; } | 217 virtual TabRestoreService* GetTabRestoreService() { return NULL; } |
218 virtual void ResetTabRestoreService() {} | 218 virtual void ResetTabRestoreService() {} |
219 virtual SpellCheckHost* GetSpellCheckHost() { return NULL; } | 219 virtual SpellCheckHost* GetSpellCheckHost() { return NULL; } |
220 virtual void ReinitializeSpellCheckHost(bool force) { } | 220 virtual void ReinitializeSpellCheckHost(bool force) { } |
221 virtual WebKitContext* GetWebKitContext(); | 221 virtual WebKitContext* GetWebKitContext(); |
222 virtual WebKitContext* GetOffTheRecordWebKitContext() { return NULL; } | 222 virtual WebKitContext* GetOffTheRecordWebKitContext() { return NULL; } |
223 virtual void MarkAsCleanShutdown() {} | 223 virtual void MarkAsCleanShutdown() {} |
224 virtual void InitExtensions() {} | 224 virtual void InitExtensions() {} |
225 virtual void InitWebResources() {} | 225 virtual void InitWebResources() {} |
226 virtual NTPResourceCache* GetNTPResourceCache(); | 226 virtual NTPResourceCache* GetNTPResourceCache(); |
| 227 |
227 virtual DesktopNotificationService* GetDesktopNotificationService(); | 228 virtual DesktopNotificationService* GetDesktopNotificationService(); |
228 virtual BackgroundContentsService* GetBackgroundContentsService() { | 229 virtual BackgroundContentsService* GetBackgroundContentsService() { |
229 return NULL; | 230 return NULL; |
230 } | 231 } |
231 virtual StatusTray* GetStatusTray() { | 232 virtual StatusTray* GetStatusTray() { |
232 return NULL; | 233 return NULL; |
233 } | 234 } |
234 virtual FilePath last_selected_directory() { | 235 virtual FilePath last_selected_directory() { |
235 return last_selected_directory_; | 236 return last_selected_directory_; |
236 } | 237 } |
237 virtual void set_last_selected_directory(const FilePath& path) { | 238 virtual void set_last_selected_directory(const FilePath& path) { |
238 last_selected_directory_ = path; | 239 last_selected_directory_ = path; |
239 } | 240 } |
240 #if defined(OS_CHROMEOS) | 241 #if defined(OS_CHROMEOS) |
241 virtual chromeos::ProxyConfigServiceImpl* | 242 virtual chromeos::ProxyConfigServiceImpl* |
242 GetChromeOSProxyConfigServiceImpl() { | 243 GetChromeOSProxyConfigServiceImpl() { |
243 return NULL; | 244 return NULL; |
244 } | 245 } |
245 #endif // defined(OS_CHROMEOS) | 246 #endif // defined(OS_CHROMEOS) |
246 | 247 |
247 // Schedules a task on the history backend and runs a nested loop until the | 248 // Schedules a task on the history backend and runs a nested loop until the |
248 // task is processed. This has the effect of blocking the caller until the | 249 // task is processed. This has the effect of blocking the caller until the |
249 // history service processes all pending requests. | 250 // history service processes all pending requests. |
250 void BlockUntilHistoryProcessesPendingRequests(); | 251 void BlockUntilHistoryProcessesPendingRequests(); |
251 | 252 |
252 // Creates and initializes a profile sync service if the tests require one. | 253 // Creates and initializes a profile sync service if the tests require one. |
253 virtual TokenService* GetTokenService(); | 254 virtual TokenService* GetTokenService(); |
254 virtual ProfileSyncService* GetProfileSyncService(); | 255 virtual ProfileSyncService* GetProfileSyncService(); |
| 256 virtual ProfileSyncService* GetProfileSyncService( |
| 257 const std::string& cros_notes); |
255 virtual CloudPrintProxyService* GetCloudPrintProxyService() { return NULL; } | 258 virtual CloudPrintProxyService* GetCloudPrintProxyService() { return NULL; } |
256 | 259 |
257 virtual ChromeBlobStorageContext* GetBlobStorageContext() { | 260 virtual ChromeBlobStorageContext* GetBlobStorageContext() { |
258 return NULL; | 261 return NULL; |
259 } | 262 } |
260 | 263 |
261 protected: | 264 protected: |
262 base::Time start_time_; | 265 base::Time start_time_; |
263 scoped_ptr<TestingPrefService> prefs_; | 266 scoped_ptr<TestingPrefService> prefs_; |
264 | 267 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 | 360 |
358 virtual ProfileId GetRuntimeId() { | 361 virtual ProfileId GetRuntimeId() { |
359 return original_profile_->GetRuntimeId(); | 362 return original_profile_->GetRuntimeId(); |
360 } | 363 } |
361 | 364 |
362 protected: | 365 protected: |
363 Profile* original_profile_; | 366 Profile* original_profile_; |
364 }; | 367 }; |
365 | 368 |
366 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 369 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |