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

Side by Side Diff: components/data_use_measurement/content/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: Addressing reviewer's comments but the ones related to making component 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_USER_DATA_H_
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_USER_DATA_H_
7
8 #include "base/supports_user_data.h"
9
10 namespace data_use_measurement {
11 // Used to annotate URLRequests with the service name if the URLRequest is used
12 // by a service.
13 class DataUseUserData : public base::SupportsUserData::Data {
14 public:
15 // This enum should be synced with DataUseServices enum in histograms.xml.
16 // Please keep them synced after any updates.
17 enum ServiceType {
18 SUGGESTIONS,
19 };
20 explicit DataUseUserData(ServiceType service_type);
21 ~DataUseUserData() override;
22
23 ServiceType service_type() const { return service_type_; }
24
25 static const void* kUserDataKey;
26
27 private:
28 ServiceType service_type_;
29 };
30 base::SupportsUserData::Data* CreateDataUseUserData(
31 DataUseUserData::ServiceType service);
32
33 const char* ReturnServiceName(DataUseUserData::ServiceType service);
34 } // data_use_measurement namespace
35 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_USER_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698