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

Side by Side Diff: net/base/chunked_upload_data_stream.cc

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "net/base/chunked_upload_data_stream.h" 5 #include "net/base/chunked_upload_data_stream.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/base/io_buffer.h" 9 #include "net/base/io_buffer.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
11 11
12 namespace net { 12 namespace net {
13 13
14 ChunkedUploadDataStream::ChunkedUploadDataStream(int64 identifier) 14 ChunkedUploadDataStream::ChunkedUploadDataStream(int64_t identifier)
15 : UploadDataStream(true, identifier), 15 : UploadDataStream(true, identifier),
16 read_index_(0), 16 read_index_(0),
17 read_offset_(0), 17 read_offset_(0),
18 all_data_appended_(false), 18 all_data_appended_(false),
19 read_buffer_len_(0) { 19 read_buffer_len_(0) {
20 } 20 }
21 21
22 ChunkedUploadDataStream::~ChunkedUploadDataStream() { 22 ChunkedUploadDataStream::~ChunkedUploadDataStream() {
23 } 23 }
24 24
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 // ERR_IO_PENDING. The read will be completed in the next call to AppendData. 94 // ERR_IO_PENDING. The read will be completed in the next call to AppendData.
95 if (bytes_read == 0 && !all_data_appended_) 95 if (bytes_read == 0 && !all_data_appended_)
96 return ERR_IO_PENDING; 96 return ERR_IO_PENDING;
97 97
98 if (read_index_ == upload_data_.size() && all_data_appended_) 98 if (read_index_ == upload_data_.size() && all_data_appended_)
99 SetIsFinalChunk(); 99 SetIsFinalChunk();
100 return bytes_read; 100 return bytes_read;
101 } 101 }
102 102
103 } // namespace net 103 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698