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_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 "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 30 matching lines...) Expand all Loading... | |
41 class GeolocationContentSettingsMap; | 41 class GeolocationContentSettingsMap; |
42 class GeolocationPermissionContext; | 42 class GeolocationPermissionContext; |
43 class HistoryService; | 43 class HistoryService; |
44 class HostContentSettingsMap; | 44 class HostContentSettingsMap; |
45 class PrefService; | 45 class PrefService; |
46 class ProfileDependencyManager; | 46 class ProfileDependencyManager; |
47 class ProfileSyncService; | 47 class ProfileSyncService; |
48 class TemplateURLService; | 48 class TemplateURLService; |
49 class TestingPrefService; | 49 class TestingPrefService; |
50 class ThemeService; | 50 class ThemeService; |
51 class WebIntentsRegistry; | |
51 class WebKitContext; | 52 class WebKitContext; |
52 | 53 |
53 namespace net { | 54 namespace net { |
54 class URLRequestContextGetter; | 55 class URLRequestContextGetter; |
55 } | 56 } |
56 | 57 |
57 class TestingProfile : public Profile { | 58 class TestingProfile : public Profile { |
58 public: | 59 public: |
59 TestingProfile(); | 60 TestingProfile(); |
60 | 61 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 // set GetPrefs creates one, so normally you need not invoke this. If you need | 175 // set GetPrefs creates one, so normally you need not invoke this. If you need |
175 // to set a pref service you must invoke this before GetPrefs. | 176 // to set a pref service you must invoke this before GetPrefs. |
176 // TestingPrefService takes ownership of |prefs|. | 177 // TestingPrefService takes ownership of |prefs|. |
177 void SetPrefService(PrefService* prefs); | 178 void SetPrefService(PrefService* prefs); |
178 virtual PrefService* GetPrefs(); | 179 virtual PrefService* GetPrefs(); |
179 virtual TemplateURLFetcher* GetTemplateURLFetcher(); | 180 virtual TemplateURLFetcher* GetTemplateURLFetcher(); |
180 virtual history::TopSites* GetTopSites(); | 181 virtual history::TopSites* GetTopSites(); |
181 virtual history::TopSites* GetTopSitesWithoutCreating(); | 182 virtual history::TopSites* GetTopSitesWithoutCreating(); |
182 virtual DownloadManager* GetDownloadManager(); | 183 virtual DownloadManager* GetDownloadManager(); |
183 virtual PersonalDataManager* GetPersonalDataManager(); | 184 virtual PersonalDataManager* GetPersonalDataManager(); |
185 void SetWebIntentsRegistry(WebIntentsRegistry* registry); | |
186 virtual WebIntentsRegistry* GetWebIntentsRegistry(); | |
184 virtual fileapi::FileSystemContext* GetFileSystemContext(); | 187 virtual fileapi::FileSystemContext* GetFileSystemContext(); |
185 virtual void SetQuotaManager(quota::QuotaManager* manager); | 188 virtual void SetQuotaManager(quota::QuotaManager* manager); |
186 virtual quota::QuotaManager* GetQuotaManager(); | 189 virtual quota::QuotaManager* GetQuotaManager(); |
187 virtual BrowserSignin* GetBrowserSignin(); | 190 virtual BrowserSignin* GetBrowserSignin(); |
188 virtual bool HasCreatedDownloadManager() const; | 191 virtual bool HasCreatedDownloadManager() const; |
189 | 192 |
190 // Returns a testing ContextGetter (if one has been created via | 193 // Returns a testing ContextGetter (if one has been created via |
191 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: | 194 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: |
192 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because | 195 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because |
193 // of the special memory management considerations for the | 196 // of the special memory management considerations for the |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 | 328 |
326 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is | 329 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is |
327 // invoked. | 330 // invoked. |
328 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 331 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
329 | 332 |
330 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 333 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
331 // request context. Currently, only the CookieMonster is hooked up. | 334 // request context. Currently, only the CookieMonster is hooked up. |
332 scoped_refptr<net::URLRequestContextGetter> request_context_; | 335 scoped_refptr<net::URLRequestContextGetter> request_context_; |
333 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 336 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
334 | 337 |
338 // | |
groby-ooo-7-16
2011/08/09 01:58:15
Is the empty comment intentional?
James Hawkins
2011/08/09 02:26:52
Done.
| |
339 scoped_refptr<WebIntentsRegistry> web_intents_registry_; | |
340 | |
335 std::wstring id_; | 341 std::wstring id_; |
336 | 342 |
337 bool incognito_; | 343 bool incognito_; |
338 scoped_ptr<Profile> incognito_profile_; | 344 scoped_ptr<Profile> incognito_profile_; |
339 | 345 |
340 // Did the last session exit cleanly? Default is true. | 346 // Did the last session exit cleanly? Default is true. |
341 bool last_session_exited_cleanly_; | 347 bool last_session_exited_cleanly_; |
342 | 348 |
343 | 349 |
344 // FileSystemContext. Created lazily by GetFileSystemContext(). | 350 // FileSystemContext. Created lazily by GetFileSystemContext(). |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
389 // testing. | 395 // testing. |
390 ProfileDependencyManager* profile_dependency_manager_; | 396 ProfileDependencyManager* profile_dependency_manager_; |
391 | 397 |
392 scoped_refptr<ChromeAppCacheService> appcache_service_; | 398 scoped_refptr<ChromeAppCacheService> appcache_service_; |
393 | 399 |
394 // The QuotaManager, only available if set explicitly via SetQuotaManager. | 400 // The QuotaManager, only available if set explicitly via SetQuotaManager. |
395 scoped_refptr<quota::QuotaManager> quota_manager_; | 401 scoped_refptr<quota::QuotaManager> quota_manager_; |
396 }; | 402 }; |
397 | 403 |
398 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ | 404 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ |
OLD | NEW |