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

Unified Diff: base/scoped_comptr_win.h

Issue 149345: Adding a non-templatized version of QI for times when the IID and type aren't... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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/scoped_comptr_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/scoped_comptr_win.h
===================================================================
--- base/scoped_comptr_win.h (revision 20158)
+++ base/scoped_comptr_win.h (working copy)
@@ -89,6 +89,13 @@
return ptr_->QueryInterface(p);
}
+ // QI for times when the IID is not associated with the type.
+ HRESULT QueryInterface(const IID& iid, void** obj) {
+ DCHECK(obj != NULL);
+ DCHECK(ptr_ != NULL);
+ return ptr_->QueryInterface(iid, obj);
+ }
+
// Queries |other| for the interface this object wraps and returns the
// error code from the other->QueryInterface operation.
HRESULT QueryFrom(IUnknown* object) {
« no previous file with comments | « no previous file | base/scoped_comptr_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698