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

Unified Diff: chrome/browser/extensions/api/serial/serial_io_handler.cc

Issue 320513002: Remove base::kInvalidPlatformFileValue from Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | chrome/browser/extensions/api/serial/serial_io_handler_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/serial/serial_io_handler.cc
diff --git a/chrome/browser/extensions/api/serial/serial_io_handler.cc b/chrome/browser/extensions/api/serial/serial_io_handler.cc
index 683dde6afa0a5b68af3fbba542a1c563c0946f14..1af3975cd44028d138406270b7dadb8a8728f166 100644
--- a/chrome/browser/extensions/api/serial/serial_io_handler.cc
+++ b/chrome/browser/extensions/api/serial/serial_io_handler.cc
@@ -7,10 +7,18 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
+namespace {
+#if defined(OS_WIN)
+const base::PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE;
+#elif defined(OS_POSIX)
+const base::PlatformFile kInvalidPlatformFileValue = -1;
+#endif
+} // namespace
+
namespace extensions {
SerialIoHandler::SerialIoHandler()
- : file_(base::kInvalidPlatformFileValue),
+ : file_(kInvalidPlatformFileValue),
rvargas (doing something else) 2014/06/06 19:18:06 There is already a bug filed about removing the ra
pending_read_buffer_len_(0),
pending_write_buffer_len_(0) {
}
@@ -23,7 +31,7 @@ void SerialIoHandler::Initialize(base::PlatformFile file,
const ReadCompleteCallback& read_callback,
const WriteCompleteCallback& write_callback) {
DCHECK(CalledOnValidThread());
- DCHECK_EQ(file_, base::kInvalidPlatformFileValue);
+ DCHECK_EQ(file_, kInvalidPlatformFileValue);
file_ = file;
read_complete_ = read_callback;
« no previous file with comments | « no previous file | chrome/browser/extensions/api/serial/serial_io_handler_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698