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

Unified Diff: chrome/browser/net/traffic_annotation/network_traffic_annotation_checker.h

Issue 2866183003: Syntax and coverage checking added to Network Traffic Annotations. (Closed)
Patch Set: Protobuf build updated. Created 3 years, 7 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
Index: chrome/browser/net/traffic_annotation/network_traffic_annotation_checker.h
diff --git a/chrome/browser/net/traffic_annotation/network_traffic_annotation_checker.h b/chrome/browser/net/traffic_annotation/network_traffic_annotation_checker.h
new file mode 100644
index 0000000000000000000000000000000000000000..6a17816dad3d0d8f9307b92e278652cbf1f7c165
--- /dev/null
+++ b/chrome/browser/net/traffic_annotation/network_traffic_annotation_checker.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2017 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 CHROME_BROWSER_NET_TRAFFIC_ANNOTATION_NETWORK_TRAFFIC_ANNOTATION_CHECKER_H_
+#define CHROME_BROWSER_NET_TRAFFIC_ANNOTATION_NETWORK_TRAFFIC_ANNOTATION_CHECKER_H_
+
+#include <map>
+
+#include "net/traffic_annotation/network_traffic_annotation.h"
+
+class NetworkTrafficAnnotationChecker {
+ public:
+ NetworkTrafficAnnotationChecker();
+ ~NetworkTrafficAnnotationChecker();
+
+ void CheckAnnotation(
+ const net::NetworkTrafficAnnotationTag& traffic_annotation);
+
+ private:
+ std::map<const char*, const char*> visited_annotations_;
+};
+
+#endif // CHROME_BROWSER_NET_TRAFFIC_ANNOTATION_NETWORK_TRAFFIC_ANNOTATION_CHECKER_H_

Powered by Google App Engine
This is Rietveld 408576698