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

Side by Side Diff: net/quic/chromium/quic_clock_skew_detector.h

Issue 2487973003: GOAWAY open QUIC sessions if clock skew is detected (Closed)
Patch Set: format Created 4 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_QUIC_CHROMIUM_QUIC_CLOCK_SKEW_DETECTOR_H_
6 #define NET_QUIC_CHROMIUM_QUIC_CLOCK_SKEW_DETECTOR_H_
7
8 #include "base/time/time.h"
9 #include "net/base/net_export.h"
10
11 namespace net {
12
13 class NET_EXPORT_PRIVATE QuicClockSkewDetector {
14 public:
15 QuicClockSkewDetector(base::TimeTicks ticks_time, base::Time wall_time);
16
17 // Returns true if the delta between |wall_now| and |last_wall_time_| is
18 // more than one second larger than the delta between |ticks_now| and
19 // |last_ticks_time_|. Updates |last_ticks_time_| and |last_wall_time_|.
20 bool ClockSkewDetected(base::TimeTicks ticks_now, base::Time wall_now);
21
22 private:
23 // Clock skew detection members
24 base::TimeTicks last_ticks_time_;
25 base::Time last_wall_time_;
26 };
27
28 } // namespace net
29
30 #endif // NET_QUIC_CHROMIUM_QUIC_CLOCK_SKEW_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698