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

Side by Side Diff: net/base/net_errors.h

Issue 227473008: make SetReceiveBufferSize and SetSendBufferSize return net error codes (instead of bools) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux typo Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_BASE_NET_ERRORS_H__ 5 #ifndef NET_BASE_NET_ERRORS_H__
6 #define NET_BASE_NET_ERRORS_H__ 6 #define NET_BASE_NET_ERRORS_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // an action that is represented as a net error code. 50 // an action that is represented as a net error code.
51 // 51 //
52 // Note that the error codes are all positive (since histograms expect positive 52 // Note that the error codes are all positive (since histograms expect positive
53 // sample values). Also note that a guard bucket is created after any valid 53 // sample values). Also note that a guard bucket is created after any valid
54 // error code that is not followed immediately by a valid error code. 54 // error code that is not followed immediately by a valid error code.
55 NET_EXPORT std::vector<int> GetAllErrorCodesForUma(); 55 NET_EXPORT std::vector<int> GetAllErrorCodesForUma();
56 56
57 // A convenient function to translate file error to net error code. 57 // A convenient function to translate file error to net error code.
58 NET_EXPORT Error FileErrorToNetError(base::File::Error file_error); 58 NET_EXPORT Error FileErrorToNetError(base::File::Error file_error);
59 59
60 // Return a net_error other than net::OK, based on |os_error|.
61 // Some older OSs (Mac 10.6?) may fail to set the os_error properly, even when
62 // a system function returns a failing value. This function is used to map such
63 // cases into a default net_error, if the net_error would otherwise mistakenly
64 // report OK (such as when errno was zero).
65 int MapSystemErrorWithDefault(int os_error, int default_net_error);
wtc 2014/04/09 15:34:49 Nit: please list this function right below the clo
66
60 } // namespace net 67 } // namespace net
61 68
62 #endif // NET_BASE_NET_ERRORS_H__ 69 #endif // NET_BASE_NET_ERRORS_H__
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/base/net_errors.cc » ('j') | net/base/net_errors.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698