| Index: mojo/edk/system/node_controller.cc
|
| diff --git a/mojo/edk/system/node_controller.cc b/mojo/edk/system/node_controller.cc
|
| index 1a4815435698fac2b0cf4239e765ec643f56bfc6..0351849d8412b25d9f5afaa1d9dea81c079575e4 100644
|
| --- a/mojo/edk/system/node_controller.cc
|
| +++ b/mojo/edk/system/node_controller.cc
|
| @@ -450,7 +450,7 @@ void NodeController::ConnectToParentOnIOThread(
|
|
|
| {
|
| base::AutoLock lock(parent_lock_);
|
| - DCHECK(parent_name_ == ports::kInvalidNodeName);
|
| + DCHECK(parent_name_ == ports::constants::kInvalidNodeName);
|
|
|
| // At this point we don't know the parent's name, so we can't yet insert it
|
| // into our |peers_| map. That will happen as soon as we receive an
|
| @@ -531,7 +531,7 @@ void NodeController::AddPeer(const ports::NodeName& name,
|
| bool start_channel) {
|
| DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
|
|
|
| - DCHECK(name != ports::kInvalidNodeName);
|
| + DCHECK(name != ports::constants::kInvalidNodeName);
|
| DCHECK(channel);
|
|
|
| channel->SetRemoteNodeName(name);
|
| @@ -676,7 +676,7 @@ void NodeController::SendPeerMessage(const ports::NodeName& name,
|
| {
|
| base::AutoLock lock(parent_lock_);
|
| use_broker = (bootstrap_parent_channel_ ||
|
| - parent_name_ != ports::kInvalidNodeName);
|
| + parent_name_ != ports::constants::kInvalidNodeName);
|
| }
|
| if (use_broker) {
|
| scoped_refptr<NodeChannel> broker = GetBrokerChannel();
|
| @@ -881,7 +881,8 @@ void NodeController::OnAcceptChild(const ports::NodeName& from_node,
|
| scoped_refptr<NodeChannel> parent;
|
| {
|
| base::AutoLock lock(parent_lock_);
|
| - if (bootstrap_parent_channel_ && parent_name_ == ports::kInvalidNodeName) {
|
| + if (bootstrap_parent_channel_ &&
|
| + parent_name_ == ports::constants::kInvalidNodeName) {
|
| parent_name_ = parent_name;
|
| parent = bootstrap_parent_channel_;
|
| }
|
| @@ -1042,7 +1043,7 @@ void NodeController::OnAcceptBrokerClient(const ports::NodeName& from_node,
|
| std::swap(pending_broker_clients, pending_broker_clients_);
|
| std::swap(pending_relay_messages, pending_relay_messages_);
|
| }
|
| - DCHECK(broker_name != ports::kInvalidNodeName);
|
| + DCHECK(broker_name != ports::constants::kInvalidNodeName);
|
|
|
| // It's now possible to add both the broker and the parent as peers.
|
| // Note that the broker and parent may be the same node.
|
| @@ -1148,7 +1149,8 @@ void NodeController::OnRequestIntroduction(const ports::NodeName& from_node,
|
| DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
|
|
|
| scoped_refptr<NodeChannel> requestor = GetPeerChannel(from_node);
|
| - if (from_node == name || name == ports::kInvalidNodeName || !requestor) {
|
| + if (from_node == name || name == ports::constants::kInvalidNodeName ||
|
| + !requestor) {
|
| DLOG(ERROR) << "Rejecting invalid OnRequestIntroduction message from "
|
| << from_node;
|
| DropPeer(from_node, nullptr);
|
| @@ -1357,7 +1359,8 @@ MachPortRelay* NodeController::GetMachPortRelay() {
|
| {
|
| base::AutoLock lock(parent_lock_);
|
| // Return null if we're not the root.
|
| - if (bootstrap_parent_channel_ || parent_name_ != ports::kInvalidNodeName)
|
| + if (bootstrap_parent_channel_ ||
|
| + parent_name_ != ports::constants::kInvalidNodeName)
|
| return nullptr;
|
| }
|
|
|
|
|