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

Side by Side Diff: net/base/net_errors_win.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « net/base/net_errors_posix.cc ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/net_errors.h" 5 #include "net/base/net_errors.h"
6 6
7 #include <winsock2.h> 7 #include <winsock2.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 // Map winsock and system errors to Chromium errors. 13 // Map winsock and system errors to Chromium errors.
14 Error MapSystemError(int os_error) { 14 Error MapSystemError(logging::SystemErrorCode os_error) {
15 if (os_error != 0) 15 if (os_error != 0)
16 DVLOG(2) << "Error " << os_error; 16 DVLOG(2) << "Error " << os_error;
17 17
18 // There are numerous Winsock error codes, but these are the ones we thus far 18 // There are numerous Winsock error codes, but these are the ones we thus far
19 // find interesting. 19 // find interesting.
20 switch (os_error) { 20 switch (os_error) {
21 case WSAEWOULDBLOCK: 21 case WSAEWOULDBLOCK:
22 case WSA_IO_PENDING: 22 case WSA_IO_PENDING:
23 return ERR_IO_PENDING; 23 return ERR_IO_PENDING;
24 case WSAEACCES: 24 case WSAEACCES:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 case ERROR_SUCCESS: 116 case ERROR_SUCCESS:
117 return OK; 117 return OK;
118 default: 118 default:
119 LOG(WARNING) << "Unknown error " << os_error 119 LOG(WARNING) << "Unknown error " << os_error
120 << " mapped to net::ERR_FAILED"; 120 << " mapped to net::ERR_FAILED";
121 return ERR_FAILED; 121 return ERR_FAILED;
122 } 122 }
123 } 123 }
124 124
125 } // namespace net 125 } // namespace net
OLDNEW
« no previous file with comments | « net/base/net_errors_posix.cc ('k') | net/base/net_log_event_type_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698