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_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ | 5 #ifndef CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ |
6 #define CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ | 6 #define CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 // Takes ownership of the temporary directory so that it's not deleted when | 29 // Takes ownership of the temporary directory so that it's not deleted when |
30 // this object is destructed. | 30 // this object is destructed. |
31 base::FilePath TakePath(); | 31 base::FilePath TakePath(); |
32 | 32 |
33 void SetSpecialStoragePolicy(storage::SpecialStoragePolicy* policy); | 33 void SetSpecialStoragePolicy(storage::SpecialStoragePolicy* policy); |
34 void SetPermissionManager( | 34 void SetPermissionManager( |
35 std::unique_ptr<PermissionManager> permission_manager); | 35 std::unique_ptr<PermissionManager> permission_manager); |
36 net::URLRequestContextGetter* GetRequestContext(); | 36 net::URLRequestContextGetter* GetRequestContext(); |
37 | 37 |
38 // Allow clients to make this an incognito context. | |
39 void SetOffTheRecord(bool is_off_the_record); | |
sky
2017/04/05 02:56:55
set_is_off_the_record() and inline.
karandeepb
2017/04/05 20:25:48
Done.
| |
40 | |
41 // BrowserContext implementation. | |
38 base::FilePath GetPath() const override; | 42 base::FilePath GetPath() const override; |
39 std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( | 43 std::unique_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate( |
40 const base::FilePath& partition_path) override; | 44 const base::FilePath& partition_path) override; |
41 bool IsOffTheRecord() const override; | 45 bool IsOffTheRecord() const override; |
42 DownloadManagerDelegate* GetDownloadManagerDelegate() override; | 46 DownloadManagerDelegate* GetDownloadManagerDelegate() override; |
43 ResourceContext* GetResourceContext() override; | 47 ResourceContext* GetResourceContext() override; |
44 BrowserPluginGuestManager* GetGuestManager() override; | 48 BrowserPluginGuestManager* GetGuestManager() override; |
45 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; | 49 storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override; |
46 PushMessagingService* GetPushMessagingService() override; | 50 PushMessagingService* GetPushMessagingService() override; |
47 SSLHostStateDelegate* GetSSLHostStateDelegate() override; | 51 SSLHostStateDelegate* GetSSLHostStateDelegate() override; |
(...skipping 13 matching lines...) Expand all Loading... | |
61 bool in_memory) override; | 65 bool in_memory) override; |
62 | 66 |
63 private: | 67 private: |
64 base::ScopedTempDir browser_context_dir_; | 68 base::ScopedTempDir browser_context_dir_; |
65 scoped_refptr<net::URLRequestContextGetter> request_context_; | 69 scoped_refptr<net::URLRequestContextGetter> request_context_; |
66 std::unique_ptr<MockResourceContext> resource_context_; | 70 std::unique_ptr<MockResourceContext> resource_context_; |
67 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; | 71 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; |
68 std::unique_ptr<MockSSLHostStateDelegate> ssl_host_state_delegate_; | 72 std::unique_ptr<MockSSLHostStateDelegate> ssl_host_state_delegate_; |
69 std::unique_ptr<PermissionManager> permission_manager_; | 73 std::unique_ptr<PermissionManager> permission_manager_; |
70 std::unique_ptr<MockBackgroundSyncController> background_sync_controller_; | 74 std::unique_ptr<MockBackgroundSyncController> background_sync_controller_; |
75 bool is_off_the_record_ = false; | |
71 | 76 |
72 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); | 77 DISALLOW_COPY_AND_ASSIGN(TestBrowserContext); |
73 }; | 78 }; |
74 | 79 |
75 } // namespace content | 80 } // namespace content |
76 | 81 |
77 #endif // CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ | 82 #endif // CONTENT_PUBLIC_TEST_TEST_BROWSER_CONTEXT_H_ |
OLD | NEW |