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

Side by Side Diff: components/data_use_measurement/content/data_use_user_data.cc

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, 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
(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 #include "components/data_use_measurement/content/data_use_user_data.h"
6
7 namespace data_use_measurement {
8 DataUseUserData::DataUseUserData(ServiceType service_type)
9 : service_type_(service_type) {}
10
11 DataUseUserData::~DataUseUserData() {}
12
13 // static
14 const void* DataUseUserData::kUserDataKey =
15 static_cast<const void*>(&DataUseUserData::kUserDataKey);
16
17 // Helper function to create DataUseUserData.
18 base::SupportsUserData::Data* CreateDataUseUserData(
19 DataUseUserData::ServiceType service_type) {
20 return new DataUseUserData(service_type);
21 }
22
23 const char* ReturnServiceName(DataUseUserData::ServiceType service_type) {
24 switch (service_type) {
25 case DataUseUserData::SUGGESTIONS:
26 return "Suggestions";
27 default:
28 break;
sclittle 2015/08/24 23:59:34 nit: Just put the NOTREACHED here under "default".
amohammadkhan 2015/08/25 00:12:07 Done.
29 }
30 NOTREACHED() << "Not known servie type in DataUseUserData";
sclittle 2015/08/24 23:59:34 nit: spelling "servie"
amohammadkhan 2015/08/25 00:12:07 Done.
31 return "INVALID";
32 }
33
34 } // data_use_measurement namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698