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

Side by Side Diff: content/child/shared_memory_data_consumer_handle.h

Issue 1181573003: Set error on WebDataConsumerHandle while loading body. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-ipc-data-consumer
Patch Set: 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ 5 #ifndef CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
6 #define CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ 6 #define CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 13 matching lines...) Expand all
24 kApplyBackpressure, 24 kApplyBackpressure,
25 kDoNotApplyBackpressure, 25 kDoNotApplyBackpressure,
26 }; 26 };
27 27
28 class CONTENT_EXPORT Writer final { 28 class CONTENT_EXPORT Writer final {
29 public: 29 public:
30 Writer(const scoped_refptr<Context>& context, BackpressureMode mode); 30 Writer(const scoped_refptr<Context>& context, BackpressureMode mode);
31 ~Writer(); 31 ~Writer();
32 void AddData(scoped_ptr<RequestPeer::ReceivedData> data); 32 void AddData(scoped_ptr<RequestPeer::ReceivedData> data);
33 void Close(); 33 void Close();
34 // TODO(yhirano): Consider providing error code.
35 void Error();
34 36
35 private: 37 private:
36 scoped_refptr<Context> context_; 38 scoped_refptr<Context> context_;
37 BackpressureMode mode_; 39 BackpressureMode mode_;
38 40
39 DISALLOW_COPY_AND_ASSIGN(Writer); 41 DISALLOW_COPY_AND_ASSIGN(Writer);
40 }; 42 };
41 43
42 class ReaderImpl final : public Reader { 44 class ReaderImpl final : public Reader {
43 public: 45 public:
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 scoped_refptr<Context> context_; 77 scoped_refptr<Context> context_;
76 // This is an implicitly acquired reader for deprecated APIs. 78 // This is an implicitly acquired reader for deprecated APIs.
77 scoped_ptr<Reader> reader_; 79 scoped_ptr<Reader> reader_;
78 80
79 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle); 81 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle);
80 }; 82 };
81 83
82 } // namespace content 84 } // namespace content
83 85
84 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ 86 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698