Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BASE_TESTING_PROFILE_H_ | 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ | 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // Creates the BookmkarBarModel. If not invoked the bookmark bar model is | 87 // Creates the BookmkarBarModel. If not invoked the bookmark bar model is |
| 88 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then | 88 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then |
| 89 // the model is created. As TestingProfile deletes the directory containing | 89 // the model is created. As TestingProfile deletes the directory containing |
| 90 // the files used by HistoryService, the boolean only matters if you're | 90 // the files used by HistoryService, the boolean only matters if you're |
| 91 // recreating the BookmarkModel. | 91 // recreating the BookmarkModel. |
| 92 // | 92 // |
| 93 // NOTE: this does not block until the bookmarks are loaded. For that use | 93 // NOTE: this does not block until the bookmarks are loaded. For that use |
| 94 // BlockUntilBookmarkModelLoaded. | 94 // BlockUntilBookmarkModelLoaded. |
| 95 void CreateBookmarkModel(bool delete_file); | 95 void CreateBookmarkModel(bool delete_file); |
| 96 | 96 |
| 97 // Creates a ProtocolHandlerRegistry. If not invoked the protocol handler | |
| 98 // registry is NULL. | |
| 99 void CreateProtocolHandlerRegistry(); | |
| 100 | |
| 101 // Creates a WebDataService. If not invoked, the web data service is NULL. | 97 // Creates a WebDataService. If not invoked, the web data service is NULL. |
| 102 void CreateWebDataService(); | 98 void CreateWebDataService(); |
| 103 | 99 |
| 104 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from | 100 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from |
| 105 // CreateBookmarkModel. | 101 // CreateBookmarkModel. |
| 106 void BlockUntilBookmarkModelLoaded(); | 102 void BlockUntilBookmarkModelLoaded(); |
| 107 | 103 |
| 108 // Blocks until TopSites finishes loading. | 104 // Blocks until TopSites finishes loading. |
| 109 void BlockUntilTopSitesLoaded(); | 105 void BlockUntilTopSitesLoaded(); |
| 110 | 106 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 193 virtual void MergeResourceString(int message_id, | 189 virtual void MergeResourceString(int message_id, |
| 194 std::wstring* output_string) {} | 190 std::wstring* output_string) {} |
| 195 virtual void MergeResourceInteger(int message_id, int* output_value) {} | 191 virtual void MergeResourceInteger(int message_id, int* output_value) {} |
| 196 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} | 192 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} |
| 197 virtual BookmarkModel* GetBookmarkModel() OVERRIDE; | 193 virtual BookmarkModel* GetBookmarkModel() OVERRIDE; |
| 198 virtual bool IsSameProfile(Profile *p) OVERRIDE; | 194 virtual bool IsSameProfile(Profile *p) OVERRIDE; |
| 199 virtual base::Time GetStartTime() const OVERRIDE; | 195 virtual base::Time GetStartTime() const OVERRIDE; |
| 200 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; | 196 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry() OVERRIDE; |
| 201 virtual void MarkAsCleanShutdown() OVERRIDE {} | 197 virtual void MarkAsCleanShutdown() OVERRIDE {} |
| 202 virtual void InitPromoResources() OVERRIDE {} | 198 virtual void InitPromoResources() OVERRIDE {} |
| 203 virtual void InitRegisteredProtocolHandlers() OVERRIDE {} | |
| 204 | 199 |
| 205 virtual FilePath last_selected_directory() OVERRIDE; | 200 virtual FilePath last_selected_directory() OVERRIDE; |
| 206 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; | 201 virtual void set_last_selected_directory(const FilePath& path) OVERRIDE; |
| 207 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; | 202 virtual bool WasCreatedByVersionOrLater(const std::string& version) OVERRIDE; |
| 208 #if defined(OS_CHROMEOS) | 203 #if defined(OS_CHROMEOS) |
| 209 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE { | 204 virtual void SetupChromeOSEnterpriseExtensionObserver() OVERRIDE { |
| 210 } | 205 } |
| 211 virtual void InitChromeOSPreferences() OVERRIDE { | 206 virtual void InitChromeOSPreferences() OVERRIDE { |
| 212 } | 207 } |
| 213 virtual void ChangeAppLocale(const std::string&, | 208 virtual void ChangeAppLocale(const std::string&, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 250 void CreateTestingPrefService(); | 245 void CreateTestingPrefService(); |
| 251 | 246 |
| 252 virtual base::Callback<ChromeURLDataManagerBackend*(void)> | 247 virtual base::Callback<ChromeURLDataManagerBackend*(void)> |
| 253 GetChromeURLDataManagerBackendGetter() const OVERRIDE; | 248 GetChromeURLDataManagerBackendGetter() const OVERRIDE; |
| 254 | 249 |
| 255 // The favicon service. Only created if CreateFaviconService is invoked. | 250 // The favicon service. Only created if CreateFaviconService is invoked. |
| 256 scoped_ptr<FaviconService> favicon_service_; | 251 scoped_ptr<FaviconService> favicon_service_; |
| 257 | 252 |
| 258 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry | 253 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry |
| 259 // is invoked. | 254 // is invoked. |
| 260 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_; | 255 ProtocolHandlerRegistry* protocol_handler_registry_; |
|
Elliot Glaysher
2012/06/22 17:32:48
Is this ever used now? If not, cut it out.
Steve McKay
2012/06/22 18:01:58
Nope. Nuked!
| |
| 261 | 256 |
| 262 // The policy service. Lazily created as a stub. | 257 // The policy service. Lazily created as a stub. |
| 263 scoped_ptr<policy::PolicyService> policy_service_; | 258 scoped_ptr<policy::PolicyService> policy_service_; |
| 264 | 259 |
| 265 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 260 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
| 266 // request context. Currently, only the CookieMonster is hooked up. | 261 // request context. Currently, only the CookieMonster is hooked up. |
| 267 scoped_refptr<net::URLRequestContextGetter> request_context_; | 262 scoped_refptr<net::URLRequestContextGetter> request_context_; |
| 268 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 263 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
| 269 | 264 |
| 270 std::wstring id_; | 265 std::wstring id_; |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 301 // testing. | 296 // testing. |
| 302 ProfileDependencyManager* profile_dependency_manager_; | 297 ProfileDependencyManager* profile_dependency_manager_; |
| 303 | 298 |
| 304 scoped_ptr<content::MockResourceContext> resource_context_; | 299 scoped_ptr<content::MockResourceContext> resource_context_; |
| 305 | 300 |
| 306 // Weak pointer to a delegate for indicating that a profile was created. | 301 // Weak pointer to a delegate for indicating that a profile was created. |
| 307 Delegate* delegate_; | 302 Delegate* delegate_; |
| 308 }; | 303 }; |
| 309 | 304 |
| 310 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 305 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
| OLD | NEW |