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 26 matching lines...) Expand all Loading... |
37 class ExtensionSpecialStoragePolicy; | 37 class ExtensionSpecialStoragePolicy; |
38 class FaviconService; | 38 class FaviconService; |
39 class FindBarState; | 39 class FindBarState; |
40 class GeolocationContentSettingsMap; | 40 class GeolocationContentSettingsMap; |
41 class GeolocationPermissionContext; | 41 class GeolocationPermissionContext; |
42 class HistoryService; | 42 class HistoryService; |
43 class HostContentSettingsMap; | 43 class HostContentSettingsMap; |
44 class PrefService; | 44 class PrefService; |
45 class ProfileDependencyManager; | 45 class ProfileDependencyManager; |
46 class ProfileSyncService; | 46 class ProfileSyncService; |
47 class SessionService; | |
48 class TemplateURLModel; | 47 class TemplateURLModel; |
49 class TestingPrefService; | 48 class TestingPrefService; |
50 class ThemeService; | 49 class ThemeService; |
51 class WebKitContext; | 50 class WebKitContext; |
52 | 51 |
53 namespace net { | 52 namespace net { |
54 class URLRequestContextGetter; | 53 class URLRequestContextGetter; |
55 } | 54 } |
56 | 55 |
57 class TestingProfile : public Profile { | 56 class TestingProfile : public Profile { |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 | 213 |
215 virtual const content::ResourceContext& GetResourceContext(); | 214 virtual const content::ResourceContext& GetResourceContext(); |
216 | 215 |
217 virtual net::SSLConfigService* GetSSLConfigService(); | 216 virtual net::SSLConfigService* GetSSLConfigService(); |
218 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); | 217 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); |
219 virtual FindBarState* GetFindBarState(); | 218 virtual FindBarState* GetFindBarState(); |
220 virtual HostContentSettingsMap* GetHostContentSettingsMap(); | 219 virtual HostContentSettingsMap* GetHostContentSettingsMap(); |
221 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); | 220 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); |
222 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); | 221 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); |
223 virtual HostZoomMap* GetHostZoomMap(); | 222 virtual HostZoomMap* GetHostZoomMap(); |
224 void set_session_service(SessionService* session_service); | |
225 virtual SessionService* GetSessionService(); | |
226 virtual void ShutdownSessionService() {} | |
227 virtual bool HasSessionService() const; | |
228 virtual bool HasProfileSyncService() const; | 223 virtual bool HasProfileSyncService() const; |
229 virtual std::wstring GetName(); | 224 virtual std::wstring GetName(); |
230 virtual void SetName(const std::wstring& name) {} | 225 virtual void SetName(const std::wstring& name) {} |
231 virtual std::wstring GetID(); | 226 virtual std::wstring GetID(); |
232 virtual void SetID(const std::wstring& id); | 227 virtual void SetID(const std::wstring& id); |
233 void set_last_session_exited_cleanly(bool value) { | 228 void set_last_session_exited_cleanly(bool value) { |
234 last_session_exited_cleanly_ = value; | 229 last_session_exited_cleanly_ = value; |
235 } | 230 } |
236 virtual bool DidLastSessionExitCleanly(); | 231 virtual bool DidLastSessionExitCleanly(); |
237 virtual void MergeResourceString(int message_id, | 232 virtual void MergeResourceString(int message_id, |
238 std::wstring* output_string) {} | 233 std::wstring* output_string) {} |
239 virtual void MergeResourceInteger(int message_id, int* output_value) {} | 234 virtual void MergeResourceInteger(int message_id, int* output_value) {} |
240 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} | 235 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} |
241 virtual BookmarkModel* GetBookmarkModel(); | 236 virtual BookmarkModel* GetBookmarkModel(); |
242 virtual bool IsSameProfile(Profile *p); | 237 virtual bool IsSameProfile(Profile *p); |
243 virtual base::Time GetStartTime() const; | 238 virtual base::Time GetStartTime() const; |
244 virtual TabRestoreService* GetTabRestoreService(); | |
245 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); | 239 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); |
246 virtual void ResetTabRestoreService() {} | |
247 virtual SpellCheckHost* GetSpellCheckHost(); | 240 virtual SpellCheckHost* GetSpellCheckHost(); |
248 virtual void ReinitializeSpellCheckHost(bool force) { } | 241 virtual void ReinitializeSpellCheckHost(bool force) { } |
249 virtual WebKitContext* GetWebKitContext(); | 242 virtual WebKitContext* GetWebKitContext(); |
250 virtual WebKitContext* GetOffTheRecordWebKitContext(); | 243 virtual WebKitContext* GetOffTheRecordWebKitContext(); |
251 virtual void MarkAsCleanShutdown() {} | 244 virtual void MarkAsCleanShutdown() {} |
252 virtual void InitExtensions(bool extensions_enabled) {} | 245 virtual void InitExtensions(bool extensions_enabled) {} |
253 virtual void InitPromoResources() {} | 246 virtual void InitPromoResources() {} |
254 virtual void InitRegisteredProtocolHandlers() {} | 247 virtual void InitRegisteredProtocolHandlers() {} |
255 virtual NTPResourceCache* GetNTPResourceCache(); | 248 virtual NTPResourceCache* GetNTPResourceCache(); |
256 | 249 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 332 |
340 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is | 333 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is |
341 // invoked. | 334 // invoked. |
342 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; | 335 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; |
343 | 336 |
344 // The TemplateURLModel. Only created if CreateTemplateURLModel is invoked. | 337 // The TemplateURLModel. Only created if CreateTemplateURLModel is invoked. |
345 scoped_ptr<TemplateURLModel> template_url_model_; | 338 scoped_ptr<TemplateURLModel> template_url_model_; |
346 | 339 |
347 scoped_ptr<NTPResourceCache> ntp_resource_cache_; | 340 scoped_ptr<NTPResourceCache> ntp_resource_cache_; |
348 | 341 |
349 // The SessionService. Defaults to NULL, but can be set using the setter. | |
350 scoped_ptr<SessionService> session_service_; | |
351 | |
352 // Internally, this is a TestURLRequestContextGetter that creates a dummy | 342 // Internally, this is a TestURLRequestContextGetter that creates a dummy |
353 // request context. Currently, only the CookieMonster is hooked up. | 343 // request context. Currently, only the CookieMonster is hooked up. |
354 scoped_refptr<net::URLRequestContextGetter> request_context_; | 344 scoped_refptr<net::URLRequestContextGetter> request_context_; |
355 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; | 345 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; |
356 | 346 |
357 std::wstring id_; | 347 std::wstring id_; |
358 | 348 |
359 bool incognito_; | 349 bool incognito_; |
360 scoped_ptr<Profile> incognito_profile_; | 350 scoped_ptr<Profile> incognito_profile_; |
361 | 351 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 explicit DerivedTestingProfile(Profile* profile); | 405 explicit DerivedTestingProfile(Profile* profile); |
416 virtual ~DerivedTestingProfile(); | 406 virtual ~DerivedTestingProfile(); |
417 | 407 |
418 virtual ProfileId GetRuntimeId(); | 408 virtual ProfileId GetRuntimeId(); |
419 | 409 |
420 protected: | 410 protected: |
421 Profile* original_profile_; | 411 Profile* original_profile_; |
422 }; | 412 }; |
423 | 413 |
424 #endif // CHROME_TEST_TESTING_PROFILE_H_ | 414 #endif // CHROME_TEST_TESTING_PROFILE_H_ |
OLD | NEW |