| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/memory/ref_counted_memory.h" | 5 #include "base/memory/ref_counted_memory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 namespace base { |
| 10 |
| 9 RefCountedMemory::RefCountedMemory() {} | 11 RefCountedMemory::RefCountedMemory() {} |
| 10 | 12 |
| 11 RefCountedMemory::~RefCountedMemory() {} | 13 RefCountedMemory::~RefCountedMemory() {} |
| 12 | 14 |
| 13 namespace base { | |
| 14 | |
| 15 const unsigned char* RefCountedStaticMemory::front() const { | 15 const unsigned char* RefCountedStaticMemory::front() const { |
| 16 return data_; | 16 return data_; |
| 17 } | 17 } |
| 18 | 18 |
| 19 size_t RefCountedStaticMemory::size() const { | 19 size_t RefCountedStaticMemory::size() const { |
| 20 return length_; | 20 return length_; |
| 21 } | 21 } |
| 22 | 22 |
| 23 RefCountedStaticMemory::~RefCountedStaticMemory() {} | 23 RefCountedStaticMemory::~RefCountedStaticMemory() {} |
| 24 | 24 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const unsigned char* RefCountedString::front() const { | 61 const unsigned char* RefCountedString::front() const { |
| 62 return data_.empty() ? NULL : | 62 return data_.empty() ? NULL : |
| 63 reinterpret_cast<const unsigned char*>(data_.data()); | 63 reinterpret_cast<const unsigned char*>(data_.data()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 size_t RefCountedString::size() const { | 66 size_t RefCountedString::size() const { |
| 67 return data_.size(); | 67 return data_.size(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace base | 70 } // namespace base |
| OLD | NEW |