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

Side by Side Diff: base/memory/ref_counted_memory.cc

Issue 10272004: Move RefCountedMemory class to base namespace. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « base/memory/ref_counted_memory.h ('k') | chrome/browser/bookmarks/bookmark_html_writer.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) 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
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
OLDNEW
« no previous file with comments | « base/memory/ref_counted_memory.h ('k') | chrome/browser/bookmarks/bookmark_html_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698