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

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

Issue 2172183003: Return unique_ptr<WebDataConsumerHandle::Reader> directly from obtainReader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmock_cxx11
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « no previous file | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // |on_reader_detached| will be called aynchronously on the calling thread 74 // |on_reader_detached| will be called aynchronously on the calling thread
75 // when the reader (including the handle) is detached (i.e. both the handle 75 // when the reader (including the handle) is detached (i.e. both the handle
76 // and the reader are destructed). The callback will be reset in the internal 76 // and the reader are destructed). The callback will be reset in the internal
77 // context when the writer is detached, i.e. |Close| or |Fail| is called, 77 // context when the writer is detached, i.e. |Close| or |Fail| is called,
78 // and the callback will never be called. 78 // and the callback will never be called.
79 SharedMemoryDataConsumerHandle(BackpressureMode mode, 79 SharedMemoryDataConsumerHandle(BackpressureMode mode,
80 const base::Closure& on_reader_detached, 80 const base::Closure& on_reader_detached,
81 std::unique_ptr<Writer>* writer); 81 std::unique_ptr<Writer>* writer);
82 ~SharedMemoryDataConsumerHandle() override; 82 ~SharedMemoryDataConsumerHandle() override;
83 83
84 std::unique_ptr<Reader> ObtainReader(Client* client); 84 std::unique_ptr<Reader> obtainReader(Client* client) override;
85 85
86 private: 86 private:
87 ReaderImpl* obtainReaderInternal(Client* client) override;
88 const char* debugName() const override; 87 const char* debugName() const override;
89 88
90 scoped_refptr<Context> context_; 89 scoped_refptr<Context> context_;
91 90
92 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle); 91 DISALLOW_COPY_AND_ASSIGN(SharedMemoryDataConsumerHandle);
93 }; 92 };
94 93
95 } // namespace content 94 } // namespace content
96 95
97 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_ 96 #endif // CONTENT_CHILD_SHARED_MEMORY_DATA_CONSUMER_HANDLE_H_
OLDNEW
« 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