OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "blimp/net/blob_channel/helium_blob_sender_delegate.h" | |
6 | |
7 #include "blimp/common/create_blimp_message.h" | |
8 #include "blimp/common/proto/blimp_message.pb.h" | |
9 #include "blimp/common/proto/blob_channel.pb.h" | |
10 #include "net/base/net_errors.h" | |
11 | |
12 namespace blimp { | |
13 namespace { | |
14 | |
15 void DoNothingCompletionCallback(int) {} | |
16 | |
17 } // namespace | |
18 | |
19 HeliumBlobSenderDelegate::HeliumBlobSenderDelegate() {} | |
20 | |
21 HeliumBlobSenderDelegate::~HeliumBlobSenderDelegate() {} | |
22 | |
23 void HeliumBlobSenderDelegate::DeliverBlob(const BlobId& id, BlobDataPtr data) { | |
24 BlobChannelMessage* blob_message; | |
25 std::unique_ptr<BlimpMessage> message = CreateBlimpMessage(&blob_message); | |
26 blob_message->mutable_transfer_blob()->set_payload(&data->data[0], | |
27 data->data.size()); | |
28 blob_message->mutable_transfer_blob()->set_blob_id(id); | |
29 outgoing_processor_->ProcessMessage(std::move(message), | |
30 base::Bind(&DoNothingCompletionCallback)); | |
31 } | |
32 | |
33 void HeliumBlobSenderDelegate::ProcessMessage( | |
34 std::unique_ptr<BlimpMessage> message, | |
35 const net::CompletionCallback& callback) { | |
36 NOTIMPLEMENTED(); | |
37 callback.Run(net::ERR_NOT_IMPLEMENTED); | |
38 } | |
39 | |
40 } // namespace blimp | |
OLD | NEW |