OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_HOST_URL_FETCHER_H_ | 5 #ifndef REMOTING_HOST_URL_FETCHER_H_ |
6 #define REMOTING_HOST_URL_FETCHER_H_ | 6 #define REMOTING_HOST_URL_FETCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 const std::string& response)> | 40 const std::string& response)> |
41 DoneCallback; | 41 DoneCallback; |
42 | 42 |
43 UrlFetcher(const GURL& url, Method method); | 43 UrlFetcher(const GURL& url, Method method); |
44 ~UrlFetcher(); | 44 ~UrlFetcher(); |
45 | 45 |
46 void SetRequestContext( | 46 void SetRequestContext( |
47 net::URLRequestContextGetter* request_context_getter); | 47 net::URLRequestContextGetter* request_context_getter); |
48 void SetUploadData(const std::string& upload_content_type, | 48 void SetUploadData(const std::string& upload_content_type, |
49 const std::string& upload_content); | 49 const std::string& upload_content); |
| 50 void SetHeader(const std::string& key, const std::string& value); |
50 void Start(const DoneCallback& done_callback); | 51 void Start(const DoneCallback& done_callback); |
51 | 52 |
52 private: | 53 private: |
53 // Ref-counted core of the implementation. | 54 // Ref-counted core of the implementation. |
54 class Core; | 55 class Core; |
55 | 56 |
56 scoped_refptr<Core> core_; | 57 scoped_refptr<Core> core_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(UrlFetcher); | 59 DISALLOW_COPY_AND_ASSIGN(UrlFetcher); |
59 }; | 60 }; |
60 | 61 |
61 } // namespace remoting | 62 } // namespace remoting |
62 | 63 |
63 #endif // REMOTING_HOST_URL_FETCHER_H_ | 64 #endif // REMOTING_HOST_URL_FETCHER_H_ |
OLD | NEW |