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

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

Issue 7601013: Web Intents: Hook up the register intent InfoBar with the WebIntentsRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes and more\! Created 9 years, 4 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_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_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 30 matching lines...) Expand all
41 class GeolocationContentSettingsMap; 41 class GeolocationContentSettingsMap;
42 class GeolocationPermissionContext; 42 class GeolocationPermissionContext;
43 class HistoryService; 43 class HistoryService;
44 class HostContentSettingsMap; 44 class HostContentSettingsMap;
45 class PrefService; 45 class PrefService;
46 class ProfileDependencyManager; 46 class ProfileDependencyManager;
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 WebIntentsRegistry;
51 class WebKitContext; 52 class WebKitContext;
52 53
53 namespace net { 54 namespace net {
54 class URLRequestContextGetter; 55 class URLRequestContextGetter;
55 } 56 }
56 57
57 class TestingProfile : public Profile { 58 class TestingProfile : public Profile {
58 public: 59 public:
59 TestingProfile(); 60 TestingProfile();
60 61
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 // set GetPrefs creates one, so normally you need not invoke this. If you need 175 // set GetPrefs creates one, so normally you need not invoke this. If you need
175 // to set a pref service you must invoke this before GetPrefs. 176 // to set a pref service you must invoke this before GetPrefs.
176 // TestingPrefService takes ownership of |prefs|. 177 // TestingPrefService takes ownership of |prefs|.
177 void SetPrefService(PrefService* prefs); 178 void SetPrefService(PrefService* prefs);
178 virtual PrefService* GetPrefs(); 179 virtual PrefService* GetPrefs();
179 virtual TemplateURLFetcher* GetTemplateURLFetcher(); 180 virtual TemplateURLFetcher* GetTemplateURLFetcher();
180 virtual history::TopSites* GetTopSites(); 181 virtual history::TopSites* GetTopSites();
181 virtual history::TopSites* GetTopSitesWithoutCreating(); 182 virtual history::TopSites* GetTopSitesWithoutCreating();
182 virtual DownloadManager* GetDownloadManager(); 183 virtual DownloadManager* GetDownloadManager();
183 virtual PersonalDataManager* GetPersonalDataManager(); 184 virtual PersonalDataManager* GetPersonalDataManager();
185 void SetWebIntentsRegistry(WebIntentsRegistry* registry);
186 virtual WebIntentsRegistry* GetWebIntentsRegistry();
184 virtual fileapi::FileSystemContext* GetFileSystemContext(); 187 virtual fileapi::FileSystemContext* GetFileSystemContext();
185 virtual void SetQuotaManager(quota::QuotaManager* manager); 188 virtual void SetQuotaManager(quota::QuotaManager* manager);
186 virtual quota::QuotaManager* GetQuotaManager(); 189 virtual quota::QuotaManager* GetQuotaManager();
187 virtual BrowserSignin* GetBrowserSignin(); 190 virtual BrowserSignin* GetBrowserSignin();
188 virtual bool HasCreatedDownloadManager() const; 191 virtual bool HasCreatedDownloadManager() const;
189 192
190 // Returns a testing ContextGetter (if one has been created via 193 // Returns a testing ContextGetter (if one has been created via
191 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: 194 // CreateRequestContext) or NULL. This is not done on-demand for two reasons:
192 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because 195 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because
193 // of the special memory management considerations for the 196 // of the special memory management considerations for the
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 328
326 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is 329 // The TemplateURLFetcher. Only created if CreateTemplateURLFetcher is
327 // invoked. 330 // invoked.
328 scoped_ptr<TemplateURLFetcher> template_url_fetcher_; 331 scoped_ptr<TemplateURLFetcher> template_url_fetcher_;
329 332
330 // Internally, this is a TestURLRequestContextGetter that creates a dummy 333 // Internally, this is a TestURLRequestContextGetter that creates a dummy
331 // request context. Currently, only the CookieMonster is hooked up. 334 // request context. Currently, only the CookieMonster is hooked up.
332 scoped_refptr<net::URLRequestContextGetter> request_context_; 335 scoped_refptr<net::URLRequestContextGetter> request_context_;
333 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_; 336 scoped_refptr<net::URLRequestContextGetter> extensions_request_context_;
334 337
338 // The WebIntentsRegistry, for the purpose of dependency injection.
339 scoped_refptr<WebIntentsRegistry> web_intents_registry_;
340
335 std::wstring id_; 341 std::wstring id_;
336 342
337 bool incognito_; 343 bool incognito_;
338 scoped_ptr<Profile> incognito_profile_; 344 scoped_ptr<Profile> incognito_profile_;
339 345
340 // Did the last session exit cleanly? Default is true. 346 // Did the last session exit cleanly? Default is true.
341 bool last_session_exited_cleanly_; 347 bool last_session_exited_cleanly_;
342 348
343
344 // FileSystemContext. Created lazily by GetFileSystemContext(). 349 // FileSystemContext. Created lazily by GetFileSystemContext().
345 scoped_refptr<fileapi::FileSystemContext> file_system_context_; 350 scoped_refptr<fileapi::FileSystemContext> file_system_context_;
346 351
347 // WebKitContext, lazily initialized by GetWebKitContext(). 352 // WebKitContext, lazily initialized by GetWebKitContext().
348 scoped_refptr<WebKitContext> webkit_context_; 353 scoped_refptr<WebKitContext> webkit_context_;
349 354
350 // The main database tracker for this profile. 355 // The main database tracker for this profile.
351 // Should be used only on the file thread. 356 // Should be used only on the file thread.
352 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; 357 scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
353 358
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 // testing. 394 // testing.
390 ProfileDependencyManager* profile_dependency_manager_; 395 ProfileDependencyManager* profile_dependency_manager_;
391 396
392 scoped_refptr<ChromeAppCacheService> appcache_service_; 397 scoped_refptr<ChromeAppCacheService> appcache_service_;
393 398
394 // The QuotaManager, only available if set explicitly via SetQuotaManager. 399 // The QuotaManager, only available if set explicitly via SetQuotaManager.
395 scoped_refptr<quota::QuotaManager> quota_manager_; 400 scoped_refptr<quota::QuotaManager> quota_manager_;
396 }; 401 };
397 402
398 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 403 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698