| 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 | 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 last_selected_directory_ = path; | 281 last_selected_directory_ = path; |
| 282 } | 282 } |
| 283 | 283 |
| 284 | 284 |
| 285 // Schedules a task on the history backend and runs a nested loop until the | 285 // Schedules a task on the history backend and runs a nested loop until the |
| 286 // task is processed. This has the effect of blocking the caller until the | 286 // task is processed. This has the effect of blocking the caller until the |
| 287 // history service processes all pending requests. | 287 // history service processes all pending requests. |
| 288 void BlockUntilHistoryProcessesPendingRequests(); | 288 void BlockUntilHistoryProcessesPendingRequests(); |
| 289 | 289 |
| 290 // Creates and initializes a profile sync service if the tests require one. | 290 // Creates and initializes a profile sync service if the tests require one. |
| 291 virtual TokenService* GetTokenService(); |
| 291 virtual ProfileSyncService* GetProfileSyncService(); | 292 virtual ProfileSyncService* GetProfileSyncService(); |
| 292 virtual CloudPrintProxyService* GetCloudPrintProxyService() { return NULL; } | 293 virtual CloudPrintProxyService* GetCloudPrintProxyService() { return NULL; } |
| 293 | 294 |
| 294 protected: | 295 protected: |
| 295 // The path of the profile; the various database and other files are relative | 296 // The path of the profile; the various database and other files are relative |
| 296 // to this. | 297 // to this. |
| 297 FilePath path_; | 298 FilePath path_; |
| 298 base::Time start_time_; | 299 base::Time start_time_; |
| 299 scoped_ptr<PrefService> prefs_; | 300 scoped_ptr<PrefService> prefs_; |
| 300 | 301 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 312 | 313 |
| 313 // The favicon service. Only created if CreateFaviconService is invoked. | 314 // The favicon service. Only created if CreateFaviconService is invoked. |
| 314 scoped_refptr<FaviconService> favicon_service_; | 315 scoped_refptr<FaviconService> favicon_service_; |
| 315 | 316 |
| 316 // The history service. Only created if CreateHistoryService is invoked. | 317 // The history service. Only created if CreateHistoryService is invoked. |
| 317 scoped_refptr<HistoryService> history_service_; | 318 scoped_refptr<HistoryService> history_service_; |
| 318 | 319 |
| 319 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. | 320 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. |
| 320 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 321 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 321 | 322 |
| 323 // The TokenService. Created by CreateTokenService. Filled with dummy data. |
| 324 scoped_ptr<TokenService> token_service_; |
| 325 |
| 322 // The ProfileSyncService. Created by CreateProfileSyncService. | 326 // The ProfileSyncService. Created by CreateProfileSyncService. |
| 323 scoped_ptr<ProfileSyncService> profile_sync_service_; | 327 scoped_ptr<ProfileSyncService> profile_sync_service_; |
| 324 | 328 |
| 325 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier | 329 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier |
| 326 // is invoked. | 330 // is invoked. |
| 327 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 331 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
| 328 | 332 |
| 329 // The WebDataService. Only created if CreateWebDataService is invoked. | 333 // The WebDataService. Only created if CreateWebDataService is invoked. |
| 330 scoped_refptr<WebDataService> web_data_service_; | 334 scoped_refptr<WebDataService> web_data_service_; |
| 331 | 335 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 390 |
| 387 virtual ProfileId GetRuntimeId() { | 391 virtual ProfileId GetRuntimeId() { |
| 388 return original_profile_->GetRuntimeId(); | 392 return original_profile_->GetRuntimeId(); |
| 389 } | 393 } |
| 390 | 394 |
| 391 protected: | 395 protected: |
| 392 Profile* original_profile_; | 396 Profile* original_profile_; |
| 393 }; | 397 }; |
| 394 | 398 |
| 395 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 399 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
| OLD | NEW |