Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Side by Side Diff: chrome/test/testing_profile.h

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again and hope upload works this time Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/test/live_sync/live_sessions_sync_test.cc ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 215
217 virtual const content::ResourceContext& GetResourceContext(); 216 virtual const content::ResourceContext& GetResourceContext();
218 217
219 virtual net::SSLConfigService* GetSSLConfigService(); 218 virtual net::SSLConfigService* GetSSLConfigService();
220 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher(); 219 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher();
221 virtual FindBarState* GetFindBarState(); 220 virtual FindBarState* GetFindBarState();
222 virtual HostContentSettingsMap* GetHostContentSettingsMap(); 221 virtual HostContentSettingsMap* GetHostContentSettingsMap();
223 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); 222 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap();
224 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); 223 virtual GeolocationPermissionContext* GetGeolocationPermissionContext();
225 virtual HostZoomMap* GetHostZoomMap(); 224 virtual HostZoomMap* GetHostZoomMap();
226 void set_session_service(SessionService* session_service);
227 virtual SessionService* GetSessionService();
228 virtual void ShutdownSessionService() {}
229 virtual bool HasSessionService() const;
230 virtual bool HasProfileSyncService() const; 225 virtual bool HasProfileSyncService() const;
231 virtual std::wstring GetName(); 226 virtual std::wstring GetName();
232 virtual void SetName(const std::wstring& name) {} 227 virtual void SetName(const std::wstring& name) {}
233 virtual std::wstring GetID(); 228 virtual std::wstring GetID();
234 virtual void SetID(const std::wstring& id); 229 virtual void SetID(const std::wstring& id);
235 void set_last_session_exited_cleanly(bool value) { 230 void set_last_session_exited_cleanly(bool value) {
236 last_session_exited_cleanly_ = value; 231 last_session_exited_cleanly_ = value;
237 } 232 }
238 virtual bool DidLastSessionExitCleanly(); 233 virtual bool DidLastSessionExitCleanly();
239 virtual void MergeResourceString(int message_id, 234 virtual void MergeResourceString(int message_id,
240 std::wstring* output_string) {} 235 std::wstring* output_string) {}
241 virtual void MergeResourceInteger(int message_id, int* output_value) {} 236 virtual void MergeResourceInteger(int message_id, int* output_value) {}
242 virtual void MergeResourceBoolean(int message_id, bool* output_value) {} 237 virtual void MergeResourceBoolean(int message_id, bool* output_value) {}
243 virtual BookmarkModel* GetBookmarkModel(); 238 virtual BookmarkModel* GetBookmarkModel();
244 virtual bool IsSameProfile(Profile *p); 239 virtual bool IsSameProfile(Profile *p);
245 virtual base::Time GetStartTime() const; 240 virtual base::Time GetStartTime() const;
246 virtual TabRestoreService* GetTabRestoreService();
247 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry(); 241 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
248 virtual void ResetTabRestoreService() {}
249 virtual SpellCheckHost* GetSpellCheckHost(); 242 virtual SpellCheckHost* GetSpellCheckHost();
250 virtual void ReinitializeSpellCheckHost(bool force) { } 243 virtual void ReinitializeSpellCheckHost(bool force) { }
251 virtual WebKitContext* GetWebKitContext(); 244 virtual WebKitContext* GetWebKitContext();
252 virtual WebKitContext* GetOffTheRecordWebKitContext(); 245 virtual WebKitContext* GetOffTheRecordWebKitContext();
253 virtual void MarkAsCleanShutdown() {} 246 virtual void MarkAsCleanShutdown() {}
254 virtual void InitExtensions(bool extensions_enabled) {} 247 virtual void InitExtensions(bool extensions_enabled) {}
255 virtual void InitPromoResources() {} 248 virtual void InitPromoResources() {}
256 virtual void InitRegisteredProtocolHandlers() {} 249 virtual void InitRegisteredProtocolHandlers() {}
257 virtual NTPResourceCache* GetNTPResourceCache(); 250 virtual NTPResourceCache* GetNTPResourceCache();
258 251
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 333
341 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is 334 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is
342 // invoked. 335 // invoked.
343 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 336 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
344 337
345 // The TemplateURLModel. Only created if CreateTemplateURLModel is invoked. 338 // The TemplateURLModel. Only created if CreateTemplateURLModel is invoked.
346 scoped_ptr<TemplateURLModel> template_url_model_; 339 scoped_ptr<TemplateURLModel> template_url_model_;
347 340
348 scoped_ptr<NTPResourceCache> ntp_resource_cache_; 341 scoped_ptr<NTPResourceCache> ntp_resource_cache_;
349 342
350 // The SessionService. Defaults to NULL, but can be set using the setter.
351 scoped_ptr<SessionService> session_service_;
352
353 // Internally, this is a TestURLRequestContextGetter that creates a dummy 343 // Internally, this is a TestURLRequestContextGetter that creates a dummy
354 // request context. Currently, only the CookieMonster is hooked up. 344 // request context. Currently, only the CookieMonster is hooked up.
355 scoped_refptr<net::URLRequestContextGetter> request_context_; 345 scoped_refptr<net::URLRequestContextGetter> request_context_;
356 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 346 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
357 347
358 std::wstring id_; 348 std::wstring id_;
359 349
360 bool incognito_; 350 bool incognito_;
361 scoped_ptr<Profile> incognito_profile_; 351 scoped_ptr<Profile> incognito_profile_;
362 352
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 explicit DerivedTestingProfile(Profile* profile); 406 explicit DerivedTestingProfile(Profile* profile);
417 virtual ~DerivedTestingProfile(); 407 virtual ~DerivedTestingProfile();
418 408
419 virtual ProfileId GetRuntimeId(); 409 virtual ProfileId GetRuntimeId();
420 410
421 protected: 411 protected:
422 Profile* original_profile_; 412 Profile* original_profile_;
423 }; 413 };
424 414
425 #endif // CHROME_TEST_TESTING_PROFILE_H_ 415 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_sessions_sync_test.cc ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698