Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: ipc/mojo/ipc_channel_mojo.cc

Issue 1445003002: Use std::default_delete as the default deleter for scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: How many trial and errors before this builds on the Windows bots Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/mojo/ipc_message_pipe_reader.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ipc/mojo/ipc_channel_mojo.h" 5 #include "ipc/mojo/ipc_channel_mojo.h"
6 6
7 #include <memory>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 11 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
11 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
12 #include "ipc/ipc_listener.h" 14 #include "ipc/ipc_listener.h"
13 #include "ipc/ipc_logging.h" 15 #include "ipc/ipc_logging.h"
14 #include "ipc/ipc_message_attachment_set.h" 16 #include "ipc/ipc_message_attachment_set.h"
15 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
16 #include "ipc/mojo/client_channel.mojom.h" 18 #include "ipc/mojo/client_channel.mojom.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 356
355 void ChannelMojo::OnBootstrapError() { 357 void ChannelMojo::OnBootstrapError() {
356 listener_->OnChannelError(); 358 listener_->OnChannelError();
357 } 359 }
358 360
359 namespace { 361 namespace {
360 362
361 // ClosingDeleter calls |CloseWithErrorIfPending| before deleting the 363 // ClosingDeleter calls |CloseWithErrorIfPending| before deleting the
362 // |MessagePipeReader|. 364 // |MessagePipeReader|.
363 struct ClosingDeleter { 365 struct ClosingDeleter {
364 typedef base::DefaultDeleter<internal::MessagePipeReader> DefaultType; 366 typedef std::default_delete<internal::MessagePipeReader> DefaultType;
365 367
366 void operator()(internal::MessagePipeReader* ptr) const { 368 void operator()(internal::MessagePipeReader* ptr) const {
367 ptr->CloseWithErrorIfPending(); 369 ptr->CloseWithErrorIfPending();
368 delete ptr; 370 delete ptr;
369 } 371 }
370 }; 372 };
371 373
372 } // namespace 374 } // namespace
373 375
374 void ChannelMojo::InitMessageReader(mojo::ScopedMessagePipeHandle pipe, 376 void ChannelMojo::InitMessageReader(mojo::ScopedMessagePipeHandle pipe,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 if (!ok) { 533 if (!ok) {
532 LOG(ERROR) << "Failed to add new Mojo handle."; 534 LOG(ERROR) << "Failed to add new Mojo handle.";
533 return MOJO_RESULT_UNKNOWN; 535 return MOJO_RESULT_UNKNOWN;
534 } 536 }
535 } 537 }
536 538
537 return MOJO_RESULT_OK; 539 return MOJO_RESULT_OK;
538 } 540 }
539 541
540 } // namespace IPC 542 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_proxy.cc ('k') | ipc/mojo/ipc_message_pipe_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698