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

Unified Diff: net/tools/quic/quic_epoll_connection_helper.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/tools/quic/quic_epoll_connection_helper.h ('k') | net/tools/quic/quic_epoll_connection_helper_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_epoll_connection_helper.cc
diff --git a/net/tools/quic/quic_epoll_connection_helper.cc b/net/tools/quic/quic_epoll_connection_helper.cc
deleted file mode 100644
index b763d822c7ccbd7679dc92c1a09b984b83b78601..0000000000000000000000000000000000000000
--- a/net/tools/quic/quic_epoll_connection_helper.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2012 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/tools/quic/quic_epoll_connection_helper.h"
-
-#include <errno.h>
-#include <sys/socket.h>
-
-#include "base/logging.h"
-#include "base/stl_util.h"
-#include "net/base/ip_endpoint.h"
-#include "net/quic/crypto/quic_random.h"
-#include "net/tools/epoll_server/epoll_server.h"
-#include "net/tools/quic/quic_socket_utils.h"
-
-namespace net {
-namespace tools {
-
-namespace {
-
-class QuicEpollAlarm : public QuicAlarm {
- public:
- QuicEpollAlarm(EpollServer* epoll_server,
- QuicAlarm::Delegate* delegate)
- : QuicAlarm(delegate),
- epoll_server_(epoll_server),
- epoll_alarm_impl_(this) {}
-
- protected:
- void SetImpl() override {
- DCHECK(deadline().IsInitialized());
- epoll_server_->RegisterAlarm(
- deadline().Subtract(QuicTime::Zero()).ToMicroseconds(),
- &epoll_alarm_impl_);
- }
-
- void CancelImpl() override {
- DCHECK(!deadline().IsInitialized());
- epoll_alarm_impl_.UnregisterIfRegistered();
- }
-
- private:
- class EpollAlarmImpl : public EpollAlarm {
- public:
- explicit EpollAlarmImpl(QuicEpollAlarm* alarm) : alarm_(alarm) {}
-
- int64 OnAlarm() override {
- EpollAlarm::OnAlarm();
- alarm_->Fire();
- // Fire will take care of registering the alarm, if needed.
- return 0;
- }
-
- private:
- QuicEpollAlarm* alarm_;
- };
-
- EpollServer* epoll_server_;
- EpollAlarmImpl epoll_alarm_impl_;
-};
-
-} // namespace
-
-QuicEpollConnectionHelper::QuicEpollConnectionHelper(EpollServer* epoll_server)
- : epoll_server_(epoll_server),
- clock_(epoll_server),
- random_generator_(QuicRandom::GetInstance()) {
-}
-
-QuicEpollConnectionHelper::~QuicEpollConnectionHelper() {
-}
-
-const QuicClock* QuicEpollConnectionHelper::GetClock() const {
- return &clock_;
-}
-
-QuicRandom* QuicEpollConnectionHelper::GetRandomGenerator() {
- return random_generator_;
-}
-
-QuicAlarm* QuicEpollConnectionHelper::CreateAlarm(
- QuicAlarm::Delegate* delegate) {
- return new QuicEpollAlarm(epoll_server_, delegate);
-}
-
-} // namespace tools
-} // namespace net
« no previous file with comments | « net/tools/quic/quic_epoll_connection_helper.h ('k') | net/tools/quic/quic_epoll_connection_helper_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698