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

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

Issue 7464029: Adding QuotaManager logic to TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uglay. Created 9 years, 5 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/browser/browsing_data_remover_unittest.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 WebKitContext; 51 class WebKitContext;
52 52
53 namespace net { 53 namespace net {
54 class URLRequestContextGetter; 54 class URLRequestContextGetter;
55 } 55 }
56 56
57 namespace quota {
58 class QuotaManager;
59 }
60
57 class TestingProfile : public Profile { 61 class TestingProfile : public Profile {
58 public: 62 public:
59 TestingProfile(); 63 TestingProfile();
60 64
61 virtual ~TestingProfile(); 65 virtual ~TestingProfile();
62 66
63 // Creates the favicon service. Consequent calls would recreate the service. 67 // Creates the favicon service. Consequent calls would recreate the service.
64 void CreateFaviconService(); 68 void CreateFaviconService();
65 69
66 // Creates the history service. If |delete_file| is true, the history file is 70 // Creates the history service. If |delete_file| is true, the history file is
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 virtual std::string GetProfileName(); 140 virtual std::string GetProfileName();
137 virtual FilePath GetPath(); 141 virtual FilePath GetPath();
138 void set_incognito(bool incognito) { incognito_ = incognito; } 142 void set_incognito(bool incognito) { incognito_ = incognito; }
139 virtual bool IsOffTheRecord(); 143 virtual bool IsOffTheRecord();
140 // Assumes ownership. 144 // Assumes ownership.
141 virtual void SetOffTheRecordProfile(Profile* profile); 145 virtual void SetOffTheRecordProfile(Profile* profile);
142 virtual Profile* GetOffTheRecordProfile(); 146 virtual Profile* GetOffTheRecordProfile();
143 virtual void DestroyOffTheRecordProfile() {} 147 virtual void DestroyOffTheRecordProfile() {}
144 virtual bool HasOffTheRecordProfile(); 148 virtual bool HasOffTheRecordProfile();
145 virtual Profile* GetOriginalProfile(); 149 virtual Profile* GetOriginalProfile();
146 void SetAppCacheService(ChromeAppCacheService* appcache_service);
147 virtual ChromeAppCacheService* GetAppCacheService(); 150 virtual ChromeAppCacheService* GetAppCacheService();
148 virtual webkit_database::DatabaseTracker* GetDatabaseTracker(); 151 virtual webkit_database::DatabaseTracker* GetDatabaseTracker();
149 virtual VisitedLinkMaster* GetVisitedLinkMaster(); 152 virtual VisitedLinkMaster* GetVisitedLinkMaster();
150 virtual ExtensionService* GetExtensionService(); 153 virtual ExtensionService* GetExtensionService();
151 virtual UserScriptMaster* GetUserScriptMaster(); 154 virtual UserScriptMaster* GetUserScriptMaster();
152 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager(); 155 virtual ExtensionDevToolsManager* GetExtensionDevToolsManager();
153 virtual ExtensionProcessManager* GetExtensionProcessManager(); 156 virtual ExtensionProcessManager* GetExtensionProcessManager();
154 virtual ExtensionMessageService* GetExtensionMessageService(); 157 virtual ExtensionMessageService* GetExtensionMessageService();
155 virtual ExtensionEventRouter* GetExtensionEventRouter(); 158 virtual ExtensionEventRouter* GetExtensionEventRouter();
156 void SetExtensionSpecialStoragePolicy( 159 void SetExtensionSpecialStoragePolicy(
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // it in the content module. 282 // it in the content module.
280 quota::SpecialStoragePolicy* GetSpecialStoragePolicy(); 283 quota::SpecialStoragePolicy* GetSpecialStoragePolicy();
281 284
282 protected: 285 protected:
283 base::Time start_time_; 286 base::Time start_time_;
284 scoped_ptr<PrefService> prefs_; 287 scoped_ptr<PrefService> prefs_;
285 // ref only for right type, lifecycle is managed by prefs_ 288 // ref only for right type, lifecycle is managed by prefs_
286 TestingPrefService* testing_prefs_; 289 TestingPrefService* testing_prefs_;
287 290
288 private: 291 private:
292 // Creates QuotaManager and its clients.
293 void CreateQuotaManagerAndClients();
294
289 // Destroys favicon service if it has been created. 295 // Destroys favicon service if it has been created.
290 void DestroyFaviconService(); 296 void DestroyFaviconService();
291 297
292 // If the webdata service has been created, it is destroyed. This is invoked 298 // If the webdata service has been created, it is destroyed. This is invoked
293 // from the destructor. 299 // from the destructor.
294 void DestroyWebDataService(); 300 void DestroyWebDataService();
295 301
296 // Creates a TestingPrefService and associates it with the TestingProfile. 302 // Creates a TestingPrefService and associates it with the TestingProfile.
297 void CreateTestingPrefService(); 303 void CreateTestingPrefService();
298 304
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // invoked. 371 // invoked.
366 scoped_ptr<ExtensionPrefs> extension_prefs_; 372 scoped_ptr<ExtensionPrefs> extension_prefs_;
367 373
368 scoped_ptr<ExtensionService> extension_service_; 374 scoped_ptr<ExtensionService> extension_service_;
369 375
370 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_; 376 scoped_ptr<ExtensionPrefValueMap> extension_pref_value_map_;
371 377
372 scoped_refptr<ExtensionSpecialStoragePolicy> 378 scoped_refptr<ExtensionSpecialStoragePolicy>
373 extension_special_storage_policy_; 379 extension_special_storage_policy_;
374 380
381 scoped_refptr<ChromeAppCacheService> appcache_service_;
382
383 // AppCacheService needs to be initialized on the IO thread, as does the
384 // request context that it requires.
385 bool appcache_service_init_finished_;
386
375 387
376 // The proxy prefs tracker. 388 // The proxy prefs tracker.
377 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 389 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
378 390
379 // We use a temporary directory to store testing profile data. 391 // We use a temporary directory to store testing profile data.
380 ScopedTempDir temp_dir_; 392 ScopedTempDir temp_dir_;
381 393
382 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; 394 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
383 395
384 scoped_ptr<prerender::PrerenderManager> prerender_manager_; 396 scoped_ptr<prerender::PrerenderManager> prerender_manager_;
385 397
386 // We keep a weak pointer to the dependency manager we want to notify on our 398 // We keep a weak pointer to the dependency manager we want to notify on our
387 // death. Defaults to the Singleton implementation but overridable for 399 // death. Defaults to the Singleton implementation but overridable for
388 // testing. 400 // testing.
389 ProfileDependencyManager* profile_dependency_manager_; 401 ProfileDependencyManager* profile_dependency_manager_;
390 402
391 scoped_refptr<ChromeAppCacheService> appcache_service_; 403 scoped_refptr<quota::QuotaManager> quota_manager_;
392 }; 404 };
393 405
394 #endif // CHROME_TEST_TESTING_PROFILE_H_ 406 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | chrome/test/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698