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

Unified Diff: net/tools/epoll_server/epoll_server.h

Issue 1869503003: Convert //net and //chromecast to std::unordered_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cast Created 4 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 side-by-side diff with in-line comments
Download patch
Index: net/tools/epoll_server/epoll_server.h
diff --git a/net/tools/epoll_server/epoll_server.h b/net/tools/epoll_server/epoll_server.h
index 460db3d3a4aa9ee71e8a9337463e20122d034b56..a913eba2dc07399b1001cdea5be07c0ae2a0dbdc 100644
--- a/net/tools/epoll_server/epoll_server.h
+++ b/net/tools/epoll_server/epoll_server.h
@@ -12,6 +12,8 @@
#include <map>
#include <string>
+#include <unordered_map>
+#include <unordered_set>
#include <vector>
// #define EPOLL_SERVER_EVENT_TRACING 1
@@ -34,7 +36,6 @@
#endif
#include "base/compiler_specific.h"
-#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include <sys/epoll.h>
@@ -553,7 +554,7 @@ class EpollServer {
}
};
- typedef base::hash_set<CBAndEventMask, CBAndEventMaskHash> FDToCBMap;
+ using FDToCBMap = std::unordered_set<CBAndEventMask, CBAndEventMaskHash>;
// the following four functions are OS-specific, and are likely
// to be changed in a subclass if the poll/select method is changed
@@ -664,7 +665,7 @@ class EpollServer {
// only so that we can enforce stringent checks that a caller can not register
// the same alarm twice. One option is to have an implementation in which
// this hash_set is used only in the debug mode.
- typedef base::hash_set<AlarmCB*, AlarmCBHash> AlarmCBMap;
+ using AlarmCBMap = std::unordered_set<AlarmCB*, AlarmCBHash>;
AlarmCBMap all_alarms_;
TimeToAlarmCBMap alarm_map_;
@@ -915,7 +916,7 @@ class EpollServer {
std::vector<DebugOutput*> debug_events_;
std::vector<Events> unregistered_fds_;
- typedef base::hash_map<int, Events> EventCountsMap;
+ using EventCountsMap = std::unordered_map<int, Events>;
EventCountsMap event_counts_;
int64_t num_records_;
int64_t record_threshold_;

Powered by Google App Engine
This is Rietveld 408576698