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

Unified Diff: chrome/browser/extensions/api/serial/serial_io_handler_win.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
Index: chrome/browser/extensions/api/serial/serial_io_handler_win.cc
diff --git a/chrome/browser/extensions/api/serial/serial_io_handler_win.cc b/chrome/browser/extensions/api/serial/serial_io_handler_win.cc
index de3511ad0a088d805b84ae89e47778e2e4968207..9f39e77dabd3cddb788236329fdfa54ab1f67afc 100644
--- a/chrome/browser/extensions/api/serial/serial_io_handler_win.cc
+++ b/chrome/browser/extensions/api/serial/serial_io_handler_win.cc
@@ -2,11 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <windows.h>
+
#include "chrome/browser/extensions/api/serial/serial_io_handler_win.h"
#include "base/win/windows_version.h"
-#include <windows.h>
+namespace {
+const base::PlatformFile kInvalidPlatformFileValue = INVALID_HANDLE_VALUE;
+} // namespace
namespace extensions {
@@ -38,7 +42,7 @@ void SerialIoHandlerWin::InitializeImpl() {
void SerialIoHandlerWin::ReadImpl() {
DCHECK(CalledOnValidThread());
DCHECK(pending_read_buffer());
- DCHECK_NE(file(), base::kInvalidPlatformFileValue);
+ DCHECK_NE(file(), kInvalidPlatformFileValue);
DWORD errors;
COMSTAT status;
@@ -60,7 +64,7 @@ void SerialIoHandlerWin::ReadImpl() {
void SerialIoHandlerWin::WriteImpl() {
DCHECK(CalledOnValidThread());
DCHECK(pending_write_buffer());
- DCHECK_NE(file(), base::kInvalidPlatformFileValue);
+ DCHECK_NE(file(), kInvalidPlatformFileValue);
BOOL ok = ::WriteFile(file(),
pending_write_buffer()->data(),
@@ -73,13 +77,13 @@ void SerialIoHandlerWin::WriteImpl() {
void SerialIoHandlerWin::CancelReadImpl() {
DCHECK(CalledOnValidThread());
- DCHECK_NE(file(), base::kInvalidPlatformFileValue);
+ DCHECK_NE(file(), kInvalidPlatformFileValue);
::CancelIo(file());
}
void SerialIoHandlerWin::CancelWriteImpl() {
DCHECK(CalledOnValidThread());
- DCHECK_NE(file(), base::kInvalidPlatformFileValue);
+ DCHECK_NE(file(), kInvalidPlatformFileValue);
::CancelIo(file());
}

Powered by Google App Engine
This is Rietveld 408576698