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

Side by Side Diff: net/quic/platform/impl/quic_flags_impl.h

Issue 2825083003: Landing Recent QUIC changes until Mon Apr 17 2017 (Closed)
Patch Set: Format Created 3 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 unified diff | Download patch
« no previous file with comments | « net/quic/platform/api/quic_flags.h ('k') | net/quic/platform/impl/quic_flags_impl.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 2014 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_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
6 #define NET_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
7
8 #include <cstdint>
9 #include <string>
10
11 #include "net/quic/platform/api/quic_export.h"
12
13 #define QUIC_FLAG(type, flag, value) QUIC_EXPORT_PRIVATE extern type flag;
14 #include "net/quic/core/quic_flags_list.h"
15 #undef QUIC_FLAG
16
17 // API compatibility with new-style flags.
18 namespace net {
19
20 inline bool GetQuicFlagImpl(bool flag) {
21 return flag;
22 }
23 inline int32_t GetQuicFlagImpl(int32_t flag) {
24 return flag;
25 }
26 inline int64_t GetQuicFlagImpl(int64_t flag) {
27 return flag;
28 }
29 inline uint64_t GetQuicFlagImpl(uint64_t flag) {
30 return flag;
31 }
32 inline double GetQuicFlagImpl(double flag) {
33 return flag;
34 }
35 inline std::string GetQuicFlagImpl(const std::string& flag) {
36 return flag;
37 }
38
39 inline void SetQuicFlagImpl(bool* f, bool v) {
40 *f = v;
41 }
42 inline void SetQuicFlagImpl(int32_t* f, int32_t v) {
43 *f = v;
44 }
45 inline void SetQuicFlagImpl(int64_t* f, int64_t v) {
46 *f = v;
47 }
48 inline void SetQuicFlagImpl(uint64_t* f, uint64_t v) {
49 *f = v;
50 }
51 inline void SetQuicFlagImpl(double* f, double v) {
52 *f = v;
53 }
54 inline void SetQuicFlagImpl(std::string* f, const std::string& v) {
55 *f = v;
56 }
57
58 } // namespace net
59
60 #endif // NET_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
OLDNEW
« no previous file with comments | « net/quic/platform/api/quic_flags.h ('k') | net/quic/platform/impl/quic_flags_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698