From 75b08f510ee021b3a984095dce873769ae127fb8 Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Fri, 24 Jul 2015 03:27:15 -0700 Subject: [PATCH] Fix up namespaces --- atom/browser/ui/win/notify_icon.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/atom/browser/ui/win/notify_icon.cc b/atom/browser/ui/win/notify_icon.cc index 6f75bb311dae..e9b153b49ab6 100644 --- a/atom/browser/ui/win/notify_icon.cc +++ b/atom/browser/ui/win/notify_icon.cc @@ -29,18 +29,21 @@ NotifyIcon::NotifyIcon(NotifyIconHost* host, window_(window), message_id_(message), menu_model_(NULL) { - - // NB: If we have an App Model ID, we should propagate that to the tray. + + // NB: If we have an App Model ID, we should propagate that to the tray. // Doing this prevents duplicate items from showing up in the notification // preferences (i.e. "Always Show / Show notifications only / etc") PWSTR explicit_app_id; - + if (SUCCEEDED(GetCurrentProcessExplicitAppUserModelID(&explicit_app_id))) { // GUIDs and MD5 hashes are the same length. So convenient! - MD5Sum(explicit_app_id, sizeof(wchar_t) * wcslen(explicit_app_id), (MD5Digest*)&tray_app_id_hash_); + base::MD5Sum(explicit_app_id, + sizeof(wchar_t) * wcslen(explicit_app_id), + (base::MD5Digest*)&tray_app_id_hash_); + CoTaskMemFree(explicit_app_id); } - + NOTIFYICONDATA icon_data; InitIconData(&icon_data); icon_data.uFlags = NIF_MESSAGE; @@ -176,7 +179,7 @@ void NotifyIcon::InitIconData(NOTIFYICONDATA* icon_data) { icon_data->cbSize = sizeof(NOTIFYICONDATA); icon_data->hWnd = window_; icon_data->uID = icon_id_; - memcpy(icon_data->guidItem, tray_app_id_hash_, sizeof(GUID)); + memcpy((void*)&icon_data->guidItem, &tray_app_id_hash_, sizeof(GUID)); } } // namespace atom