Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2230)

Side by Side Diff: pdf/document_loader.h

Issue 1900033005: Simplify some CloudPrintProxy code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 PDF_DOCUMENT_LOADER_H_ 5 #ifndef PDF_DOCUMENT_LOADER_H_
6 #define PDF_DOCUMENT_LOADER_H_ 6 #define PDF_DOCUMENT_LOADER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 explicit DocumentLoader(Client* client); 44 explicit DocumentLoader(Client* client);
45 ~DocumentLoader(); 45 ~DocumentLoader();
46 46
47 bool Init(const pp::URLLoader& loader, 47 bool Init(const pp::URLLoader& loader,
48 const std::string& url, 48 const std::string& url,
49 const std::string& headers); 49 const std::string& headers);
50 50
51 // Data access interface. Return true is successful. 51 // Data access interface. Return true is successful.
52 bool GetBlock(uint32_t position, uint32_t size, void* buf) const; 52 bool GetBlock(uint32_t position, uint32_t size, void* buf) const;
53 53
54 // Data availability interface. Return true data avaialble. 54 // Data availability interface. Return true data available.
55 bool IsDataAvailable(uint32_t position, uint32_t size) const; 55 bool IsDataAvailable(uint32_t position, uint32_t size) const;
56 56
57 // Data availability interface. Return true data avaialble. 57 // Data availability interface. Return true data available.
58 void RequestData(uint32_t position, uint32_t size); 58 void RequestData(uint32_t position, uint32_t size);
59 59
60 bool IsDocumentComplete() const; 60 bool IsDocumentComplete() const;
61 uint32_t document_size() const { return document_size_; } 61 uint32_t document_size() const { return document_size_; }
62 62
63 // Return number of bytes available. 63 // Return number of bytes available.
64 uint32_t GetAvailableData() const; 64 uint32_t GetAvailableData() const;
65 65
66 // Clear pending requests from the queue. 66 // Clear pending requests from the queue.
67 void ClearPendingRequests(); 67 void ClearPendingRequests();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 bool header_request_; 127 bool header_request_;
128 bool is_multipart_; 128 bool is_multipart_;
129 std::string multipart_boundary_; 129 std::string multipart_boundary_;
130 uint32_t requests_count_; 130 uint32_t requests_count_;
131 std::vector<std::vector<unsigned char> > chunk_buffer_; 131 std::vector<std::vector<unsigned char> > chunk_buffer_;
132 }; 132 };
133 133
134 } // namespace chrome_pdf 134 } // namespace chrome_pdf
135 135
136 #endif // PDF_DOCUMENT_LOADER_H_ 136 #endif // PDF_DOCUMENT_LOADER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698