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

Side by Side Diff: device/serial/data_sink_receiver.cc

Issue 628873002: replace OVERRIDE and FINAL with override and final in device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « device/serial/data_sink_receiver.h ('k') | device/serial/data_sink_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "device/serial/data_sink_receiver.h" 5 #include "device/serial/data_sink_receiver.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "device/serial/async_waiter.h" 10 #include "device/serial/async_waiter.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class DataSinkReceiver::Buffer : public ReadOnlyBuffer { 42 class DataSinkReceiver::Buffer : public ReadOnlyBuffer {
43 public: 43 public:
44 Buffer(scoped_refptr<DataSinkReceiver> receiver, 44 Buffer(scoped_refptr<DataSinkReceiver> receiver,
45 const char* buffer, 45 const char* buffer,
46 uint32_t buffer_size); 46 uint32_t buffer_size);
47 virtual ~Buffer(); 47 virtual ~Buffer();
48 48
49 void Cancel(int32_t error); 49 void Cancel(int32_t error);
50 50
51 // ReadOnlyBuffer overrides. 51 // ReadOnlyBuffer overrides.
52 virtual const char* GetData() OVERRIDE; 52 virtual const char* GetData() override;
53 virtual uint32_t GetSize() OVERRIDE; 53 virtual uint32_t GetSize() override;
54 virtual void Done(uint32_t bytes_read) OVERRIDE; 54 virtual void Done(uint32_t bytes_read) override;
55 virtual void DoneWithError(uint32_t bytes_read, int32_t error) OVERRIDE; 55 virtual void DoneWithError(uint32_t bytes_read, int32_t error) override;
56 56
57 private: 57 private:
58 // The DataSinkReceiver whose data pipe we are providing a view. 58 // The DataSinkReceiver whose data pipe we are providing a view.
59 scoped_refptr<DataSinkReceiver> receiver_; 59 scoped_refptr<DataSinkReceiver> receiver_;
60 60
61 const char* buffer_; 61 const char* buffer_;
62 uint32_t buffer_size_; 62 uint32_t buffer_size_;
63 63
64 // Whether this receive has been cancelled. 64 // Whether this receive has been cancelled.
65 bool cancelled_; 65 bool cancelled_;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 MojoResult result = 297 MojoResult result =
298 mojo::ReadDataRaw(handle, NULL, &num_bytes, MOJO_READ_DATA_FLAG_DISCARD); 298 mojo::ReadDataRaw(handle, NULL, &num_bytes, MOJO_READ_DATA_FLAG_DISCARD);
299 if (result != MOJO_RESULT_OK) 299 if (result != MOJO_RESULT_OK)
300 return result; 300 return result;
301 DCHECK(num_bytes <= bytes_to_flush_); 301 DCHECK(num_bytes <= bytes_to_flush_);
302 bytes_to_flush_ -= num_bytes; 302 bytes_to_flush_ -= num_bytes;
303 return bytes_to_flush_ == 0 ? MOJO_RESULT_OK : MOJO_RESULT_SHOULD_WAIT; 303 return bytes_to_flush_ == 0 ? MOJO_RESULT_OK : MOJO_RESULT_SHOULD_WAIT;
304 } 304 }
305 305
306 } // namespace device 306 } // namespace device
OLDNEW
« no previous file with comments | « device/serial/data_sink_receiver.h ('k') | device/serial/data_sink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698