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

Side by Side Diff: ipc/ipc_mojo_bootstrap.cc

Issue 2623263005: Tag some of Mojo heap allocations for the heap profiler. (Closed)
Patch Set: Addressed comments + fixed build. Created 3 years, 11 months 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
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/ipc_mojo_bootstrap.h" 5 #include "ipc/ipc_mojo_bootstrap.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 DCHECK(thread_checker_.CalledOnValidThread()); 63 DCHECK(thread_checker_.CalledOnValidThread());
64 DCHECK(task_runner_->BelongsToCurrentThread()); 64 DCHECK(task_runner_->BelongsToCurrentThread());
65 65
66 connector_.reset(new mojo::Connector( 66 connector_.reset(new mojo::Connector(
67 std::move(handle), mojo::Connector::SINGLE_THREADED_SEND, 67 std::move(handle), mojo::Connector::SINGLE_THREADED_SEND,
68 task_runner_)); 68 task_runner_));
69 connector_->set_incoming_receiver(&filters_); 69 connector_->set_incoming_receiver(&filters_);
70 connector_->set_connection_error_handler( 70 connector_->set_connection_error_handler(
71 base::Bind(&ChannelAssociatedGroupController::OnPipeError, 71 base::Bind(&ChannelAssociatedGroupController::OnPipeError,
72 base::Unretained(this))); 72 base::Unretained(this)));
73 connector_->SetWatcherHeapProfilerTag("IPC Channel");
73 } 74 }
74 75
75 void Pause() { 76 void Pause() {
76 DCHECK(!paused_); 77 DCHECK(!paused_);
77 paused_ = true; 78 paused_ = true;
78 } 79 }
79 80
80 void Unpause() { 81 void Unpause() {
81 DCHECK(paused_); 82 DCHECK(paused_);
82 paused_ = false; 83 paused_ = false;
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 Channel::Mode mode, 851 Channel::Mode mode,
851 Delegate* delegate, 852 Delegate* delegate,
852 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) { 853 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
853 return base::MakeUnique<MojoBootstrapImpl>( 854 return base::MakeUnique<MojoBootstrapImpl>(
854 std::move(handle), delegate, 855 std::move(handle), delegate,
855 new ChannelAssociatedGroupController(mode == Channel::MODE_SERVER, 856 new ChannelAssociatedGroupController(mode == Channel::MODE_SERVER,
856 ipc_task_runner)); 857 ipc_task_runner));
857 } 858 }
858 859
859 } // namespace IPC 860 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698