[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"
|
#include "atom/utility/atom_content_utility_client.h"
|
||||||
|
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
|
#include "base/memory/ptr_util.h"
|
||||||
#include "chrome/utility/printing_handler_win.h"
|
#include "chrome/utility/printing_handler_win.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,7 +13,7 @@ namespace atom {
|
||||||
|
|
||||||
AtomContentUtilityClient::AtomContentUtilityClient() {
|
AtomContentUtilityClient::AtomContentUtilityClient() {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
handlers_.push_back(new printing::PrintingHandlerWin());
|
handlers_.push_back(base::MakeUnique<printing::PrintingHandlerWin>());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ AtomContentUtilityClient::~AtomContentUtilityClient() {
|
||||||
bool AtomContentUtilityClient::OnMessageReceived(
|
bool AtomContentUtilityClient::OnMessageReceived(
|
||||||
const IPC::Message& message) {
|
const IPC::Message& message) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
for (auto* handler : handlers_) {
|
for (const auto& handler : handlers_) {
|
||||||
if (handler->OnMessageReceived(message))
|
if (handler->OnMessageReceived(message))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
#ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
||||||
#define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
#define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "base/compiler_specific.h"
|
#include "base/compiler_specific.h"
|
||||||
#include "base/memory/scoped_vector.h"
|
|
||||||
#include "content/public/utility/content_utility_client.h"
|
#include "content/public/utility/content_utility_client.h"
|
||||||
|
|
||||||
class UtilityMessageHandler;
|
class UtilityMessageHandler;
|
||||||
|
@ -24,7 +24,7 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
typedef ScopedVector<UtilityMessageHandler> Handlers;
|
typedef std::vector<std::unique_ptr<UtilityMessageHandler>> Handlers;
|
||||||
Handlers handlers_;
|
Handlers handlers_;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue