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

Unified Diff: net/base/winsock_util.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « net/base/winsock_util.h ('k') | net/base/zap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/winsock_util.cc
diff --git a/net/base/winsock_util.cc b/net/base/winsock_util.cc
deleted file mode 100644
index 5522e2719a549e9d0fdc6d557df63f3d715d5964..0000000000000000000000000000000000000000
--- a/net/base/winsock_util.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/base/winsock_util.h"
-
-#include "base/logging.h"
-#include "net/base/net_errors.h"
-
-namespace net {
-
-namespace {
-
-// Prevent the compiler from optimizing away the arguments so they appear
-// nicely on the stack in crash dumps.
-#pragma warning(push)
-#pragma warning (disable: 4748)
-#pragma optimize( "", off )
-
-// Pass the important values as function arguments so that they are available
-// in crash dumps.
-void CheckEventWait(WSAEVENT hEvent, DWORD wait_rv, DWORD expected) {
- if (wait_rv != expected) {
- DWORD err = ERROR_SUCCESS;
- if (wait_rv == WAIT_FAILED)
- err = GetLastError();
- CHECK(false); // Crash.
- }
-}
-
-#pragma optimize( "", on )
-#pragma warning(pop)
-
-} // namespace
-
-void AssertEventNotSignaled(WSAEVENT hEvent) {
- DWORD wait_rv = WaitForSingleObject(hEvent, 0);
- CheckEventWait(hEvent, wait_rv, WAIT_TIMEOUT);
-}
-
-bool ResetEventIfSignaled(WSAEVENT hEvent) {
- // TODO(wtc): Remove the CHECKs after enough testing.
- DWORD wait_rv = WaitForSingleObject(hEvent, 0);
- if (wait_rv == WAIT_TIMEOUT)
- return false; // The event object is not signaled.
- CheckEventWait(hEvent, wait_rv, WAIT_OBJECT_0);
- BOOL ok = WSAResetEvent(hEvent);
- CHECK(ok);
- return true;
-}
-
-} // namespace net
« no previous file with comments | « net/base/winsock_util.h ('k') | net/base/zap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698