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

Side by Side Diff: content/shell/shell_browser_context.h

Issue 10820007: Move all the layout tests that ran under browser_tests to run under content_browsertests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix mac Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SHELL_SHELL_BROWSER_CONTEXT_H_ 5 #ifndef CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_
6 #define CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_ 6 #define CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/scoped_temp_dir.h" 12 #include "base/scoped_temp_dir.h"
13 #include "content/public/browser/browser_context.h" 13 #include "content/public/browser/browser_context.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class DownloadManagerDelegate; 17 class DownloadManagerDelegate;
18 class ResourceContext; 18 class ResourceContext;
19 class ShellBrowserMainParts; 19 class ShellBrowserMainParts;
20 class ShellDownloadManagerDelegate; 20 class ShellDownloadManagerDelegate;
21 21
22 class ShellBrowserContext : public BrowserContext { 22 class ShellBrowserContext : public BrowserContext {
23 public: 23 public:
24 ShellBrowserContext(); 24 explicit ShellBrowserContext(bool off_the_record);
25 virtual ~ShellBrowserContext(); 25 virtual ~ShellBrowserContext();
26 26
27 // BrowserContext implementation. 27 // BrowserContext implementation.
28 virtual FilePath GetPath() OVERRIDE; 28 virtual FilePath GetPath() OVERRIDE;
29 virtual bool IsOffTheRecord() const OVERRIDE; 29 virtual bool IsOffTheRecord() const OVERRIDE;
30 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE; 30 virtual DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
31 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE; 31 virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
32 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 32 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
33 int renderer_child_id) OVERRIDE; 33 int renderer_child_id) OVERRIDE;
34 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE; 34 virtual net::URLRequestContextGetter* GetRequestContextForMedia() OVERRIDE;
35 virtual ResourceContext* GetResourceContext() OVERRIDE; 35 virtual ResourceContext* GetResourceContext() OVERRIDE;
36 virtual GeolocationPermissionContext* 36 virtual GeolocationPermissionContext*
37 GetGeolocationPermissionContext() OVERRIDE; 37 GetGeolocationPermissionContext() OVERRIDE;
38 virtual SpeechRecognitionPreferences* 38 virtual SpeechRecognitionPreferences*
39 GetSpeechRecognitionPreferences() OVERRIDE; 39 GetSpeechRecognitionPreferences() OVERRIDE;
40 virtual bool DidLastSessionExitCleanly() OVERRIDE; 40 virtual bool DidLastSessionExitCleanly() OVERRIDE;
41 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE; 41 virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
42 42
43 private: 43 private:
44 // Performs initialization of the ShellBrowserContext while IO is still 44 // Performs initialization of the ShellBrowserContext while IO is still
45 // allowed on the current thread. 45 // allowed on the current thread.
46 void InitWhileIOAllowed(); 46 void InitWhileIOAllowed();
47 47
48 bool off_the_record_;
48 ScopedTempDir testing_path_; 49 ScopedTempDir testing_path_;
49 FilePath path_; 50 FilePath path_;
50 scoped_ptr<ResourceContext> resource_context_; 51 scoped_ptr<ResourceContext> resource_context_;
51 scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_; 52 scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_;
52 scoped_refptr<net::URLRequestContextGetter> url_request_getter_; 53 scoped_refptr<net::URLRequestContextGetter> url_request_getter_;
53 54
54 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); 55 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext);
55 }; 56 };
56 57
57 } // namespace content 58 } // namespace content
58 59
59 #endif // CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_ 60 #endif // CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698