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

Unified Diff: base/win/scoped_comptr.h

Issue 2870263002: Rename ScopedComPtr::Receive to ScopedComPtr::GetAddressOf (Closed)
Patch Set: Rebase to 2a6f440 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_comptr.h
diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
index e1535ca7b792c157d7b24724f34d3e80e90b4506..8d3c93150789b4d4cf72ae58408e922f9cc891c3 100644
--- a/base/win/scoped_comptr.h
+++ b/base/win/scoped_comptr.h
@@ -93,8 +93,8 @@ class ScopedComPtr {
// Retrieves the pointer address.
// Used to receive object pointers as out arguments (and take ownership).
// The function DCHECKs on the current value being NULL.
- // Usage: Foo(p.Receive());
- Interface** Receive() {
+ // Usage: Foo(p.GetAddressOf());
+ Interface** GetAddressOf() {
DCHECK(!ptr_) << "Object leak. Pointer must be NULL";
return &ptr_;
}
@@ -120,7 +120,7 @@ class ScopedComPtr {
// error code from the other->QueryInterface operation.
HRESULT QueryFrom(IUnknown* object) {
DCHECK(object);
- return object->QueryInterface(IID_PPV_ARGS(Receive()));
+ return object->QueryInterface(IID_PPV_ARGS(GetAddressOf()));
}
// Convenience wrapper around CoCreateInstance
@@ -224,7 +224,7 @@ class ScopedComPtrRef {
// ComPtr equivalent conversion operators.
operator void**() const {
- return reinterpret_cast<void**>(scoped_com_ptr_->Receive());
+ return reinterpret_cast<void**>(scoped_com_ptr_->GetAddressOf());
}
// Allows ScopedComPtr to be passed to functions as a pointer.
« no previous file with comments | « no previous file | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698