diff --git a/atom/utility/atom_content_utility_client.cc b/atom/utility/atom_content_utility_client.cc index cc36293f435..653aca2b861 100644 --- a/atom/utility/atom_content_utility_client.cc +++ b/atom/utility/atom_content_utility_client.cc @@ -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()); #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; } diff --git a/atom/utility/atom_content_utility_client.h b/atom/utility/atom_content_utility_client.h index b4aa7960f6f..7694970457b 100644 --- a/atom/utility/atom_content_utility_client.h +++ b/atom/utility/atom_content_utility_client.h @@ -5,10 +5,10 @@ #ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ #define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ +#include #include #include "base/compiler_specific.h" -#include "base/memory/scoped_vector.h" #include "content/public/utility/content_utility_client.h" class UtilityMessageHandler; @@ -24,7 +24,7 @@ class AtomContentUtilityClient : public content::ContentUtilityClient { private: #if defined(OS_WIN) - typedef ScopedVector Handlers; + typedef std::vector> Handlers; Handlers handlers_; #endif