| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_ | 5 #ifndef BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_ |
| 6 #define BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_ | 6 #define BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_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 "content/public/browser/content_browser_client.h" | 10 #include "content/public/browser/content_browser_client.h" |
| 11 #include "net/url_request/url_request_context_getter.h" | 11 #include "net/url_request/url_request_context_getter.h" |
| 12 | 12 |
| 13 namespace base { | 13 namespace base { |
| 14 class MessageLoop; | |
| 15 class SingleThreadTaskRunner; | 14 class SingleThreadTaskRunner; |
| 16 } | 15 } |
| 17 | 16 |
| 18 namespace blimp { | 17 namespace blimp { |
| 19 namespace engine { | 18 namespace engine { |
| 20 | 19 |
| 21 // The URLRequestContextGetter for Blimp system requests that should not be | 20 // The URLRequestContextGetter for Blimp system requests that should not be |
| 22 // associated with a user URL request context (e.g. metrics upload). | 21 // associated with a user URL request context (e.g. metrics upload). |
| 23 class BlimpSystemURLRequestContextGetter : public net::URLRequestContextGetter { | 22 class BlimpSystemURLRequestContextGetter : public net::URLRequestContextGetter { |
| 24 public: | 23 public: |
| 25 BlimpSystemURLRequestContextGetter(); | 24 BlimpSystemURLRequestContextGetter(); |
| 26 | 25 |
| 27 // net::URLRequestContextGetter implementation. | 26 // net::URLRequestContextGetter implementation. |
| 28 net::URLRequestContext* GetURLRequestContext() override; | 27 net::URLRequestContext* GetURLRequestContext() override; |
| 29 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() | 28 scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() |
| 30 const override; | 29 const override; |
| 31 | 30 |
| 32 private: | 31 private: |
| 33 ~BlimpSystemURLRequestContextGetter() override; | 32 ~BlimpSystemURLRequestContextGetter() override; |
| 34 | 33 |
| 35 std::unique_ptr<net::URLRequestContext> url_request_context_; | 34 std::unique_ptr<net::URLRequestContext> url_request_context_; |
| 36 | 35 |
| 37 DISALLOW_COPY_AND_ASSIGN(BlimpSystemURLRequestContextGetter); | 36 DISALLOW_COPY_AND_ASSIGN(BlimpSystemURLRequestContextGetter); |
| 38 }; | 37 }; |
| 39 | 38 |
| 40 } // namespace engine | 39 } // namespace engine |
| 41 } // namespace blimp | 40 } // namespace blimp |
| 42 | 41 |
| 43 #endif // BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_ | 42 #endif // BLIMP_ENGINE_APP_BLIMP_SYSTEM_URL_REQUEST_CONTEXT_GETTER_H_ |
| OLD | NEW |