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_metrics_service_client.h" | |
13 #include "blimp/engine/app/blimp_system_url_request_context_getter.h" | 12 #include "blimp/engine/app/blimp_system_url_request_context_getter.h" |
14 #include "blimp/engine/app/blimp_url_request_context_getter.h" | 13 #include "blimp/engine/app/blimp_url_request_context_getter.h" |
15 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
16 #include "content/public/browser/content_browser_client.h" | 15 #include "content/public/browser/content_browser_client.h" |
17 #include "content/public/browser/resource_context.h" | 16 #include "content/public/browser/resource_context.h" |
18 #include "net/url_request/url_request_job_factory.h" | 17 #include "net/url_request/url_request_job_factory.h" |
19 | 18 |
20 namespace net { | 19 namespace net { |
21 class NetLog; | 20 class NetLog; |
22 } | 21 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 60 |
62 // Provides a URLRequestContextGetter for system requests (e.g. metrics | 61 // Provides a URLRequestContextGetter for system requests (e.g. metrics |
63 // uploads). | 62 // uploads). |
64 net::URLRequestContextGetter* GetSystemRequestContextGetter(); | 63 net::URLRequestContextGetter* GetSystemRequestContextGetter(); |
65 | 64 |
66 private: | 65 private: |
67 // Performs initialization of the BlimpBrowserContext while IO is still | 66 // Performs initialization of the BlimpBrowserContext while IO is still |
68 // allowed on the current thread. | 67 // allowed on the current thread. |
69 void InitWhileIOAllowed(); | 68 void InitWhileIOAllowed(); |
70 | 69 |
71 // Used in metrics initialization to get a PrefService to store logs | |
72 // temporarily. | |
73 std::unique_ptr<PrefService> GetPrefService(); | |
74 | |
75 std::unique_ptr<BlimpResourceContext> resource_context_; | 70 std::unique_ptr<BlimpResourceContext> resource_context_; |
76 scoped_refptr<BlimpSystemURLRequestContextGetter> system_context_getter_; | 71 scoped_refptr<BlimpSystemURLRequestContextGetter> system_context_getter_; |
77 bool ignore_certificate_errors_; | 72 bool ignore_certificate_errors_; |
78 std::unique_ptr<content::PermissionManager> permission_manager_; | 73 std::unique_ptr<content::PermissionManager> permission_manager_; |
79 bool off_the_record_; | 74 bool off_the_record_; |
80 net::NetLog* net_log_; | 75 net::NetLog* net_log_; |
81 base::FilePath path_; | 76 base::FilePath path_; |
82 | 77 |
83 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); | 78 DISALLOW_COPY_AND_ASSIGN(BlimpBrowserContext); |
84 }; | 79 }; |
85 | 80 |
86 } // namespace engine | 81 } // namespace engine |
87 } // namespace blimp | 82 } // namespace blimp |
88 | 83 |
89 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ | 84 #endif // BLIMP_ENGINE_COMMON_BLIMP_BROWSER_CONTEXT_H_ |
OLD | NEW |