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

Side by Side Diff: net/http2/tools/http2_random.h

Issue 2554683003: Revert of Add new HTTP/2 and HPACK decoder in net/http2/. (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « net/http2/tools/http2_frame_builder.cc ('k') | net/http2/tools/http2_random.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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_HTTP2_TOOLS_HTTP2_RANDOM_H_
6 #define NET_HTTP2_TOOLS_HTTP2_RANDOM_H_
7
8 #include <stdint.h>
9
10 #include <string>
11
12 namespace net {
13 namespace test {
14
15 class RandomBase {
16 public:
17 virtual ~RandomBase() {}
18 virtual bool OneIn(int n) = 0;
19 virtual int32_t Uniform(int32_t n) = 0;
20 virtual uint8_t Rand8() = 0;
21 virtual uint16_t Rand16() = 0;
22 virtual uint32_t Rand32() = 0;
23 virtual uint64_t Rand64() = 0;
24 virtual int32_t Next() = 0;
25 virtual int32_t Skewed(int max_log) = 0;
26 virtual std::string RandString(int length) = 0;
27 };
28
29 class Http2Random : public RandomBase {
30 public:
31 ~Http2Random() override {}
32 bool OneIn(int n) override;
33 int32_t Uniform(int32_t n) override;
34 uint8_t Rand8() override;
35 uint16_t Rand16() override;
36 uint32_t Rand32() override;
37 uint64_t Rand64() override;
38 int32_t Next() override;
39 int32_t Skewed(int max_log) override;
40 std::string RandString(int length) override;
41 };
42
43 } // namespace test
44 } // namespace net
45
46 #endif // NET_HTTP2_TOOLS_HTTP2_RANDOM_H_
OLDNEW
« no previous file with comments | « net/http2/tools/http2_frame_builder.cc ('k') | net/http2/tools/http2_random.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698