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 CHROME_BROWSER_NET_DATA_USE_USER_DATA_H_ |
| 6 #define CHROME_BROWSER_NET_DATA_USE_USER_DATA_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/supports_user_data.h" |
| 11 |
| 12 // Used to annotate URLRequests with the service name if the URLRequest is used |
| 13 // by a service. |
| 14 class DataUseUserData : public base::SupportsUserData::Data { |
| 15 public: |
| 16 explicit DataUseUserData(std::string service_name); |
| 17 ~DataUseUserData() override; |
| 18 |
| 19 std::string service_name() const { return service_name_; } |
| 20 |
| 21 static const void* kUserDataKey; |
| 22 |
| 23 private: |
| 24 std::string service_name_; |
| 25 }; |
| 26 |
| 27 base::SupportsUserData::Data* CreateDataUseUserData(std::string service_name); |
| 28 #endif // CHROME_BROWSER_NET_DATA_USE_USER_DATA_H_ |
OLD | NEW |