[c++11 library] Remove ScopedVector
https://bugs.chromium.org/p/chromium/issues/detail?id=554289
This commit is contained in:
parent
ac8c205fd7
commit
d817e23050
2 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
||||
#define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#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<UtilityMessageHandler> Handlers;
|
||||
typedef std::vector<std::unique_ptr<UtilityMessageHandler>> Handlers;
|
||||
Handlers handlers_;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue