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

Unified Diff: ppapi/proxy/ppb_broker_proxy.cc

Issue 316363003: Remove base::kInvalidPlatformFileValue from components, ipc and ppapi. (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 | « ipc/ipc_platform_file.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_broker_proxy.cc
diff --git a/ppapi/proxy/ppb_broker_proxy.cc b/ppapi/proxy/ppb_broker_proxy.cc
index 19cd978608f773fe60960b1667ec083c485a7942..5463cf3a9abb149b1166a4b971672fe3166294af 100644
--- a/ppapi/proxy/ppb_broker_proxy.cc
+++ b/ppapi/proxy/ppb_broker_proxy.cc
@@ -57,11 +57,11 @@ class Broker : public PPB_Broker_API, public Resource {
Broker::Broker(const HostResource& resource)
: Resource(OBJECT_IS_PROXY, resource),
called_connect_(false),
- socket_handle_(base::kInvalidPlatformFileValue) {
+ socket_handle_(base::SyncSocket::kInvalidHandle) {
}
Broker::~Broker() {
- socket_handle_ = base::kInvalidPlatformFileValue;
+ socket_handle_ = base::SyncSocket::kInvalidHandle;
}
PPB_Broker_API* Broker::AsPPB_Broker_API() {
@@ -84,7 +84,7 @@ int32_t Broker::Connect(scoped_refptr<TrackedCallback> connect_callback) {
}
int32_t Broker::GetHandle(int32_t* handle) {
- if (socket_handle_ == base::kInvalidPlatformFileValue)
+ if (socket_handle_ == base::SyncSocket::kInvalidHandle)
return PP_ERROR_FAILED;
*handle = PlatformFileToInt(socket_handle_);
return PP_OK;
@@ -93,7 +93,7 @@ int32_t Broker::GetHandle(int32_t* handle) {
void Broker::ConnectComplete(IPC::PlatformFileForTransit socket_handle,
int32_t result) {
if (result == PP_OK) {
- DCHECK(socket_handle_ == base::kInvalidPlatformFileValue);
+ DCHECK(socket_handle_ == base::SyncSocket::kInvalidHandle);
socket_handle_ = IPC::PlatformFileForTransitToPlatformFile(socket_handle);
} else {
// The caller may still have given us a handle in the failure case.
@@ -197,12 +197,13 @@ void PPB_Broker_Proxy::ConnectCompleteInHost(int32_t result,
IPC::PlatformFileForTransit foreign_socket_handle =
IPC::InvalidPlatformFileForTransit();
if (result == PP_OK) {
- int32_t socket_handle = PlatformFileToInt(base::kInvalidPlatformFileValue);
+ int32_t socket_handle = PlatformFileToInt(base::SyncSocket::kInvalidHandle);
EnterHostFromHostResource<PPB_Broker_API> enter(broker);
if (enter.succeeded())
result = enter.object()->GetHandle(&socket_handle);
DCHECK(result == PP_OK ||
- socket_handle == PlatformFileToInt(base::kInvalidPlatformFileValue));
+ socket_handle ==
+ PlatformFileToInt(base::SyncSocket::kInvalidHandle));
if (result == PP_OK) {
foreign_socket_handle =
« no previous file with comments | « ipc/ipc_platform_file.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698