Chromium Code Reviews| 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 "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "blimp/engine/app/blimp_system_url_request_context_getter.h" | |
| 11 #include "blimp/engine/app/blimp_url_request_context_getter.h" | 12 #include "blimp/engine/app/blimp_url_request_context_getter.h" |
| 12 #include "content/public/browser/browser_context.h" | 13 #include "content/public/browser/browser_context.h" |
| 13 #include "content/public/browser/content_browser_client.h" | 14 #include "content/public/browser/content_browser_client.h" |
| 14 #include "content/public/browser/resource_context.h" | 15 #include "content/public/browser/resource_context.h" |
| 15 #include "net/url_request/url_request_job_factory.h" | 16 #include "net/url_request/url_request_job_factory.h" |
| 16 | 17 |
| 17 namespace net { | 18 namespace net { |
| 18 class NetLog; | 19 class NetLog; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 50 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; | 51 content::SSLHostStateDelegate* GetSSLHostStateDelegate() override; |
| 51 content::PermissionManager* GetPermissionManager() override; | 52 content::PermissionManager* GetPermissionManager() override; |
| 52 content::BackgroundSyncController* GetBackgroundSyncController() override; | 53 content::BackgroundSyncController* GetBackgroundSyncController() override; |
| 53 | 54 |
| 54 // The content of |protocol_handlers| is swapped into the returned instance. | 55 // The content of |protocol_handlers| is swapped into the returned instance. |
| 55 // Caller should take a reference to the returned instance via scoped_refptr. | 56 // Caller should take a reference to the returned instance via scoped_refptr. |
| 56 const scoped_refptr<BlimpURLRequestContextGetter>& CreateRequestContext( | 57 const scoped_refptr<BlimpURLRequestContextGetter>& CreateRequestContext( |
| 57 content::ProtocolHandlerMap* protocol_handlers, | 58 content::ProtocolHandlerMap* protocol_handlers, |
| 58 content::URLRequestInterceptorScopedVector request_interceptors); | 59 content::URLRequestInterceptorScopedVector request_interceptors); |
| 59 | 60 |
| 61 // Provides a URLRequestContextGetter for system requests (e.g. metrics | |
| 62 // uploads). | |
| 63 net::URLRequestContextGetter* GetSystemRequestContext(); | |
|
Kevin M
2016/04/08 01:09:08
GetSystemRequestContextGetter?
Jess
2016/04/08 19:39:02
Sounds good. I went with this naming because of t
| |
| 64 | |
| 60 private: | 65 private: |
| 61 // Performs initialization of the BlimpBrowserContext while IO is still | 66 // Performs initialization of the BlimpBrowserContext while IO is still |
| 62 // allowed on the current thread. | 67 // allowed on the current thread. |
| 63 void InitWhileIOAllowed(); | 68 void InitWhileIOAllowed(); |
| 64 | 69 |
| 65 scoped_ptr<BlimpResourceContext> resource_context_; | 70 scoped_ptr<BlimpResourceContext> resource_context_; |
| 71 scoped_refptr<BlimpSystemURLRequestContextGetter> system_context_getter_; | |
| 66 bool ignore_certificate_errors_; | 72 bool ignore_certificate_errors_; |
| 67 scoped_ptr<content::PermissionManager> permission_manager_; | 73 scoped_ptr<content::PermissionManager> permission_manager_; |
| 68 bool off_the_record_; | 74 bool off_the_record_; |
| 69 net::NetLog* net_log_; | 75 net::NetLog* net_log_; |
| 70 base::FilePath path_; | 76 base::FilePath path_; |
| 71 | 77 |
| 72 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); | 78 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); |
| 73 }; | 79 }; |
| 74 | 80 |
| 75 } // namespace engine | 81 } // namespace engine |
| 76 } // namespace blimp | 82 } // namespace blimp |
| 77 | 83 |
| 78 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ | 84 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ |
| OLD | NEW |