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

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: 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
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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_; 388 scoped_ptr<ChromeURLDataManager> chrome_url_data_manager_;
383 389
384 scoped_ptr<prerender::PrerenderManager> prerender_manager_; 390 scoped_ptr<prerender::PrerenderManager> prerender_manager_;
385 391
386 // We keep a weak pointer to the dependency manager we want to notify on our 392 // 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 393 // death. Defaults to the Singleton implementation but overridable for
388 // testing. 394 // testing.
389 ProfileDependencyManager* profile_dependency_manager_; 395 ProfileDependencyManager* profile_dependency_manager_;
390 396
391 scoped_refptr<ChromeAppCacheService> appcache_service_; 397 scoped_refptr<ChromeAppCacheService> appcache_service_;
398
399 scoped_refptr<quota::QuotaManager> quota_manager_;
392 }; 400 };
393 401
394 #endif // CHROME_TEST_TESTING_PROFILE_H_ 402 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698