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

Side by Side Diff: base/win/scoped_comptr.h

Issue 2895313002: Rename ScopedComPtr::swap() to ScopedComPtr::Swap() (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | chrome/browser/google/google_update_win.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WIN_SCOPED_COMPTR_H_ 5 #ifndef BASE_WIN_SCOPED_COMPTR_H_
6 #define BASE_WIN_SCOPED_COMPTR_H_ 6 #define BASE_WIN_SCOPED_COMPTR_H_
7 7
8 #include <unknwn.h> 8 #include <unknwn.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 template <typename U> 175 template <typename U>
176 bool operator!=(const U* rhs) const { 176 bool operator!=(const U* rhs) const {
177 return ptr_ != rhs; 177 return ptr_ != rhs;
178 } 178 }
179 179
180 details::ScopedComPtrRef<ScopedComPtr<Interface>> operator&() { 180 details::ScopedComPtrRef<ScopedComPtr<Interface>> operator&() {
181 return details::ScopedComPtrRef<ScopedComPtr<Interface>>(this); 181 return details::ScopedComPtrRef<ScopedComPtr<Interface>>(this);
182 } 182 }
183 183
184 void swap(ScopedComPtr<Interface>& r) { 184 void Swap(ScopedComPtr<Interface>& r) {
185 Interface* tmp = ptr_; 185 Interface* tmp = ptr_;
186 ptr_ = r.ptr_; 186 ptr_ = r.ptr_;
187 r.ptr_ = tmp; 187 r.ptr_ = tmp;
188 } 188 }
189 189
190 private: 190 private:
191 Interface* ptr_ = nullptr; 191 Interface* ptr_ = nullptr;
192 }; 192 };
193 193
194 namespace details { 194 namespace details {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Helper to make IID_PPV_ARGS work with ScopedComPtr. 256 // Helper to make IID_PPV_ARGS work with ScopedComPtr.
257 template <typename T> 257 template <typename T>
258 void** IID_PPV_ARGS_Helper(base::win::details::ScopedComPtrRef<T> pp) throw() { 258 void** IID_PPV_ARGS_Helper(base::win::details::ScopedComPtrRef<T> pp) throw() {
259 return pp; 259 return pp;
260 } 260 }
261 261
262 } // namespace win 262 } // namespace win
263 } // namespace base 263 } // namespace base
264 264
265 #endif // BASE_WIN_SCOPED_COMPTR_H_ 265 #endif // BASE_WIN_SCOPED_COMPTR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/google/google_update_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698