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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/impl/quic_flags_impl.h
diff --git a/net/quic/platform/impl/quic_flags_impl.h b/net/quic/platform/impl/quic_flags_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..ebec71388d1fdc77df62e91c58837d59b46ff1e4
--- /dev/null
+++ b/net/quic/platform/impl/quic_flags_impl.h
@@ -0,0 +1,60 @@
+// Copyright 2014 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.
+
+#ifndef NET_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
+#define NET_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
+
+#include <cstdint>
+#include <string>
+
+#include "net/quic/platform/api/quic_export.h"
+
+#define QUIC_FLAG(type, flag, value) QUIC_EXPORT_PRIVATE extern type flag;
+#include "net/quic/core/quic_flags_list.h"
+#undef QUIC_FLAG
+
+// API compatibility with new-style flags.
+namespace net {
+
+inline bool GetQuicFlagImpl(bool flag) {
+ return flag;
+}
+inline int32_t GetQuicFlagImpl(int32_t flag) {
+ return flag;
+}
+inline int64_t GetQuicFlagImpl(int64_t flag) {
+ return flag;
+}
+inline uint64_t GetQuicFlagImpl(uint64_t flag) {
+ return flag;
+}
+inline double GetQuicFlagImpl(double flag) {
+ return flag;
+}
+inline std::string GetQuicFlagImpl(const std::string& flag) {
+ return flag;
+}
+
+inline void SetQuicFlagImpl(bool* f, bool v) {
+ *f = v;
+}
+inline void SetQuicFlagImpl(int32_t* f, int32_t v) {
+ *f = v;
+}
+inline void SetQuicFlagImpl(int64_t* f, int64_t v) {
+ *f = v;
+}
+inline void SetQuicFlagImpl(uint64_t* f, uint64_t v) {
+ *f = v;
+}
+inline void SetQuicFlagImpl(double* f, double v) {
+ *f = v;
+}
+inline void SetQuicFlagImpl(std::string* f, const std::string& v) {
+ *f = v;
+}
+
+} // namespace net
+
+#endif // NET_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
« 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