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

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

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 years, 11 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/mach_ipc_mac.h ('k') | base/message_pump_libevent_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 (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 #ifndef BASE_MEMORY_REF_COUNTED_MEMORY_H_ 5 #ifndef BASE_MEMORY_REF_COUNTED_MEMORY_H_
6 #define BASE_MEMORY_REF_COUNTED_MEMORY_H_ 6 #define BASE_MEMORY_REF_COUNTED_MEMORY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DISALLOW_COPY_AND_ASSIGN(RefCountedStaticMemory); 55 DISALLOW_COPY_AND_ASSIGN(RefCountedStaticMemory);
56 }; 56 };
57 57
58 // An implementation of RefCountedMemory, where we own our the data in a 58 // An implementation of RefCountedMemory, where we own our the data in a
59 // vector. 59 // vector.
60 class BASE_EXPORT RefCountedBytes : public RefCountedMemory { 60 class BASE_EXPORT RefCountedBytes : public RefCountedMemory {
61 public: 61 public:
62 RefCountedBytes(); 62 RefCountedBytes();
63 63
64 // Constructs a RefCountedBytes object by _copying_ from |initializer|. 64 // Constructs a RefCountedBytes object by _copying_ from |initializer|.
65 RefCountedBytes(const std::vector<unsigned char>& initializer); 65 explicit RefCountedBytes(const std::vector<unsigned char>& initializer);
66 66
67 // Constructs a RefCountedBytes object by performing a swap. (To non 67 // Constructs a RefCountedBytes object by performing a swap. (To non
68 // destructively build a RefCountedBytes, use the constructor that takes a 68 // destructively build a RefCountedBytes, use the constructor that takes a
69 // vector.) 69 // vector.)
70 static RefCountedBytes* TakeVector(std::vector<unsigned char>* to_destroy); 70 static RefCountedBytes* TakeVector(std::vector<unsigned char>* to_destroy);
71 71
72 // Overridden from RefCountedMemory: 72 // Overridden from RefCountedMemory:
73 virtual const unsigned char* front() const OVERRIDE; 73 virtual const unsigned char* front() const OVERRIDE;
74 virtual size_t size() const OVERRIDE; 74 virtual size_t size() const OVERRIDE;
75 75
(...skipping 30 matching lines...) Expand all
106 virtual ~RefCountedString(); 106 virtual ~RefCountedString();
107 107
108 std::string data_; 108 std::string data_;
109 109
110 DISALLOW_COPY_AND_ASSIGN(RefCountedString); 110 DISALLOW_COPY_AND_ASSIGN(RefCountedString);
111 }; 111 };
112 112
113 } // namespace base 113 } // namespace base
114 114
115 #endif // BASE_MEMORY_REF_COUNTED_MEMORY_H_ 115 #endif // BASE_MEMORY_REF_COUNTED_MEMORY_H_
OLDNEW
« no previous file with comments | « base/mach_ipc_mac.h ('k') | base/message_pump_libevent_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698