OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 #endif // defined(OS_CHROMEOS) | 267 #endif // defined(OS_CHROMEOS) |
268 | 268 |
269 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); | 269 virtual PrefProxyConfigTracker* GetProxyConfigTracker(); |
270 | 270 |
271 // Schedules a task on the history backend and runs a nested loop until the | 271 // Schedules a task on the history backend and runs a nested loop until the |
272 // task is processed. This has the effect of blocking the caller until the | 272 // task is processed. This has the effect of blocking the caller until the |
273 // history service processes all pending requests. | 273 // history service processes all pending requests. |
274 void BlockUntilHistoryProcessesPendingRequests(); | 274 void BlockUntilHistoryProcessesPendingRequests(); |
275 | 275 |
276 // Creates and initializes a profile sync service if the tests require one. | 276 // Creates and initializes a profile sync service if the tests require one. |
| 277 virtual AuthenticationService* GetAuthenticationService(); |
277 virtual TokenService* GetTokenService(); | 278 virtual TokenService* GetTokenService(); |
278 virtual ProfileSyncService* GetProfileSyncService(); | 279 virtual ProfileSyncService* GetProfileSyncService(); |
279 virtual ProfileSyncService* GetProfileSyncService( | 280 virtual ProfileSyncService* GetProfileSyncService( |
280 const std::string& cros_notes); | 281 const std::string& cros_notes); |
281 virtual CloudPrintProxyService* GetCloudPrintProxyService(); | 282 virtual CloudPrintProxyService* GetCloudPrintProxyService(); |
282 virtual ChromeBlobStorageContext* GetBlobStorageContext(); | 283 virtual ChromeBlobStorageContext* GetBlobStorageContext(); |
283 virtual ExtensionInfoMap* GetExtensionInfoMap(); | 284 virtual ExtensionInfoMap* GetExtensionInfoMap(); |
284 virtual PromoCounter* GetInstantPromoCounter(); | 285 virtual PromoCounter* GetInstantPromoCounter(); |
285 virtual policy::ProfilePolicyConnector* GetPolicyConnector(); | 286 virtual policy::ProfilePolicyConnector* GetPolicyConnector(); |
286 virtual ChromeURLDataManager* GetChromeURLDataManager(); | 287 virtual ChromeURLDataManager* GetChromeURLDataManager(); |
(...skipping 28 matching lines...) Expand all Loading... |
315 // The history service. Only created if CreateHistoryService is invoked. | 316 // The history service. Only created if CreateHistoryService is invoked. |
316 scoped_refptr<HistoryService> history_service_; | 317 scoped_refptr<HistoryService> history_service_; |
317 | 318 |
318 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. | 319 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. |
319 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 320 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
320 | 321 |
321 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry | 322 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry |
322 // is invoked. | 323 // is invoked. |
323 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; | 324 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; |
324 | 325 |
| 326 // The AuthenticationService. Created by CreateAuthenticationService. Filled |
| 327 // with dummy data. |
| 328 scoped_ptr<AuthenticationService> authentication_service_; |
| 329 |
325 // The TokenService. Created by CreateTokenService. Filled with dummy data. | 330 // The TokenService. Created by CreateTokenService. Filled with dummy data. |
326 scoped_ptr<TokenService> token_service_; | 331 scoped_ptr<TokenService> token_service_; |
327 | 332 |
328 // The ProfileSyncService. Created by CreateProfileSyncService. | 333 // The ProfileSyncService. Created by CreateProfileSyncService. |
329 scoped_ptr<ProfileSyncService> profile_sync_service_; | 334 scoped_ptr<ProfileSyncService> profile_sync_service_; |
330 | 335 |
331 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier | 336 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier |
332 // is invoked. | 337 // is invoked. |
333 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 338 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
334 | 339 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 explicit DerivedTestingProfile(Profile* profile); | 421 explicit DerivedTestingProfile(Profile* profile); |
417 virtual ~DerivedTestingProfile(); | 422 virtual ~DerivedTestingProfile(); |
418 | 423 |
419 virtual ProfileId GetRuntimeId(); | 424 virtual ProfileId GetRuntimeId(); |
420 | 425 |
421 protected: | 426 protected: |
422 Profile* original_profile_; | 427 Profile* original_profile_; |
423 }; | 428 }; |
424 | 429 |
425 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 430 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |