| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ | 5 #ifndef BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ |
| 6 #define BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ | 6 #define BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "blimp/engine/app/blimp_system_url_request_context_getter.h" |
| 12 #include "blimp/engine/app/blimp_url_request_context_getter.h" | 13 #include "blimp/engine/app/blimp_url_request_context_getter.h" |
| 13 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
| 14 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
| 15 #include "content/public/browser/resource_context.h" | 16 #include "content/public/browser/resource_context.h" |
| 16 #include "net/url_request/url_request_job_factory.h" | 17 #include "net/url_request/url_request_job_factory.h" |
| 17 | 18 |
| 18 namespace net { | 19 namespace net { |
| 19 class NetLog; | 20 class NetLog; |
| 20 } | 21 } |
| 21 | 22 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 content::BackgroundSyncController* GetBackgroundSyncController() override; | 54 content::BackgroundSyncController* GetBackgroundSyncController() override; |
| 54 net::URLRequestContextGetter* CreateRequestContext( | 55 net::URLRequestContextGetter* CreateRequestContext( |
| 55 content::ProtocolHandlerMap* protocol_handlers, | 56 content::ProtocolHandlerMap* protocol_handlers, |
| 56 content::URLRequestInterceptorScopedVector request_interceptors) override; | 57 content::URLRequestInterceptorScopedVector request_interceptors) override; |
| 57 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( | 58 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( |
| 58 const base::FilePath& partition_path, | 59 const base::FilePath& partition_path, |
| 59 bool in_memory, | 60 bool in_memory, |
| 60 content::ProtocolHandlerMap* protocol_handlers, | 61 content::ProtocolHandlerMap* protocol_handlers, |
| 61 content::URLRequestInterceptorScopedVector request_interceptors) override; | 62 content::URLRequestInterceptorScopedVector request_interceptors) override; |
| 62 | 63 |
| 64 // Provides a URLRequestContextGetter for system requests (e.g. metrics |
| 65 // uploads). |
| 66 net::URLRequestContextGetter* GetSystemRequestContextGetter(); |
| 67 |
| 63 private: | 68 private: |
| 64 // Performs initialization of the BlimpBrowserContext while IO is still | 69 // Performs initialization of the BlimpBrowserContext while IO is still |
| 65 // allowed on the current thread. | 70 // allowed on the current thread. |
| 66 void InitWhileIOAllowed(); | 71 void InitWhileIOAllowed(); |
| 67 | 72 |
| 68 std::unique_ptr<BlimpResourceContext> resource_context_; | 73 std::unique_ptr<BlimpResourceContext> resource_context_; |
| 74 scoped_refptr<BlimpSystemURLRequestContextGetter> system_context_getter_; |
| 69 bool ignore_certificate_errors_; | 75 bool ignore_certificate_errors_; |
| 70 std::unique_ptr<content::PermissionManager> permission_manager_; | 76 std::unique_ptr<content::PermissionManager> permission_manager_; |
| 71 bool off_the_record_; | 77 bool off_the_record_; |
| 72 net::NetLog* net_log_; | 78 net::NetLog* net_log_; |
| 73 base::FilePath path_; | 79 base::FilePath path_; |
| 74 | 80 |
| 75 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); | 81 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); |
| 76 }; | 82 }; |
| 77 | 83 |
| 78 } // namespace engine | 84 } // namespace engine |
| 79 } // namespace blimp | 85 } // namespace blimp |
| 80 | 86 |
| 81 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ | 87 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ |
| OLD | NEW |