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

Unified Diff: base/message_loop/message_pump_fuchsia.cc

Issue 2941283002: fuchsia: Use new, qualified error names, disable old names. (Closed)
Patch Set: don have Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/process/kill_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_fuchsia.cc
diff --git a/base/message_loop/message_pump_fuchsia.cc b/base/message_loop/message_pump_fuchsia.cc
index 83fe291f442251ad125cbc6f032b1602dbbf86ae..a4d4770b7e951b108509044a43dd6b34e3a9181e 100644
--- a/base/message_loop/message_pump_fuchsia.cc
+++ b/base/message_loop/message_pump_fuchsia.cc
@@ -28,16 +28,16 @@ MessagePumpFuchsia::FileDescriptorWatcher::~FileDescriptorWatcher() {
bool MessagePumpFuchsia::FileDescriptorWatcher::StopWatchingFileDescriptor() {
uint64_t controller_as_key =
static_cast<uint64_t>(reinterpret_cast<uintptr_t>(this));
- return mx_port_cancel(port_, handle_, controller_as_key) == NO_ERROR;
+ return mx_port_cancel(port_, handle_, controller_as_key) == MX_OK;
}
MessagePumpFuchsia::MessagePumpFuchsia() : keep_running_(true) {
- CHECK(mx_port_create(MX_PORT_OPT_V2, &port_) == NO_ERROR);
+ CHECK(mx_port_create(MX_PORT_OPT_V2, &port_) == MX_OK);
}
MessagePumpFuchsia::~MessagePumpFuchsia() {
mx_status_t status = mx_handle_close(port_);
- if (status != NO_ERROR) {
+ if (status != MX_OK) {
DLOG(ERROR) << "mx_handle_close failed: " << status;
}
}
@@ -88,7 +88,7 @@ bool MessagePumpFuchsia::WatchFileDescriptor(int fd,
mx_status_t status =
mx_object_wait_async(controller->handle_, port_, controller_as_key,
signals, MX_WAIT_ASYNC_ONCE);
- if (status != NO_ERROR) {
+ if (status != MX_OK) {
DLOG(ERROR) << "mx_object_wait_async failed: " << status;
return false;
}
@@ -123,14 +123,14 @@ void MessagePumpFuchsia::Run(Delegate* delegate) {
delayed_work_time_.ToInternalValue();
mx_port_packet_t packet;
const mx_status_t wait_status = mx_port_wait(port_, deadline, &packet, 0);
- if (wait_status != NO_ERROR && wait_status != ERR_TIMED_OUT) {
+ if (wait_status != MX_OK && wait_status != MX_ERR_TIMED_OUT) {
NOTREACHED() << "unexpected wait status: " << wait_status;
continue;
}
if (packet.type == MX_PKT_TYPE_SIGNAL_ONE) {
// A watched fd caused the wakeup via mx_object_wait_async().
- DCHECK(packet.status == NO_ERROR);
+ DCHECK(packet.status == MX_OK);
FileDescriptorWatcher* controller =
reinterpret_cast<FileDescriptorWatcher*>(
static_cast<uintptr_t>(packet.key));
@@ -185,7 +185,7 @@ void MessagePumpFuchsia::ScheduleWork() {
mx_port_packet_t packet = {};
packet.type = MX_PKT_TYPE_USER;
mx_status_t status = mx_port_queue(port_, &packet, 0);
- if (status != NO_ERROR) {
+ if (status != MX_OK) {
DLOG(ERROR) << "mx_port_queue failed: " << status;
}
}
« no previous file with comments | « no previous file | base/process/kill_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698