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

Unified Diff: chrome/browser/net/data_use_user_data.h

Issue 1279543002: Support needed to measure user and service traffic in Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewHistogram
Patch Set: Fix few formatting issues. Created 5 years, 4 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/data_use_user_data.h
diff --git a/chrome/browser/net/data_use_user_data.h b/chrome/browser/net/data_use_user_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..7452901a18d8cf1758644e55a6876459f1fe785f
--- /dev/null
+++ b/chrome/browser/net/data_use_user_data.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2015 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_DATA_USE_USER_DATA_H_
+#define CHROME_BROWSER_NET_DATA_USE_USER_DATA_H_
+
+#include <string>
+
+#include "base/supports_user_data.h"
+
+// Used to annotate URLRequests with the service name if the URLRequest is used
+// by a service.
+class DataUseUserData : public base::SupportsUserData::Data {
+ public:
+ explicit DataUseUserData(std::string service_name);
+ ~DataUseUserData() override;
+
+ std::string service_name() const { return service_name_; }
+
+ static const void* kUserDataKey;
+
+ private:
+ std::string service_name_;
+};
+
+base::SupportsUserData::Data* CreateDataUseUserData(std::string service_name);
+#endif // CHROME_BROWSER_NET_DATA_USE_USER_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698