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

Unified Diff: base/win/scoped_comptr.h

Issue 2887243002: Remove ScopedComPtr::CreateInstance() (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/test_shortcut_win.cc ('k') | 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 68c99e02d01adc9303f4dc96911c0ffb13fd06e3..05318d1adce1f79f2add072c0e0aab5593c28a9a 100644
--- a/base/win/scoped_comptr.h
+++ b/base/win/scoped_comptr.h
@@ -5,7 +5,6 @@
#ifndef BASE_WIN_SCOPED_COMPTR_H_
#define BASE_WIN_SCOPED_COMPTR_H_
-#include <objbase.h>
#include <unknwn.h>
#include "base/logging.h"
@@ -116,16 +115,6 @@ class ScopedComPtr {
return ptr_->QueryInterface(iid, obj);
}
- // Convenience wrapper around CoCreateInstance
- HRESULT CreateInstance(const CLSID& clsid,
- IUnknown* outer = nullptr,
- DWORD context = CLSCTX_ALL) {
- DCHECK(!ptr_);
- HRESULT hr = ::CoCreateInstance(clsid, outer, context, *interface_id,
- reinterpret_cast<void**>(&ptr_));
- return hr;
- }
-
// Provides direct access to the interface.
// Here we use a well known trick to make sure we block access to
// IUnknown methods so that something bad like this doesn't happen:
« no previous file with comments | « base/test/test_shortcut_win.cc ('k') | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698