OLD | NEW |
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 ShellResourceContext; |
19 class ShellDownloadManagerDelegate; | 19 class ShellDownloadManagerDelegate; |
20 | 20 |
21 class ShellBrowserContext : public BrowserContext { | 21 class ShellBrowserContext : public BrowserContext { |
22 public: | 22 public: |
23 explicit ShellBrowserContext(bool off_the_record); | 23 explicit ShellBrowserContext(bool off_the_record); |
24 virtual ~ShellBrowserContext(); | 24 virtual ~ShellBrowserContext(); |
25 | 25 |
26 // BrowserContext implementation. | 26 // BrowserContext implementation. |
27 virtual FilePath GetPath() OVERRIDE; | 27 virtual FilePath GetPath() OVERRIDE; |
28 virtual bool IsOffTheRecord() const OVERRIDE; | 28 virtual bool IsOffTheRecord() const OVERRIDE; |
(...skipping 18 matching lines...) Expand all Loading... |
47 | 47 |
48 private: | 48 private: |
49 // Performs initialization of the ShellBrowserContext while IO is still | 49 // Performs initialization of the ShellBrowserContext while IO is still |
50 // allowed on the current thread. | 50 // allowed on the current thread. |
51 void InitWhileIOAllowed(); | 51 void InitWhileIOAllowed(); |
52 | 52 |
53 bool off_the_record_; | 53 bool off_the_record_; |
54 bool ignore_certificate_errors_; | 54 bool ignore_certificate_errors_; |
55 ScopedTempDir testing_path_; | 55 ScopedTempDir testing_path_; |
56 FilePath path_; | 56 FilePath path_; |
57 scoped_ptr<ResourceContext> resource_context_; | 57 scoped_ptr<ShellResourceContext> resource_context_; |
58 scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_; | 58 scoped_refptr<ShellDownloadManagerDelegate> download_manager_delegate_; |
59 scoped_refptr<net::URLRequestContextGetter> url_request_getter_; | 59 scoped_refptr<net::URLRequestContextGetter> url_request_getter_; |
60 | 60 |
61 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); | 61 DISALLOW_COPY_AND_ASSIGN(ShellBrowserContext); |
62 }; | 62 }; |
63 | 63 |
64 } // namespace content | 64 } // namespace content |
65 | 65 |
66 #endif // CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_ | 66 #endif // CONTENT_SHELL_SHELL_BROWSER_CONTEXT_H_ |
OLD | NEW |