🔧 Linter's gotta lint

This commit is contained in:
Felix Rieseberg 2017-12-13 16:31:02 -08:00
parent 8a8aaaf16c
commit 75cdd9ec70
2 changed files with 22 additions and 18 deletions

View file

@ -9,11 +9,11 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/environment.h"
#include "base/files/file_util.h" #include "base/files/file_util.h"
#include "base/md5.h" #include "base/md5.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "base/environment.h"
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "brightray/browser/win/notification_presenter_win7.h" #include "brightray/browser/win/notification_presenter_win7.h"
#include "brightray/browser/win/windows_toast_notification.h" #include "brightray/browser/win/windows_toast_notification.h"
@ -55,9 +55,8 @@ NotificationPresenter* NotificationPresenter::Create() {
if (!presenter->Init()) if (!presenter->Init())
return nullptr; return nullptr;
if (IsDebuggingNotifications()) { if (IsDebuggingNotifications())
LOG(INFO) << "Successfully created Windows notifications presenter"; LOG(INFO) << "Successfully created Windows notifications presenter";
}
return presenter.release(); return presenter.release();
} }

View file

@ -27,7 +27,6 @@ using ABI::Windows::Data::Xml::Dom::IXmlNode;
using ABI::Windows::Data::Xml::Dom::IXmlNodeList; using ABI::Windows::Data::Xml::Dom::IXmlNodeList;
using ABI::Windows::Data::Xml::Dom::IXmlText; using ABI::Windows::Data::Xml::Dom::IXmlText;
namespace brightray { namespace brightray {
namespace { namespace {
@ -173,23 +172,29 @@ bool WindowsToastNotification::GetToastXml(
? ABI::Windows::UI::Notifications::ToastTemplateType_ToastText02 ? ABI::Windows::UI::Notifications::ToastTemplateType_ToastText02
: ABI::Windows::UI::Notifications:: : ABI::Windows::UI::Notifications::
ToastTemplateType_ToastImageAndText02; ToastTemplateType_ToastImageAndText02;
if (FAILED(toastManager->GetTemplateContent(template_type, toast_xml))) if (FAILED(toastManager->GetTemplateContent(template_type, toast_xml))) {
if (IsDebuggingNotifications()) LOG(INFO) << "Fetching XML template failed"; if (IsDebuggingNotifications())
LOG(INFO) << "Fetching XML template failed";
return false; return false;
if (!SetXmlText(*toast_xml, title, msg)) }
if (IsDebuggingNotifications()) LOG(INFO) << "Setting text fields on template failed";
if (!SetXmlText(*toast_xml, title, msg)) {
if (IsDebuggingNotifications())
LOG(INFO) << "Setting text fields on template failed";
return false; return false;
} }
}
// Configure the toast's notification sound // Configure the toast's notification sound
if (silent) { if (silent) {
if (FAILED(SetXmlAudioSilent(*toast_xml))) if (FAILED(SetXmlAudioSilent(*toast_xml))) {
if (IsDebuggingNotifications()) { if (IsDebuggingNotifications()) {
LOG(INFO) << "Setting \"silent\" option on notification failed"; LOG(INFO) << "Setting \"silent\" option on notification failed";
} }
return false; return false;
} }
}
// Configure the toast's image // Configure the toast's image
if (!icon_path.empty()) if (!icon_path.empty())