Make sure account reconcilor only works for connected profiles.
[chromium-blink-merge.git] / chrome_frame / urlmon_upload_data_stream.h
blob497fdb468fd503b2ad38f60f465380b390495817
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
3 // found in the LICENSE file.
5 #ifndef CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
6 #define CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_
8 #include <urlmon.h>
9 #include <atlbase.h>
10 #include <atlcom.h>
12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h"
14 #include "chrome_frame/stream_impl.h"
15 #include "net/base/upload_data.h"
16 #include "net/base/upload_data_stream.h"
18 // Provides an IStream interface to the very different UploadDataStream
19 // implementation.
20 class UrlmonUploadDataStream : public CComObjectRootEx<CComMultiThreadModel>,
21 public StreamImpl {
22 public:
23 UrlmonUploadDataStream() {}
25 BEGIN_COM_MAP(UrlmonUploadDataStream)
26 COM_INTERFACE_ENTRY(ISequentialStream)
27 COM_INTERFACE_ENTRY(IStream)
28 END_COM_MAP()
30 void Initialize(net::UploadData* upload_data);
32 // Partial implementation of IStream.
33 STDMETHOD(Read)(void* pv, ULONG cb, ULONG* read);
34 STDMETHOD(Seek)(LARGE_INTEGER move, DWORD origin, ULARGE_INTEGER* new_pos);
35 STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
37 private:
38 scoped_refptr<net::UploadData> upload_data_;
39 scoped_ptr<net::UploadDataStream> request_body_stream_;
42 #endif // CHROME_FRAME_URLMON_UPLOAD_DATA_STREAM_H_