| OLD | NEW |
| 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 CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ |
| 6 #define CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ | 6 #define CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "content/browser/browser_context.h" | 11 #include "content/browser/browser_context.h" |
| 12 | 12 |
| 13 class WebKitContext; | 13 class WebKitContext; |
| 14 | 14 |
| 15 class TestBrowserContext : public content::BrowserContext { | 15 class TestBrowserContext : public content::BrowserContext { |
| 16 public: | 16 public: |
| 17 TestBrowserContext(); | 17 TestBrowserContext(); |
| 18 virtual ~TestBrowserContext(); | 18 virtual ~TestBrowserContext(); |
| 19 | 19 |
| 20 virtual FilePath GetPath() OVERRIDE; | 20 virtual FilePath GetPath() OVERRIDE; |
| 21 virtual bool IsOffTheRecord() OVERRIDE; | 21 virtual bool IsOffTheRecord() OVERRIDE; |
| 22 virtual SSLHostState* GetSSLHostState() OVERRIDE; | 22 virtual SSLHostState* GetSSLHostState() OVERRIDE; |
| 23 virtual DownloadManager* GetDownloadManager() OVERRIDE; | 23 virtual DownloadManager* GetDownloadManager() OVERRIDE; |
| 24 virtual bool HasCreatedDownloadManager() const OVERRIDE; | |
| 25 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; | 24 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; |
| 26 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( | 25 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( |
| 27 int renderer_child_id) OVERRIDE; | 26 int renderer_child_id) OVERRIDE; |
| 28 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; | 27 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; |
| 29 virtual const content::ResourceContext& GetResourceContext() OVERRIDE; | 28 virtual const content::ResourceContext& GetResourceContext() OVERRIDE; |
| 30 virtual HostZoomMap* GetHostZoomMap() OVERRIDE; | 29 virtual HostZoomMap* GetHostZoomMap() OVERRIDE; |
| 31 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() | 30 virtual GeolocationPermissionContext* GetGeolocationPermissionContext() |
| 32 OVERRIDE; | 31 OVERRIDE; |
| 33 virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; | 32 virtual SpeechInputPreferences* GetSpeechInputPreferences() OVERRIDE; |
| 34 virtual bool DidLastSessionExitCleanly() OVERRIDE; | 33 virtual bool DidLastSessionExitCleanly() OVERRIDE; |
| 35 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; | 34 virtual quota::QuotaManager* GetQuotaManager() OVERRIDE; |
| 36 virtual WebKitContext* GetWebKitContext() OVERRIDE; | 35 virtual WebKitContext* GetWebKitContext() OVERRIDE; |
| 37 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; | 36 virtual webkit_database::DatabaseTracker* GetDatabaseTracker() OVERRIDE; |
| 38 virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE; | 37 virtual ChromeBlobStorageContext* GetBlobStorageContext() OVERRIDE; |
| 39 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; | 38 virtual ChromeAppCacheService* GetAppCacheService() OVERRIDE; |
| 40 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; | 39 virtual fileapi::FileSystemContext* GetFileSystemContext() OVERRIDE; |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 // WebKitContext, lazily initialized by GetWebKitContext(). | 42 // WebKitContext, lazily initialized by GetWebKitContext(). |
| 44 scoped_refptr<WebKitContext> webkit_context_; | 43 scoped_refptr<WebKitContext> webkit_context_; |
| 45 | 44 |
| 46 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); | 45 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); |
| 47 }; | 46 }; |
| 48 | 47 |
| 49 #endif // CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ | 48 #endif // CONTENT_TEST_TEST_BROWSER_CONTEXT_H_ |
| OLD | NEW |