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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/shared_memory_data_consumer_handle.h
diff --git a/content/child/shared_memory_data_consumer_handle.h b/content/child/shared_memory_data_consumer_handle.h
index 188d028e2e399f1c4bc4cdf20757c0daf58a4907..bedced0ecf1cea2874e2727d1c48c195a48332a6 100644
--- a/content/child/shared_memory_data_consumer_handle.h
+++ b/content/child/shared_memory_data_consumer_handle.h
@@ -29,8 +29,12 @@ class CONTENT_EXPORT SharedMemoryDataConsumerHandle final
public:
Writer(const scoped_refptr<Context>& context, BackpressureMode mode);
~Writer();
+ // Note: We assume |AddData| is not called in a client's didGetReadable
kinuko 2015/06/22 06:39:27 nit: this comment is a bit ambiguous, who's 'we' a
yhirano 2015/06/22 07:08:13 Fixed: Writer assumes that / A caller should ensur
+ // callback. There isn't such assumption for |Close| and |Error|.
void AddData(scoped_ptr<RequestPeer::ReceivedData> data);
void Close();
+ // TODO(yhirano): Consider providing error code.
+ void Error();
kinuko 2015/06/22 06:39:27 nit: it's subjective but 'error' sounds more like
yhirano 2015/06/22 07:08:13 Done.
private:
scoped_refptr<Context> context_;
@@ -61,20 +65,10 @@ class CONTENT_EXPORT SharedMemoryDataConsumerHandle final
scoped_ptr<Reader> ObtainReader(Client* client);
- virtual Result read(void* data, size_t size, Flags flags, size_t* readSize);
- virtual Result beginRead(const void** buffer, Flags flags, size_t* available);
- virtual Result endRead(size_t readSize);
- virtual void registerClient(Client* client);
- virtual void unregisterClient();
-
private:
virtual ReaderImpl* obtainReaderInternal(Client* client);
- void LockImplicitly();
- void UnlockImplicitly();
scoped_refptr<Context> context_;
- // This is an implicitly acquired reader for deprecated APIs.
- scoped_ptr<Reader> reader_;
DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle);
};
« no previous file with comments | « no previous file | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698