blob: e13436d7635ea5e6948b2e1e1b0c6f0582505f8c [file] [log] [blame]
[email protected]9a8c4022011-01-25 14:25:331// Copyright (c) 2011 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]a4ff9eae2011-08-01 19:58:165#ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6#define CHROME_TEST_BASE_TESTING_PROFILE_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
initial.commit09911bf2008-07-26 23:55:298
[email protected]87fa84412011-08-15 19:27:299#include <string>
10
[email protected]3b63f8f42011-03-28 01:54:1511#include "base/memory/ref_counted.h"
12#include "base/memory/scoped_ptr.h"
[email protected]e0785902011-05-19 23:34:1713#include "base/scoped_temp_dir.h"
[email protected]ca5e7402010-08-19 17:22:4714#include "base/timer.h"
[email protected]8ecad5e2010-12-02 21:18:3315#include "chrome/browser/profiles/profile.h"
[email protected]2261e7b72011-07-12 13:43:5516#include "content/browser/appcache/chrome_appcache_service.h"
initial.commit09911bf2008-07-26 23:55:2917
[email protected]e89b77d2011-04-15 18:58:1018namespace content {
19class ResourceContextGetter;
20}
21
[email protected]dbbad7a2010-08-13 18:18:3622namespace history {
23class TopSites;
24}
25
26namespace net {
27class CookieMonster;
28}
29
[email protected]36fb2c7c2011-04-04 15:49:0830namespace quota {
31class SpecialStoragePolicy;
32}
33
[email protected]dbbad7a2010-08-13 18:18:3634class AutocompleteClassifier;
35class BookmarkModel;
[email protected]2fb7dc982010-09-29 12:24:2836class CommandLine;
[email protected]73c47932010-12-06 18:13:4337class ExtensionPrefs;
[email protected]9a8c4022011-01-25 14:25:3338class ExtensionPrefStore;
39class ExtensionPrefValueMap;
[email protected]19eb80152011-02-26 00:28:4340class ExtensionSpecialStoragePolicy;
[email protected]dbbad7a2010-08-13 18:18:3641class FaviconService;
42class FindBarState;
[email protected]dbbad7a2010-08-13 18:18:3643class GeolocationPermissionContext;
44class HistoryService;
45class HostContentSettingsMap;
46class PrefService;
[email protected]5cdcd152011-03-31 22:48:5247class ProfileDependencyManager;
[email protected]e3e43d92010-02-26 22:02:3848class ProfileSyncService;
[email protected]8238dd62011-09-29 15:13:0149class SpeechInputPreferences;
[email protected]8e5c89a2011-06-07 18:13:3350class TemplateURLService;
[email protected]dbbad7a2010-08-13 18:18:3651class TestingPrefService;
[email protected]a0ea76c2011-03-23 17:36:4252class ThemeService;
[email protected]dbbad7a2010-08-13 18:18:3653class WebKitContext;
[email protected]8cb5d5b2010-02-09 11:36:1654
[email protected]abe2c032011-03-31 18:49:3455namespace net {
56class URLRequestContextGetter;
57}
58
initial.commit09911bf2008-07-26 23:55:2959class TestingProfile : public Profile {
60 public:
[email protected]49a25632011-08-31 17:03:4861 // Default constructor that cannot be used with multi-profiles.
[email protected]f25387b2008-08-21 15:20:3362 TestingProfile();
[email protected]965524b2009-04-04 21:32:4063
[email protected]49a25632011-08-31 17:03:4864 // Multi-profile aware constructor that takes the path to a directory managed
65 // for this profile. This constructor is meant to be used by
66 // TestingProfileManager::CreateTestingProfile. If you need to create multi-
67 // profile profiles, use that factory method instead of this directly.
68 explicit TestingProfile(const FilePath& path);
69
initial.commit09911bf2008-07-26 23:55:2970 virtual ~TestingProfile();
71
[email protected]d2879af2010-02-08 16:02:5672 // Creates the favicon service. Consequent calls would recreate the service.
73 void CreateFaviconService();
74
[email protected]f25387b2008-08-21 15:20:3375 // Creates the history service. If |delete_file| is true, the history file is
76 // deleted first, then the HistoryService is created. As TestingProfile
[email protected]d486a0852009-11-02 21:40:0077 // deletes the directory containing the files used by HistoryService, this
78 // only matters if you're recreating the HistoryService. If |no_db| is true,
79 // the history backend will fail to initialize its database; this is useful
80 // for testing error conditions.
81 void CreateHistoryService(bool delete_file, bool no_db);
initial.commit09911bf2008-07-26 23:55:2982
[email protected]809cc4d2010-10-27 15:22:5483 // Shuts down and nulls out the reference to HistoryService.
84 void DestroyHistoryService();
85
86 // Creates TopSites. This returns immediately, and top sites may not be
87 // loaded. Use BlockUntilTopSitesLoaded to ensure TopSites has finished
88 // loading.
89 void CreateTopSites();
90
91 // Shuts down and nulls out the reference to TopSites.
92 void DestroyTopSites();
93
[email protected]4d0cd7ce2008-08-11 16:40:5794 // Creates the BookmkarBarModel. If not invoked the bookmark bar model is
[email protected]90ef13132008-08-27 03:27:4695 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then
96 // the model is created. As TestingProfile deletes the directory containing
97 // the files used by HistoryService, the boolean only matters if you're
[email protected]d8e41ed2008-09-11 15:22:3298 // recreating the BookmarkModel.
[email protected]d364c652008-08-29 19:46:5699 //
100 // NOTE: this does not block until the bookmarks are loaded. For that use
101 // BlockUntilBookmarkModelLoaded.
[email protected]d8e41ed2008-09-11 15:22:32102 void CreateBookmarkModel(bool delete_file);
[email protected]4d0cd7ce2008-08-11 16:40:57103
[email protected]69c579e2010-04-23 20:01:00104 // Creates an AutocompleteClassifier. If not invoked the
105 // AutocompleteClassifier is NULL.
106 void CreateAutocompleteClassifier();
107
[email protected]a6d36cc2011-02-23 00:39:48108 // Creates a ProtocolHandlerRegistry. If not invoked the protocol handler
109 // registry is NULL.
110 void CreateProtocolHandlerRegistry();
111
[email protected]2609bc12010-01-24 08:32:55112 // Creates the webdata service. If |delete_file| is true, the webdata file is
113 // deleted first, then the WebDataService is created. As TestingProfile
114 // deletes the directory containing the files used by WebDataService, this
115 // only matters if you're recreating the WebDataService.
116 void CreateWebDataService(bool delete_file);
117
[email protected]d8e41ed2008-09-11 15:22:32118 // Blocks until the BookmarkModel finishes loaded. This is NOT invoked from
119 // CreateBookmarkModel.
[email protected]d364c652008-08-29 19:46:56120 void BlockUntilBookmarkModelLoaded();
121
[email protected]809cc4d2010-10-27 15:22:54122 // Blocks until TopSites finishes loading.
123 void BlockUntilTopSitesLoaded();
124
[email protected]8e5c89a2011-06-07 18:13:33125 // Creates a TemplateURLService. If not invoked the TemplateURLService is
126 // NULL. Creates a TemplateURLFetcher. If not invoked, the
127 // TemplateURLFetcher is NULL.
[email protected]fb9d1f42010-10-06 23:17:59128 void CreateTemplateURLFetcher();
129
[email protected]8e5c89a2011-06-07 18:13:33130 // Creates a TemplateURLService. If not invoked, the TemplateURLService is
131 // NULL.
132 void CreateTemplateURLService();
[email protected]fb9d1f42010-10-06 23:17:59133
[email protected]eaa7dd182010-12-14 11:09:00134 // Creates an ExtensionService initialized with the testing profile and
[email protected]2fb7dc982010-09-29 12:24:28135 // returns it. The profile keeps its own copy of a scoped_refptr to the
[email protected]eaa7dd182010-12-14 11:09:00136 // ExtensionService to make sure that is still alive to be notified when the
[email protected]2fb7dc982010-09-29 12:24:28137 // profile is destroyed.
[email protected]9a8c4022011-01-25 14:25:33138 ExtensionService* CreateExtensionService(const CommandLine* command_line,
[email protected]90310d92011-04-17 07:35:04139 const FilePath& install_directory,
140 bool autoupdate_enabled);
[email protected]2fb7dc982010-09-29 12:24:28141
[email protected]dbbad7a2010-08-13 18:18:36142 TestingPrefService* GetTestingPrefService();
143
[email protected]8e5c89a2011-06-07 18:13:33144 virtual TestingProfile* AsTestingProfile();
[email protected]29d70252011-04-28 02:16:58145 virtual std::string GetProfileName();
[email protected]f9dec9482010-08-20 20:42:19146 virtual FilePath GetPath();
[email protected]673514522011-07-13 18:17:18147 void set_incognito(bool incognito) { incognito_ = incognito; }
[email protected]fadc607b62011-02-07 17:55:50148 virtual bool IsOffTheRecord();
[email protected]93dba942011-02-23 22:45:01149 // Assumes ownership.
150 virtual void SetOffTheRecordProfile(Profile* profile);
[email protected]fadc607b62011-02-07 17:55:50151 virtual Profile* GetOffTheRecordProfile();
[email protected]860f55492009-03-27 19:50:59152 virtual void DestroyOffTheRecordProfile() {}
[email protected]fadc607b62011-02-07 17:55:50153 virtual bool HasOffTheRecordProfile();
[email protected]fadc607b62011-02-07 17:55:50154 virtual Profile* GetOriginalProfile();
[email protected]2261e7b72011-07-12 13:43:55155 void SetAppCacheService(ChromeAppCacheService* appcache_service);
[email protected]fadc607b62011-02-07 17:55:50156 virtual ChromeAppCacheService* GetAppCacheService();
[email protected]2f351cb2009-11-09 23:43:34157 virtual webkit_database::DatabaseTracker* GetDatabaseTracker();
[email protected]fadc607b62011-02-07 17:55:50158 virtual VisitedLinkMaster* GetVisitedLinkMaster();
[email protected]eaa7dd182010-12-14 11:09:00159 virtual ExtensionService* GetExtensionService();
[email protected]fadc607b62011-02-07 17:55:50160 virtual UserScriptMaster* GetUserScriptMaster();
161 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager();
162 virtual ExtensionProcessManager* GetExtensionProcessManager();
163 virtual ExtensionMessageService* GetExtensionMessageService();
164 virtual ExtensionEventRouter* GetExtensionEventRouter();
[email protected]2261e7b72011-07-12 13:43:55165 void SetExtensionSpecialStoragePolicy(
166 ExtensionSpecialStoragePolicy* extension_special_storage_policy);
[email protected]19eb80152011-02-26 00:28:43167 virtual ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy();
[email protected]fadc607b62011-02-07 17:55:50168 virtual SSLHostState* GetSSLHostState();
[email protected]fadc607b62011-02-07 17:55:50169 virtual FaviconService* GetFaviconService(ServiceAccessType access);
170 virtual HistoryService* GetHistoryService(ServiceAccessType access);
171 virtual HistoryService* GetHistoryServiceWithoutCreating();
[email protected]812b3a32010-01-08 05:36:04172 // The CookieMonster will only be returned if a Context has been created. Do
173 // this by calling CreateRequestContext(). See the note at GetRequestContext
174 // for more information.
[email protected]dbbad7a2010-08-13 18:18:36175 net::CookieMonster* GetCookieMonster();
[email protected]fadc607b62011-02-07 17:55:50176 virtual AutocompleteClassifier* GetAutocompleteClassifier();
[email protected]c620fd52011-07-22 18:33:29177 virtual history::ShortcutsBackend* GetShortcutsBackend();
[email protected]fadc607b62011-02-07 17:55:50178 virtual WebDataService* GetWebDataService(ServiceAccessType access);
179 virtual WebDataService* GetWebDataServiceWithoutCreating();
180 virtual PasswordStore* GetPasswordStore(ServiceAccessType access);
[email protected]7e03e812010-11-15 23:01:01181 // Sets the profile's PrefService. If a pref service hasn't been explicitly
182 // set GetPrefs creates one, so normally you need not invoke this. If you need
183 // to set a pref service you must invoke this before GetPrefs.
184 // TestingPrefService takes ownership of |prefs|.
[email protected]2fb7dc982010-09-29 12:24:28185 void SetPrefService(PrefService* prefs);
[email protected]dbbad7a2010-08-13 18:18:36186 virtual PrefService* GetPrefs();
[email protected]fadc607b62011-02-07 17:55:50187 virtual TemplateURLFetcher* GetTemplateURLFetcher();
[email protected]dbbad7a2010-08-13 18:18:36188 virtual history::TopSites* GetTopSites();
[email protected]fadc607b62011-02-07 17:55:50189 virtual history::TopSites* GetTopSitesWithoutCreating();
190 virtual DownloadManager* GetDownloadManager();
[email protected]397281f2011-02-14 05:15:53191 virtual fileapi::FileSystemContext* GetFileSystemContext();
[email protected]94704172011-08-01 16:23:40192 virtual void SetQuotaManager(quota::QuotaManager* manager);
[email protected]595765c2011-04-27 13:20:14193 virtual quota::QuotaManager* GetQuotaManager();
[email protected]fadc607b62011-02-07 17:55:50194 virtual bool HasCreatedDownloadManager() const;
[email protected]812b3a32010-01-08 05:36:04195
196 // Returns a testing ContextGetter (if one has been created via
197 // CreateRequestContext) or NULL. This is not done on-demand for two reasons:
198 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because
199 // of the special memory management considerations for the
200 // TestURLRequestContextGetter class, many tests would find themseleves
201 // leaking if they called this method without the necessary IO thread. This
202 // getter is currently only capable of returning a Context that helps test
203 // the CookieMonster. See implementation comments for more details.
[email protected]abe2c032011-03-31 18:49:34204 virtual net::URLRequestContextGetter* GetRequestContext();
[email protected]da5683db2011-04-23 17:12:21205 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
206 int renderer_child_id);
[email protected]812b3a32010-01-08 05:36:04207 void CreateRequestContext();
[email protected]7c893202010-10-07 20:18:02208 // Clears out the created request context (which must be done before shutting
209 // down the IO thread to avoid leaks).
210 void ResetRequestContext();
[email protected]812b3a32010-01-08 05:36:04211
[email protected]abe2c032011-03-31 18:49:34212 virtual net::URLRequestContextGetter* GetRequestContextForMedia();
213 virtual net::URLRequestContextGetter* GetRequestContextForExtensions();
214 virtual net::URLRequestContextGetter* GetRequestContextForIsolatedApp(
[email protected]d9696672011-03-15 22:45:09215 const std::string& app_id);
[email protected]812b3a32010-01-08 05:36:04216
[email protected]e89b77d2011-04-15 18:58:10217 virtual const content::ResourceContext& GetResourceContext();
218
[email protected]fadc607b62011-02-07 17:55:50219 virtual net::SSLConfigService* GetSSLConfigService();
220 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher();
[email protected]dbbad7a2010-08-13 18:18:36221 virtual FindBarState* GetFindBarState();
222 virtual HostContentSettingsMap* GetHostContentSettingsMap();
[email protected]dbbad7a2010-08-13 18:18:36223 virtual GeolocationPermissionContext* GetGeolocationPermissionContext();
[email protected]8238dd62011-09-29 15:13:01224 virtual SpeechInputPreferences* GetSpeechInputPreferences();
[email protected]fadc607b62011-02-07 17:55:50225 virtual HostZoomMap* GetHostZoomMap();
[email protected]fadc607b62011-02-07 17:55:50226 virtual bool HasProfileSyncService() const;
227 virtual std::wstring GetName();
[email protected]267433052009-10-02 00:20:06228 virtual void SetName(const std::wstring& name) {}
[email protected]fadc607b62011-02-07 17:55:50229 virtual std::wstring GetID();
230 virtual void SetID(const std::wstring& id);
[email protected]ea6f76572008-12-18 00:09:55231 void set_last_session_exited_cleanly(bool value) {
232 last_session_exited_cleanly_ = value;
233 }
[email protected]fadc607b62011-02-07 17:55:50234 virtual bool DidLastSessionExitCleanly();
initial.commit09911bf2008-07-26 23:55:29235 virtual void MergeResourceString(int message_id,
[email protected]267433052009-10-02 00:20:06236 std::wstring* output_string) {}
237 virtual void MergeResourceInteger(int message_id, int* output_value) {}
238 virtual void MergeResourceBoolean(int message_id, bool* output_value) {}
[email protected]fadc607b62011-02-07 17:55:50239 virtual BookmarkModel* GetBookmarkModel();
240 virtual bool IsSameProfile(Profile *p);
241 virtual base::Time GetStartTime() const;
[email protected]a6d36cc2011-02-23 00:39:48242 virtual ProtocolHandlerRegistry* GetProtocolHandlerRegistry();
[email protected]fadc607b62011-02-07 17:55:50243 virtual SpellCheckHost* GetSpellCheckHost();
[email protected]85c55dc2009-11-06 03:05:46244 virtual void ReinitializeSpellCheckHost(bool force) { }
[email protected]dbbad7a2010-08-13 18:18:36245 virtual WebKitContext* GetWebKitContext();
[email protected]fadc607b62011-02-07 17:55:50246 virtual WebKitContext* GetOffTheRecordWebKitContext();
[email protected]267433052009-10-02 00:20:06247 virtual void MarkAsCleanShutdown() {}
[email protected]0436b102011-04-15 18:30:03248 virtual void InitExtensions(bool extensions_enabled) {}
[email protected]92c699d2011-02-18 17:54:48249 virtual void InitPromoResources() {}
[email protected]a6d36cc2011-02-23 00:39:48250 virtual void InitRegisteredProtocolHandlers() {}
[email protected]e8234d32010-09-09 20:36:39251
[email protected]fadc607b62011-02-07 17:55:50252 virtual FilePath last_selected_directory();
253 virtual void set_last_selected_directory(const FilePath& path);
[email protected]f50278cd2010-08-24 17:34:08254#if defined(OS_CHROMEOS)
[email protected]62cb9942010-12-01 13:09:32255 virtual void SetupChromeOSEnterpriseExtensionObserver() {
256 }
[email protected]45b6ccca2011-02-16 04:27:46257 virtual void InitChromeOSPreferences() {
258 }
[email protected]088a2962011-01-26 12:58:42259 virtual void ChangeAppLocale(const std::string&, AppLocaleChangedVia) {
[email protected]61d68ef12011-01-13 14:02:56260 }
[email protected]dc43d7f2011-03-04 16:37:26261 virtual void OnLogin() {
262 }
[email protected]f50278cd2010-08-24 17:34:08263#endif // defined(OS_CHROMEOS)
initial.commit09911bf2008-07-26 23:55:29264
[email protected]cc5bfd42010-11-24 14:44:02265 virtual PrefProxyConfigTracker* GetProxyConfigTracker();
266
[email protected]0bfc29a2009-04-27 16:15:44267 // Schedules a task on the history backend and runs a nested loop until the
268 // task is processed. This has the effect of blocking the caller until the
269 // history service processes all pending requests.
270 void BlockUntilHistoryProcessesPendingRequests();
271
[email protected]345a8b72009-09-29 09:11:44272 // Creates and initializes a profile sync service if the tests require one.
[email protected]8e4c29612010-07-14 01:24:45273 virtual TokenService* GetTokenService();
[email protected]345a8b72009-09-29 09:11:44274 virtual ProfileSyncService* GetProfileSyncService();
[email protected]e8234d32010-09-09 20:36:39275 virtual ProfileSyncService* GetProfileSyncService(
276 const std::string& cros_notes);
[email protected]fadc607b62011-02-07 17:55:50277 virtual ChromeBlobStorageContext* GetBlobStorageContext();
278 virtual ExtensionInfoMap* GetExtensionInfoMap();
279 virtual PromoCounter* GetInstantPromoCounter();
[email protected]248ce192011-02-10 15:26:34280 virtual ChromeURLDataManager* GetChromeURLDataManager();
[email protected]8382d8c2011-09-15 03:43:17281 virtual chrome_browser_net::Predictor* GetNetworkPredictor();
[email protected]02896a82011-09-21 18:54:32282 virtual void DeleteTransportSecurityStateSince(base::Time time);
[email protected]fadc607b62011-02-07 17:55:50283 virtual PrefService* GetOffTheRecordPrefs();
[email protected]22339b12010-08-27 18:29:24284
[email protected]36fb2c7c2011-04-04 15:49:08285 // TODO(jam): remove me once webkit_context_unittest.cc doesn't use Profile
286 // and gets the quota::SpecialStoragePolicy* from whatever ends up replacing
287 // it in the content module.
288 quota::SpecialStoragePolicy* GetSpecialStoragePolicy();
289
initial.commit09911bf2008-07-26 23:55:29290 protected:
[email protected]e1acf6f2008-10-27 20:43:33291 base::Time start_time_;
[email protected]2fb7dc982010-09-29 12:24:28292 scoped_ptr<PrefService> prefs_;
293 // ref only for right type, lifecycle is managed by prefs_
294 TestingPrefService* testing_prefs_;
initial.commit09911bf2008-07-26 23:55:29295
296 private:
[email protected]d7e601b2011-09-14 19:13:53297 virtual void SetDownloadManagerDelegate(
298 ChromeDownloadManagerDelegate* delegate);
299
[email protected]49a25632011-08-31 17:03:48300 // Common initialization between the two constructors.
301 void Init();
302
[email protected]d2879af2010-02-08 16:02:56303 // Destroys favicon service if it has been created.
304 void DestroyFaviconService();
305
[email protected]2609bc12010-01-24 08:32:55306 // If the webdata service has been created, it is destroyed. This is invoked
307 // from the destructor.
308 void DestroyWebDataService();
309
[email protected]73c47932010-12-06 18:13:43310 // Creates a TestingPrefService and associates it with the TestingProfile.
[email protected]2fb7dc982010-09-29 12:24:28311 void CreateTestingPrefService();
312
[email protected]d2879af2010-02-08 16:02:56313 // The favicon service. Only created if CreateFaviconService is invoked.
[email protected]04732c0e2011-09-16 13:21:53314 scoped_ptr<FaviconService> favicon_service_;
[email protected]d2879af2010-02-08 16:02:56315
initial.commit09911bf2008-07-26 23:55:29316 // The history service. Only created if CreateHistoryService is invoked.
317 scoped_refptr<HistoryService> history_service_;
[email protected]4d0cd7ce2008-08-11 16:40:57318
[email protected]d8e41ed2008-09-11 15:22:32319 // The BookmarkModel. Only created if CreateBookmarkModel is invoked.
320 scoped_ptr<BookmarkModel> bookmark_bar_model_;
[email protected]4d0cd7ce2008-08-11 16:40:57321
[email protected]a6d36cc2011-02-23 00:39:48322 // The ProtocolHandlerRegistry. Only created if CreateProtocolHandlerRegistry
323 // is invoked.
324 scoped_refptr<ProtocolHandlerRegistry> protocol_handler_registry_;
325
[email protected]8e4c29612010-07-14 01:24:45326 // The TokenService. Created by CreateTokenService. Filled with dummy data.
327 scoped_ptr<TokenService> token_service_;
328
[email protected]345a8b72009-09-29 09:11:44329 // The ProfileSyncService. Created by CreateProfileSyncService.
[email protected]345a8b72009-09-29 09:11:44330 scoped_ptr<ProfileSyncService> profile_sync_service_;
[email protected]345a8b72009-09-29 09:11:44331
[email protected]69c579e2010-04-23 20:01:00332 // The AutocompleteClassifier. Only created if CreateAutocompleteClassifier
333 // is invoked.
334 scoped_ptr<AutocompleteClassifier> autocomplete_classifier_;
335
[email protected]2609bc12010-01-24 08:32:55336 // The WebDataService. Only created if CreateWebDataService is invoked.
337 scoped_refptr<WebDataService> web_data_service_;
338
[email protected]fb9d1f42010-10-06 23:17:59339 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is
340 // invoked.
341 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
342
[email protected]812b3a32010-01-08 05:36:04343 // Internally, this is a TestURLRequestContextGetter that creates a dummy
344 // request context. Currently, only the CookieMonster is hooked up.
[email protected]abe2c032011-03-31 18:49:34345 scoped_refptr<net::URLRequestContextGetter> request_context_;
346 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
[email protected]812b3a32010-01-08 05:36:04347
[email protected]848cd05e2008-09-19 18:33:48348 std::wstring id_;
[email protected]151e7e72008-10-16 15:43:12349
[email protected]5bb2f522011-03-25 19:04:44350 bool incognito_;
351 scoped_ptr<Profile> incognito_profile_;
[email protected]ea6f76572008-12-18 00:09:55352
353 // Did the last session exit cleanly? Default is true.
354 bool last_session_exited_cleanly_;
[email protected]2f351cb2009-11-09 23:43:34355
[email protected]cdba46992011-06-07 11:51:39356 // FileSystemContext. Created lazily by GetFileSystemContext().
357 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
[email protected]4e6419c2010-01-15 04:50:34358
359 // WebKitContext, lazily initialized by GetWebKitContext().
360 scoped_refptr<WebKitContext> webkit_context_;
[email protected]e284e6d82010-01-29 19:49:45361
[email protected]cdba46992011-06-07 11:51:39362 // The main database tracker for this profile.
363 // Should be used only on the file thread.
364 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
365
[email protected]08bc6302010-01-30 02:53:39366 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
[email protected]8b4b84ee2010-05-11 13:08:52367 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
[email protected]e5d2f7132010-04-09 18:13:53368
[email protected]8238dd62011-09-29 15:13:01369 scoped_refptr<SpeechInputPreferences> speech_input_preferences_;
370
[email protected]e5d2f7132010-04-09 18:13:53371 // Find bar state. Created lazily by GetFindBarState().
372 scoped_ptr<FindBarState> find_bar_state_;
[email protected]35896a32010-06-09 08:42:51373
374 FilePath last_selected_directory_;
[email protected]9ba208092010-08-10 20:02:08375 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails.
[email protected]f9dec9482010-08-20 20:42:19376
[email protected]eaa7dd182010-12-14 11:09:00377 // The Extension Preferences. Only created if CreateExtensionService is
[email protected]73c47932010-12-06 18:13:43378 // invoked.
379 scoped_ptr<ExtensionPrefs> extension_prefs_;
380
[email protected]14908b72011-04-20 06:54:36381 scoped_ptr<ExtensionService> extension_service_;
[email protected]2fb7dc982010-09-29 12:24:28382
[email protected]9a8c4022011-01-25 14:25:33383 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
384
[email protected]19eb80152011-02-26 00:28:43385 scoped_refptr<ExtensionSpecialStoragePolicy>
386 extension_special_storage_policy_;
387
[email protected]cc5bfd42010-11-24 14:44:02388 // The proxy prefs tracker.
389 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
390
[email protected]49a25632011-08-31 17:03:48391 // We use a temporary directory to store testing profile data. In a multi-
392 // profile environment, this is invalid and the directory is managed by the
393 // TestingProfileManager.
[email protected]9ba208092010-08-10 20:02:08394 ScopedTempDir temp_dir_;
[email protected]49a25632011-08-31 17:03:48395 // The path to this profile. This will be valid in either of the two above
396 // cases.
397 FilePath profile_path_;
[email protected]248ce192011-02-10 15:26:34398
399 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
[email protected]4850a7f2011-03-08 23:36:59400
[email protected]5cdcd152011-03-31 22:48:52401 // We keep a weak pointer to the dependency manager we want to notify on our
402 // death. Defaults to the Singleton implementation but overridable for
403 // testing.
404 ProfileDependencyManager* profile_dependency_manager_;
[email protected]2261e7b72011-07-12 13:43:55405
406 scoped_refptr<ChromeAppCacheService> appcache_service_;
[email protected]94704172011-08-01 16:23:40407
408 // The QuotaManager, only available if set explicitly via SetQuotaManager.
409 scoped_refptr<quota::QuotaManager> quota_manager_;
initial.commit09911bf2008-07-26 23:55:29410};
411
[email protected]a4ff9eae2011-08-01 19:58:16412#endif // CHROME_TEST_BASE_TESTING_PROFILE_H_