OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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_ | |
sclittle
2015/08/21 23:55:34
This file and it's .cc file should be in "data_use
amohammadkhan
2015/08/26 22:28:40
Done.
| |
6 #define COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_USER_DATA_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "base/supports_user_data.h" | |
11 | |
12 namespace data_use_measurement { | |
13 // Used to annotate URLRequests with the service name if the URLRequest is used | |
14 // by a service. | |
15 class DataUseUserData : public base::SupportsUserData::Data { | |
16 public: | |
17 explicit DataUseUserData(std::string service_name); | |
18 ~DataUseUserData() override; | |
19 | |
20 std::string service_name() const { return service_name_; } | |
21 | |
22 static const void* kUserDataKey; | |
23 | |
24 private: | |
25 std::string service_name_; | |
sclittle
2015/08/21 23:55:34
Instead of holding a string, could you create an e
amohammadkhan
2015/08/24 23:18:47
You are right. We had a problem about a good place
| |
26 }; | |
27 base::SupportsUserData::Data* CreateDataUseUserData(std::string service_name); | |
28 } // data_use_measurement namespace | |
29 #endif // COMPONENTS_DATA_USE_MEASUREMENT_CONTENT_DATA_USE_USER_DATA_H_ | |
OLD | NEW |