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

Side by Side Diff: net/spdy/spdy_buffer.cc

Issue 667923003: Standardize usage of virtual/override/final in net/ (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 | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/spdy_buffer_producer.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "net/spdy/spdy_buffer.h" 5 #include "net/spdy/spdy_buffer.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 27 matching lines...) Expand all
38 // SpdyBuffer::GetIOBufferForRemainingData(). 38 // SpdyBuffer::GetIOBufferForRemainingData().
39 class SpdyBuffer::SharedFrameIOBuffer : public IOBuffer { 39 class SpdyBuffer::SharedFrameIOBuffer : public IOBuffer {
40 public: 40 public:
41 SharedFrameIOBuffer(const scoped_refptr<SharedFrame>& shared_frame, 41 SharedFrameIOBuffer(const scoped_refptr<SharedFrame>& shared_frame,
42 size_t offset) 42 size_t offset)
43 : IOBuffer(shared_frame->data->data() + offset), 43 : IOBuffer(shared_frame->data->data() + offset),
44 shared_frame_(shared_frame), 44 shared_frame_(shared_frame),
45 offset_(offset) {} 45 offset_(offset) {}
46 46
47 private: 47 private:
48 virtual ~SharedFrameIOBuffer() { 48 ~SharedFrameIOBuffer() override {
49 // Prevent ~IOBuffer() from trying to delete |data_|. 49 // Prevent ~IOBuffer() from trying to delete |data_|.
50 data_ = NULL; 50 data_ = NULL;
51 } 51 }
52 52
53 const scoped_refptr<SharedFrame> shared_frame_; 53 const scoped_refptr<SharedFrame> shared_frame_;
54 const size_t offset_; 54 const size_t offset_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(SharedFrameIOBuffer); 56 DISALLOW_COPY_AND_ASSIGN(SharedFrameIOBuffer);
57 }; 57 };
58 58
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 DCHECK_GE(consume_size, 1u); 102 DCHECK_GE(consume_size, 1u);
103 DCHECK_LE(consume_size, GetRemainingSize()); 103 DCHECK_LE(consume_size, GetRemainingSize());
104 offset_ += consume_size; 104 offset_ += consume_size;
105 for (std::vector<ConsumeCallback>::const_iterator it = 105 for (std::vector<ConsumeCallback>::const_iterator it =
106 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) { 106 consume_callbacks_.begin(); it != consume_callbacks_.end(); ++it) {
107 it->Run(consume_size, consume_source); 107 it->Run(consume_size, consume_source);
108 } 108 }
109 }; 109 };
110 110
111 } // namespace net 111 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/buffered_spdy_framer_unittest.cc ('k') | net/spdy/spdy_buffer_producer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698