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

Unified Diff: chrome/browser/prefs/incognito_mode_prefs.cc

Issue 2894483002: Migrate from ScopedComPtr::CreateInstance() to CoCreateInstance in chrome/... (Closed)
Patch Set: Fix Header Include Location 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 | « chrome/browser/metrics/antivirus_metrics_provider_win.cc ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/incognito_mode_prefs.cc
diff --git a/chrome/browser/prefs/incognito_mode_prefs.cc b/chrome/browser/prefs/incognito_mode_prefs.cc
index 6b36b33c9aa090a06b1d2fd40cb34891d3ab7374..b5324b392c822ef6665b0a81120c2cbeb05005b6 100644
--- a/chrome/browser/prefs/incognito_mode_prefs.cc
+++ b/chrome/browser/prefs/incognito_mode_prefs.cc
@@ -23,6 +23,7 @@
#if defined(OS_WIN)
#include <windows.h>
+#include <objbase.h>
#include <wpcapi.h>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -102,8 +103,8 @@ class PlatformParentalControlsValue {
// is enabled.
static bool IsParentalControlActivityLoggingOnImpl() {
base::win::ScopedComPtr<IWindowsParentalControlsCore> parent_controls;
- HRESULT hr = parent_controls.CreateInstance(
- __uuidof(WindowsParentalControls));
+ HRESULT hr = ::CoCreateInstance(__uuidof(WindowsParentalControls), nullptr,
+ CLSCTX_ALL, IID_PPV_ARGS(&parent_controls));
if (FAILED(hr))
return false;
« no previous file with comments | « chrome/browser/metrics/antivirus_metrics_provider_win.cc ('k') | chrome/browser/shell_integration_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698