|
@@ -5,6 +5,7 @@
|
|
|
#include "atom/utility/atom_content_utility_client.h"
|
|
|
|
|
|
#if defined(OS_WIN)
|
|
|
+#include "base/memory/ptr_util.h"
|
|
|
#include "chrome/utility/printing_handler_win.h"
|
|
|
#endif
|
|
|
|
|
@@ -12,7 +13,7 @@ namespace atom {
|
|
|
|
|
|
AtomContentUtilityClient::AtomContentUtilityClient() {
|
|
|
#if defined(OS_WIN)
|
|
|
- handlers_.push_back(new printing::PrintingHandlerWin());
|
|
|
+ handlers_.push_back(base::MakeUnique<printing::PrintingHandlerWin>());
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -22,7 +23,7 @@ AtomContentUtilityClient::~AtomContentUtilityClient() {
|
|
|
bool AtomContentUtilityClient::OnMessageReceived(
|
|
|
const IPC::Message& message) {
|
|
|
#if defined(OS_WIN)
|
|
|
- for (auto* handler : handlers_) {
|
|
|
+ for (const auto& handler : handlers_) {
|
|
|
if (handler->OnMessageReceived(message))
|
|
|
return true;
|
|
|
}
|