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

Unified Diff: components/data_use_measurement/content/chrome_url_request_classifier.h

Issue 2462983003: Move data use measurement to DataUseNetworkDelegate (Closed)
Patch Set: Addressed comments 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 side-by-side diff with in-line comments
Download patch
Index: components/data_use_measurement/content/chrome_url_request_classifier.h
diff --git a/components/data_use_measurement/content/chrome_url_request_classifier.h b/components/data_use_measurement/content/chrome_url_request_classifier.h
new file mode 100644
index 0000000000000000000000000000000000000000..771f3d9053c921b9d2a0977c5e9dadef613a6aa1
--- /dev/null
+++ b/components/data_use_measurement/content/chrome_url_request_classifier.h
@@ -0,0 +1,26 @@
+// Copyright 2016 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 COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_CHROME_URL_REQUEST_CLASSIFIER_H_
+#define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_CHROME_URL_REQUEST_CLASSIFIER_H_
+
+#include "components/data_use_measurement/core/url_request_classifier.h"
+
+namespace net {
+class URLRequest;
+}
+
+namespace data_use_measurement {
+
+// Returns true if the URLRequest |request| is initiated by user traffic.
+bool IsUserInitiatedRequest(const net::URLRequest& request);
+
+class ChromeURLRequestClassifier : public URLRequestClassifier {
RyanSturm 2016/11/10 22:50:30 s/ChromeURLRequestClassifier/ContentURLRequestClas
Raj 2016/11/10 23:20:26 Done.
+ public:
+ bool IsUserInitiatedRequest(const net::URLRequest& request) const override;
+};
+
+} // namespace data_use_measurement
+
+#endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_CHROME_URL_REQUEST_CLASSIFIER_H_

Powered by Google App Engine
This is Rietveld 408576698