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

Unified Diff: tools/battor_agent/battor_connection_impl.cc

Issue 1527183003: Change mojo enums to be scoped enums in the generated C++ bindings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-binding-equals
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sql/mojo/vfs_unittest.cc ('k') | ui/arc/notification/arc_notification_item.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/battor_agent/battor_connection_impl.cc
diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
index dc6af0758a6bae3a8c890410c35566315db234fb..37accf8085a0cf819ad417de2dba222d37c3ab05 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -19,10 +19,10 @@ namespace {
// Serial configuration parameters for the BattOr.
const uint32_t kBattOrBitrate = 2000000;
const device::serial::DataBits kBattOrDataBits =
- device::serial::DATA_BITS_EIGHT;
+ device::serial::DataBits::EIGHT;
const device::serial::ParityBit kBattOrParityBit =
- device::serial::PARITY_BIT_NONE;
-const device::serial::StopBits kBattOrStopBit = device::serial::STOP_BITS_ONE;
+ device::serial::ParityBit::NONE;
+const device::serial::StopBits kBattOrStopBit = device::serial::StopBits::ONE;
const bool kBattOrCtsFlowControl = true;
const bool kBattOrHasCtsFlowControl = true;
// The maximum BattOr message is 50kB long.
@@ -161,7 +161,7 @@ void BattOrConnectionImpl::BeginReadBytes(size_t max_bytes_to_read) {
void BattOrConnectionImpl::OnBytesRead(int bytes_read,
device::serial::ReceiveError error) {
- if (bytes_read == 0 || error != device::serial::RECEIVE_ERROR_NONE) {
+ if (bytes_read == 0 || error != device::serial::ReceiveError::NONE) {
// If we didn't have a message before, and we weren't able to read any
// additional bytes, then there's no valid message available.
EndReadBytes(false, BATTOR_MESSAGE_TYPE_CONTROL, nullptr);
@@ -255,7 +255,7 @@ bool BattOrConnectionImpl::ParseMessage(BattOrMessageType* type,
void BattOrConnectionImpl::OnBytesSent(int bytes_sent,
device::serial::SendError error) {
- bool success = (error == device::serial::SEND_ERROR_NONE) &&
+ bool success = (error == device::serial::SendError::NONE) &&
(pending_write_length_ == static_cast<size_t>(bytes_sent));
listener_->OnBytesSent(success);
}
« no previous file with comments | « sql/mojo/vfs_unittest.cc ('k') | ui/arc/notification/arc_notification_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698