| 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/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // recreating the BookmarkModel. | 77 // recreating the BookmarkModel. |
| 78 // | 78 // |
| 79 // NOTE: this does not block until the bookmarks are loaded. For that use | 79 // NOTE: this does not block until the bookmarks are loaded. For that use |
| 80 // BlockUntilBookmarkModelLoaded. | 80 // BlockUntilBookmarkModelLoaded. |
| 81 void CreateBookmarkModel(bool delete_file); | 81 void CreateBookmarkModel(bool delete_file); |
| 82 | 82 |
| 83 // Creates an AutocompleteClassifier. If not invoked the | 83 // Creates an AutocompleteClassifier. If not invoked the |
| 84 // AutocompleteClassifier is NULL. | 84 // AutocompleteClassifier is NULL. |
| 85 void CreateAutocompleteClassifier(); | 85 void CreateAutocompleteClassifier(); |
| 86 | 86 |
| 87 // Creates a ProtocolHandlerRegistry. If not invoked the protocol handler |
| 88 // registry is NULL. |
| 89 void CreateProtocolHandlerRegistry(); |
| 90 |
| 87 // Creates the webdata service. If |delete_file| is true, the webdata file is | 91 // Creates the webdata service. If |delete_file| is true, the webdata file is |
| 88 // deleted first, then the WebDataService is created. As TestingProfile | 92 // deleted first, then the WebDataService is created. As TestingProfile |
| 89 // deletes the directory containing the files used by WebDataService, this | 93 // deletes the directory containing the files used by WebDataService, this |
| 90 // only matters if you're recreating the WebDataService. | 94 // only matters if you're recreating the WebDataService. |
| 91 void CreateWebDataService(bool delete_file); | 95 void CreateWebDataService(bool delete_file); |
| 92 | 96 |
| 93 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from | 97 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from |
| 94 // CreateBookmarkModel. | 98 // CreateBookmarkModel. |
| 95 void BlockUntilBookmarkModelLoaded(); | 99 void BlockUntilBookmarkModelLoaded(); |
| 96 | 100 |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 227 } |
| 224 virtual bool DidLastSessionExitCleanly(); | 228 virtual bool DidLastSessionExitCleanly(); |
| 225 virtual void MergeResourceString(int message_id, | 229 virtual void MergeResourceString(int message_id, |
| 226 std::wstring* output_string) {} | 230 std::wstring* output_string) {} |
| 227 virtual void MergeResourceInteger(int message_id, int* output_value) {} | 231 virtual void MergeResourceInteger(int message_id, int* output_value) {} |
| 228 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} | 232 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} |
| 229 virtual BookmarkModel* GetBookmarkModel(); | 233 virtual BookmarkModel* GetBookmarkModel(); |
| 230 virtual bool IsSameProfile(Profile *p); | 234 virtual bool IsSameProfile(Profile *p); |
| 231 virtual base::Time GetStartTime() const; | 235 virtual base::Time GetStartTime() const; |
| 232 virtual TabRestoreService* GetTabRestoreService(); | 236 virtual TabRestoreService* GetTabRestoreService(); |
| 237 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
| 233 virtual void ResetTabRestoreService() {} | 238 virtual void ResetTabRestoreService() {} |
| 234 virtual SpellCheckHost* GetSpellCheckHost(); | 239 virtual SpellCheckHost* GetSpellCheckHost(); |
| 235 virtual void ReinitializeSpellCheckHost(bool force) { } | 240 virtual void ReinitializeSpellCheckHost(bool force) { } |
| 236 virtual WebKitContext* GetWebKitContext(); | 241 virtual WebKitContext* GetWebKitContext(); |
| 237 virtual WebKitContext* GetOffTheRecordWebKitContext(); | 242 virtual WebKitContext* GetOffTheRecordWebKitContext(); |
| 238 virtual void MarkAsCleanShutdown() {} | 243 virtual void MarkAsCleanShutdown() {} |
| 239 virtual void InitExtensions() {} | 244 virtual void InitExtensions() {} |
| 240 virtual void InitPromoResources() {} | 245 virtual void InitPromoResources() {} |
| 246 virtual void InitRegisteredProtocolHandlers() {} |
| 241 virtual NTPResourceCache* GetNTPResourceCache(); | 247 virtual NTPResourceCache* GetNTPResourceCache(); |
| 242 | 248 |
| 243 virtual DesktopNotificationService* GetDesktopNotificationService(); | 249 virtual DesktopNotificationService* GetDesktopNotificationService(); |
| 244 virtual BackgroundContentsService* GetBackgroundContentsService() const; | 250 virtual BackgroundContentsService* GetBackgroundContentsService() const; |
| 245 virtual StatusTray* GetStatusTray(); | 251 virtual StatusTray* GetStatusTray(); |
| 246 virtual FilePath last_selected_directory(); | 252 virtual FilePath last_selected_directory(); |
| 247 virtual void set_last_selected_directory(const FilePath& path); | 253 virtual void set_last_selected_directory(const FilePath& path); |
| 248 #if defined(OS_CHROMEOS) | 254 #if defined(OS_CHROMEOS) |
| 249 virtual chromeos::ProxyConfigServiceImpl* | 255 virtual chromeos::ProxyConfigServiceImpl* |
| 250 GetChromeOSProxyConfigServiceImpl() { | 256 GetChromeOSProxyConfigServiceImpl() { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 | 304 |
| 299 // The favicon service. Only created if CreateFaviconService is invoked. | 305 // The favicon service. Only created if CreateFaviconService is invoked. |
| 300 scoped_refptr<FaviconService> favicon_service_; | 306 scoped_refptr<FaviconService> favicon_service_; |
| 301 | 307 |
| 302 // The history service. Only created if CreateHistoryService is invoked. | 308 // The history service. Only created if CreateHistoryService is invoked. |
| 303 scoped_refptr<HistoryService> history_service_; | 309 scoped_refptr<HistoryService> history_service_; |
| 304 | 310 |
| 305 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. | 311 // The BookmarkModel. Only created if CreateBookmarkModel is invoked. |
| 306 scoped_ptr<BookmarkModel> bookmark_bar_model_; | 312 scoped_ptr<BookmarkModel> bookmark_bar_model_; |
| 307 | 313 |
| 314 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry |
| 315 // is invoked. |
| 316 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; |
| 317 |
| 308 // The TokenService. Created by CreateTokenService. Filled with dummy data. | 318 // The TokenService. Created by CreateTokenService. Filled with dummy data. |
| 309 scoped_ptr<TokenService> token_service_; | 319 scoped_ptr<TokenService> token_service_; |
| 310 | 320 |
| 311 // The ProfileSyncService. Created by CreateProfileSyncService. | 321 // The ProfileSyncService. Created by CreateProfileSyncService. |
| 312 scoped_ptr<ProfileSyncService> profile_sync_service_; | 322 scoped_ptr<ProfileSyncService> profile_sync_service_; |
| 313 | 323 |
| 314 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier | 324 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier |
| 315 // is invoked. | 325 // is invoked. |
| 316 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; | 326 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_; |
| 317 | 327 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 explicit DerivedTestingProfile(Profile* profile); | 406 explicit DerivedTestingProfile(Profile* profile); |
| 397 virtual ~DerivedTestingProfile(); | 407 virtual ~DerivedTestingProfile(); |
| 398 | 408 |
| 399 virtual ProfileId GetRuntimeId(); | 409 virtual ProfileId GetRuntimeId(); |
| 400 | 410 |
| 401 protected: | 411 protected: |
| 402 Profile* original_profile_; | 412 Profile* original_profile_; |
| 403 }; | 413 }; |
| 404 | 414 |
| 405 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 415 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
| OLD | NEW |