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

Unified Diff: mojo/edk/system/node_controller.cc

Issue 2512753002: Move const PortName data out of header file (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/ports/name.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/ports/name.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698