Remove IPC::Channel::OutputElement in IPC::Channel
Nobody has used IPC::Channel::OutputElement since IPC::ChannelPosix and IPC::ChannelWin were deleted. All callers were deleted by issue 2473993003. So this CL removes IPC::Channel::OutputElement because it's not used anymore. Bug: none Change-Id: I7ff1d5abf0749e28c9ce14663110901458ede175 Reviewed-on: https://chromium-review.googlesource.com/659260 Reviewed-by: Oliver Chang <ochang@chromium.org> Reviewed-by: Darin Fisher <darin@chromium.org> Commit-Queue: Gyuyoung Kim <gyuyoung.kim@chromium.org> Cr-Commit-Position: refs/heads/master@{#502150}
This commit is contained in:
@ -45,14 +45,4 @@ std::string Channel::GenerateUniqueRandomChannelID() {
|
||||
base::RandInt(0, std::numeric_limits<int32_t>::max()));
|
||||
}
|
||||
|
||||
Channel::OutputElement::OutputElement(Message* message)
|
||||
: message_(message), buffer_(nullptr), length_(0) {}
|
||||
|
||||
Channel::OutputElement::OutputElement(void* buffer, size_t length)
|
||||
: message_(nullptr), buffer_(buffer), length_(length) {}
|
||||
|
||||
Channel::OutputElement::~OutputElement() {
|
||||
free(buffer_);
|
||||
}
|
||||
|
||||
} // namespace IPC
|
||||
|
@ -254,26 +254,6 @@ class IPC_EXPORT Channel : public Sender {
|
||||
#endif
|
||||
|
||||
protected:
|
||||
// An OutputElement is a wrapper around a Message or raw buffer while it is
|
||||
// waiting to be passed to the system's underlying IPC mechanism.
|
||||
class OutputElement {
|
||||
public:
|
||||
// Takes ownership of message.
|
||||
OutputElement(Message* message);
|
||||
// Takes ownership of the buffer. |buffer| is freed via free(), so it
|
||||
// must be malloced.
|
||||
OutputElement(void* buffer, size_t length);
|
||||
~OutputElement();
|
||||
size_t size() const { return message_ ? message_->size() : length_; }
|
||||
const void* data() const { return message_ ? message_->data() : buffer_; }
|
||||
Message* get_message() const { return message_.get(); }
|
||||
|
||||
private:
|
||||
std::unique_ptr<Message> message_;
|
||||
void* buffer_;
|
||||
size_t length_;
|
||||
};
|
||||
|
||||
// Subclasses must call this method at the beginning of their implementation
|
||||
// of Connect().
|
||||
void WillConnect();
|
||||
|
Reference in New Issue
Block a user