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

Side by Side Diff: net/base/upload_data_stream.h

Issue 541022: Fix the case where the browser livelocks if we cannot open a file. (Closed)
Patch Set: Created 10 years, 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 NET_BASE_UPLOAD_DATA_STREAM_H_ 5 #ifndef NET_BASE_UPLOAD_DATA_STREAM_H_
6 #define NET_BASE_UPLOAD_DATA_STREAM_H_ 6 #define NET_BASE_UPLOAD_DATA_STREAM_H_
7 7
8 #include "net/base/file_stream.h" 8 #include "net/base/file_stream.h"
9 #include "net/base/upload_data.h" 9 #include "net/base/upload_data.h"
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 FileStream next_element_stream_; 55 FileStream next_element_stream_;
56 56
57 // The number of bytes remaining to be read from the currently open file 57 // The number of bytes remaining to be read from the currently open file
58 // if the next element is of TYPE_FILE. 58 // if the next element is of TYPE_FILE.
59 uint64 next_element_remaining_; 59 uint64 next_element_remaining_;
60 60
61 // Size and current read position within the stream. 61 // Size and current read position within the stream.
62 uint64 total_size_; 62 uint64 total_size_;
63 uint64 current_position_; 63 uint64 current_position_;
64 64
65 bool file_failed_to_open_;
66
65 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream); 67 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream);
66 }; 68 };
67 69
68 } // namespace net 70 } // namespace net
69 71
70 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ 72 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698