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

Side by Side Diff: pdf/document_loader.h

Issue 2525903002: [PDF Plugin] Increase read buffer size (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 Client* const client_; 102 Client* const client_;
103 std::string url_; 103 std::string url_;
104 std::unique_ptr<URLLoaderWrapper> loader_; 104 std::unique_ptr<URLLoaderWrapper> loader_;
105 105
106 pp::CompletionCallbackFactory<DocumentLoader> loader_factory_; 106 pp::CompletionCallbackFactory<DocumentLoader> loader_factory_;
107 107
108 DataStream chunk_stream_; 108 DataStream chunk_stream_;
109 bool partial_loading_enabled_ = true; 109 bool partial_loading_enabled_ = true;
110 bool is_partial_loader_active_ = false; 110 bool is_partial_loader_active_ = false;
111 char buffer_[DataStream::kChunkSize]; 111
112 static constexpr uint32_t kReadBufferSize = 256 * 1024;
113 char buffer_[kReadBufferSize];
112 114
113 Chunk chunk_; 115 Chunk chunk_;
114 RangeSet pending_requests_; 116 RangeSet pending_requests_;
115 uint32_t count_of_bytes_received_ = 0; 117 uint32_t count_of_bytes_received_ = 0;
116 }; 118 };
117 119
118 } // namespace chrome_pdf 120 } // namespace chrome_pdf
119 121
120 #endif // PDF_DOCUMENT_LOADER_H_ 122 #endif // PDF_DOCUMENT_LOADER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698