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

Side by Side Diff: components/data_use_measurement/core/data_use_user_data.h

Issue 1330443002: Report data usage UMA for Chrome services (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NewArchServices
Patch Set: Fix calling Init function in sync_client.cc Created 5 years, 3 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_ 5 #ifndef COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_ 6 #define COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/supports_user_data.h" 11 #include "base/supports_user_data.h"
12 12
13 namespace net { 13 namespace net {
14 class URLFetcher; 14 class URLFetcher;
15 } 15 }
16 16
17 namespace data_use_measurement { 17 namespace data_use_measurement {
18 18
19 // Used to annotate URLRequests with the service name if the URLRequest is used 19 // Used to annotate URLRequests with the service name if the URLRequest is used
20 // by a service. 20 // by a service.
21 class DataUseUserData : public base::SupportsUserData::Data { 21 class DataUseUserData : public base::SupportsUserData::Data {
22 public: 22 public:
23 // This enum should be synced with DataUseServices enum in histograms.xml. 23 // This enum should be synced with DataUseServices enum in histograms.xml.
24 // Please keep them synced after any updates. Also add service name to 24 // Please keep them synced after any updates. Also add service name to
25 // GetServiceNameAsString function. 25 // GetServiceNameAsString function.
26 enum ServiceName { 26 enum ServiceName {
27 NOT_TAGGED, 27 NOT_TAGGED,
28 SUGGESTIONS, 28 SUGGESTIONS,
29 TRANSLATE,
30 SYNC,
31 OMNIBOX,
32 INVALIDATION,
33 RAPPOR,
34 VARIATIONS,
35 UMA,
36 DOMAIN_RELIABILITY,
37 PROFILE_DOWNLOADER,
38 GOOGLE_URL_TRACKER,
39 AUTOFILL,
40 POLICY,
41 SPELL_CHECKER,
29 }; 42 };
30 43
31 explicit DataUseUserData(ServiceName service_name); 44 explicit DataUseUserData(ServiceName service_name);
32 ~DataUseUserData() override; 45 ~DataUseUserData() override;
33 46
34 // Helper function to create DataUseUserData. The caller takes the ownership 47 // Helper function to create DataUseUserData. The caller takes the ownership
35 // of the returned object. 48 // of the returned object.
36 static base::SupportsUserData::Data* Create( 49 static base::SupportsUserData::Data* Create(
37 DataUseUserData::ServiceName service); 50 DataUseUserData::ServiceName service);
38 51
(...skipping 12 matching lines...) Expand all
51 64
52 private: 65 private:
53 const ServiceName service_name_; 66 const ServiceName service_name_;
54 67
55 DISALLOW_COPY_AND_ASSIGN(DataUseUserData); 68 DISALLOW_COPY_AND_ASSIGN(DataUseUserData);
56 }; 69 };
57 70
58 } // data_use_measurement namespace 71 } // data_use_measurement namespace
59 72
60 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_ 73 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CORE_DATA_USE_USER_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698