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

Unified Diff: chrome/browser/ui/views/status_icons/status_tray_state_changer_win.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
Index: chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
diff --git a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
index dcdd49fc07dac41ac9133f69c6314b82fb3194a1..1cbb729a5e7f0828a521391bdf1197290dae9977 100644
--- a/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
+++ b/chrome/browser/ui/views/status_icons/status_tray_state_changer_win.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/ui/views/status_icons/status_tray_state_changer_win.h"
+#include <objbase.h>
+
#include <utility>
namespace {
@@ -127,7 +129,8 @@ bool StatusTrayStateChangerWin::CreateTrayNotify() {
tray_notify_.Reset(); // Reset so this method can be called more than once.
- HRESULT hr = tray_notify_.CreateInstance(CLSID_TrayNotify);
+ HRESULT hr = ::CoCreateInstance(CLSID_TrayNotify, nullptr, CLSCTX_ALL,
+ IID_PPV_ARGS(&tray_notify_));
if (FAILED(hr))
return false;
« no previous file with comments | « chrome/browser/ui/views/frame/taskbar_decorator_win.cc ('k') | chrome/browser/ui/views/tabs/window_finder_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698