| OLD | NEW |
| (Empty) |
| 1 // Copyright 2008-2009 Google Inc. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 // ======================================================================== | |
| 15 | |
| 16 // | |
| 17 // BrowserRequest provides http transactions proxied through a user's browser. | |
| 18 | |
| 19 #ifndef OMAHA_NET_BROWSER_REQUEST_H__ | |
| 20 #define OMAHA_NET_BROWSER_REQUEST_H__ | |
| 21 | |
| 22 #include <list> | |
| 23 #include "goopdate/omaha3_idl.h" | |
| 24 #include "omaha/net/urlmon_request.h" | |
| 25 | |
| 26 namespace omaha { | |
| 27 | |
| 28 typedef std::list<CAdapt<CComPtr<IBrowserHttpRequest2> > > BrowserObjects; | |
| 29 | |
| 30 class BrowserRequest : public UrlmonRequest { | |
| 31 public: | |
| 32 BrowserRequest(); | |
| 33 virtual ~BrowserRequest() {} | |
| 34 | |
| 35 virtual CString ToString() const { return _T("iexplore"); } | |
| 36 | |
| 37 virtual HRESULT SendRequest(BSTR url, | |
| 38 BSTR post_data, | |
| 39 BSTR request_headers, | |
| 40 VARIANT response_headers_needed, | |
| 41 CComVariant* response_headers, | |
| 42 DWORD* response_code, | |
| 43 BSTR* cache_filename); | |
| 44 | |
| 45 private: | |
| 46 bool GetAvailableBrowserObjects(); | |
| 47 BrowserObjects objects_; | |
| 48 | |
| 49 friend class BrowserRequestTest; | |
| 50 friend class CupRequestTest; | |
| 51 | |
| 52 DISALLOW_EVIL_CONSTRUCTORS(BrowserRequest); | |
| 53 }; | |
| 54 | |
| 55 } // namespace omaha | |
| 56 | |
| 57 #endif // OMAHA_NET_BROWSER_REQUEST_H__ | |
| 58 | |
| OLD | NEW |