| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ | 5 #ifndef CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ |
| 6 #define CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ | 6 #define CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 std::string user_agent_; | 54 std::string user_agent_; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 class ServiceURLRequestContextGetter : public URLRequestContextGetter { | 57 class ServiceURLRequestContextGetter : public URLRequestContextGetter { |
| 58 public: | 58 public: |
| 59 ServiceURLRequestContextGetter(); | 59 ServiceURLRequestContextGetter(); |
| 60 | 60 |
| 61 virtual URLRequestContext* GetURLRequestContext(); | 61 virtual URLRequestContext* GetURLRequestContext(); |
| 62 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy(); | 62 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const; |
| 63 | 63 |
| 64 void set_user_agent(const std::string& ua) { | 64 void set_user_agent(const std::string& ua) { |
| 65 user_agent_ = ua; | 65 user_agent_ = ua; |
| 66 } | 66 } |
| 67 private: | 67 private: |
| 68 virtual ~ServiceURLRequestContextGetter(); | 68 virtual ~ServiceURLRequestContextGetter(); |
| 69 | 69 |
| 70 std::string user_agent_; | 70 std::string user_agent_; |
| 71 scoped_refptr<URLRequestContext> url_request_context_; | 71 scoped_refptr<URLRequestContext> url_request_context_; |
| 72 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 72 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ | 75 #endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_ |
| 76 | 76 |
| OLD | NEW |