net: Move DiffServCodePoint enum out of net_util.h.
This patch moves DiffServCodePoint enum into its own header file under
net/udp/diff_serv_code_point.h, to help breaking up net_util.h.
BUG=488531
[email protected],[email protected]
[email protected],[email protected],[email protected]
Review URL: https://codereview.chromium.org/1396733002
Cr-Commit-Position: refs/heads/master@{#353133}
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 7c9f3c8..c430019c 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -231,36 +231,6 @@
IP_ADDRESS_ATTRIBUTE_DEPRECATED = 1 << 1,
};
-// Differentiated Services Code Point.
-// See http://tools.ietf.org/html/rfc2474 for details.
-enum DiffServCodePoint {
- DSCP_NO_CHANGE = -1,
- DSCP_FIRST = DSCP_NO_CHANGE,
- DSCP_DEFAULT = 0, // Same as DSCP_CS0
- DSCP_CS0 = 0, // The default
- DSCP_CS1 = 8, // Bulk/background traffic
- DSCP_AF11 = 10,
- DSCP_AF12 = 12,
- DSCP_AF13 = 14,
- DSCP_CS2 = 16,
- DSCP_AF21 = 18,
- DSCP_AF22 = 20,
- DSCP_AF23 = 22,
- DSCP_CS3 = 24,
- DSCP_AF31 = 26,
- DSCP_AF32 = 28,
- DSCP_AF33 = 30,
- DSCP_CS4 = 32,
- DSCP_AF41 = 34, // Video
- DSCP_AF42 = 36, // Video
- DSCP_AF43 = 38, // Video
- DSCP_CS5 = 40, // Video
- DSCP_EF = 46, // Voice
- DSCP_CS6 = 48, // Voice
- DSCP_CS7 = 56, // Control messages
- DSCP_LAST = DSCP_CS7
-};
-
} // namespace net
#endif // NET_BASE_NET_UTIL_H_
diff --git a/net/net.gypi b/net/net.gypi
index a6e27b3..4d446b0 100644
--- a/net/net.gypi
+++ b/net/net.gypi
@@ -1144,6 +1144,7 @@
'udp/datagram_client_socket.h',
'udp/datagram_server_socket.h',
'udp/datagram_socket.h',
+ 'udp/diff_serv_code_point.h',
'udp/udp_client_socket.cc',
'udp/udp_client_socket.h',
'udp/udp_net_log_parameters.cc',
diff --git a/net/udp/datagram_server_socket.h b/net/udp/datagram_server_socket.h
index d3796c3..0002868 100644
--- a/net/udp/datagram_server_socket.h
+++ b/net/udp/datagram_server_socket.h
@@ -6,8 +6,8 @@
#define NET_UDP_DATAGRAM_SERVER_SOCKET_H_
#include "net/base/completion_callback.h"
-#include "net/base/net_util.h"
#include "net/udp/datagram_socket.h"
+#include "net/udp/diff_serv_code_point.h"
namespace net {
diff --git a/net/udp/diff_serv_code_point.h b/net/udp/diff_serv_code_point.h
new file mode 100644
index 0000000..f4a8786
--- /dev/null
+++ b/net/udp/diff_serv_code_point.h
@@ -0,0 +1,42 @@
+// Copyright 2015 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.
+
+#ifndef NET_UDP_DIFF_SERV_CODE_POINT_H_
+#define NET_UDP_DIFF_SERV_CODE_POINT_H_
+
+namespace net {
+
+// Differentiated Services Code Point.
+// See http://tools.ietf.org/html/rfc2474 for details.
+enum DiffServCodePoint {
+ DSCP_NO_CHANGE = -1,
+ DSCP_FIRST = DSCP_NO_CHANGE,
+ DSCP_DEFAULT = 0, // Same as DSCP_CS0
+ DSCP_CS0 = 0, // The default
+ DSCP_CS1 = 8, // Bulk/background traffic
+ DSCP_AF11 = 10,
+ DSCP_AF12 = 12,
+ DSCP_AF13 = 14,
+ DSCP_CS2 = 16,
+ DSCP_AF21 = 18,
+ DSCP_AF22 = 20,
+ DSCP_AF23 = 22,
+ DSCP_CS3 = 24,
+ DSCP_AF31 = 26,
+ DSCP_AF32 = 28,
+ DSCP_AF33 = 30,
+ DSCP_CS4 = 32,
+ DSCP_AF41 = 34, // Video
+ DSCP_AF42 = 36, // Video
+ DSCP_AF43 = 38, // Video
+ DSCP_CS5 = 40, // Video
+ DSCP_EF = 46, // Voice
+ DSCP_CS6 = 48, // Voice
+ DSCP_CS7 = 56, // Control messages
+ DSCP_LAST = DSCP_CS7
+};
+
+} // namespace net
+
+#endif // NET_UDP_DIFF_SERV_CODE_POINT_H_
diff --git a/net/udp/udp_socket_posix.h b/net/udp/udp_socket_posix.h
index eb18daa..44547d5f 100644
--- a/net/udp/udp_socket_posix.h
+++ b/net/udp/udp_socket_posix.h
@@ -14,11 +14,12 @@
#include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"
-#include "net/base/net_util.h"
+#include "net/base/network_change_notifier.h"
#include "net/base/rand_callback.h"
#include "net/log/net_log.h"
#include "net/socket/socket_descriptor.h"
#include "net/udp/datagram_socket.h"
+#include "net/udp/diff_serv_code_point.h"
namespace net {
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h
index d01e67b..b06a6a7a 100644
--- a/net/udp/udp_socket_win.h
+++ b/net/udp/udp_socket_win.h
@@ -19,10 +19,11 @@
#include "net/base/io_buffer.h"
#include "net/base/ip_endpoint.h"
#include "net/base/net_export.h"
-#include "net/base/net_util.h"
+#include "net/base/network_change_notifier.h"
#include "net/base/rand_callback.h"
#include "net/log/net_log.h"
#include "net/udp/datagram_socket.h"
+#include "net/udp/diff_serv_code_point.h"
namespace net {