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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

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 | « content/common/quarantine/quarantine_win.cc ('k') | device/generic_sensor/platform_sensor_provider_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index 0088be9e7823c229c7aebe03bad91d1d994dad1a..e05aab5161ce22276c8e69a28879a7086d751d99 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -63,6 +63,7 @@
#if defined(OS_WIN) && !defined(NDEBUG)
#include <XpsObjectModel.h>
+#include <objbase.h>
#include "base/win/scoped_comptr.h"
#endif
@@ -529,8 +530,8 @@ static sk_sp<SkDocument> MakeXPSDocument(SkWStream* s) {
// In non-sandboxed mode, we will need to create and hold on to the
// factory before entering the sandbox.
base::win::ScopedComPtr<IXpsOMObjectFactory> factory;
- HRESULT hr = factory.CreateInstance(CLSID_XpsOMObjectFactory, nullptr,
- CLSCTX_INPROC_SERVER);
+ HRESULT hr = ::CoCreateInstance(CLSID_XpsOMObjectFactory, nullptr,
+ CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&factory));
if (FAILED(hr) || !factory) {
LOG(ERROR) << "CoCreateInstance(CLSID_XpsOMObjectFactory, ...) failed:"
<< logging::SystemErrorCodeToString(hr);
« no previous file with comments | « content/common/quarantine/quarantine_win.cc ('k') | device/generic_sensor/platform_sensor_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698