Chromium Code Reviews| Index: components/data_use_measurement/core/data_use_user_data.h |
| diff --git a/components/data_use_measurement/core/data_use_user_data.h b/components/data_use_measurement/core/data_use_user_data.h |
| index 00d749c2a217db14dcb9210fc100afd8cc2ae75b..01135def13c35239ce0b9394853a11a37764ee8b 100644 |
| --- a/components/data_use_measurement/core/data_use_user_data.h |
| +++ b/components/data_use_measurement/core/data_use_user_data.h |
| @@ -42,7 +42,8 @@ class DataUseUserData : public base::SupportsUserData::Data { |
| NTP_SNIPPETS, |
| }; |
| - explicit DataUseUserData(ServiceName service_name); |
| + explicit DataUseUserData(ServiceName service_name, |
| + bool started_in_foreground); |
| ~DataUseUserData() override; |
| // Helper function to create DataUseUserData. The caller takes the ownership |
| @@ -60,12 +61,17 @@ class DataUseUserData : public base::SupportsUserData::Data { |
| ServiceName service_name() const { return service_name_; } |
| + bool started_in_foreground() const { return started_in_foreground_; } |
| + |
| // The key for retrieving back this type of user data. |
| static const void* const kUserDataKey; |
| private: |
| const ServiceName service_name_; |
| + // True if the url request started while the app was in foreground. |
|
bengr
2016/09/23 18:45:32
nit: url request -> request
nit: in -> in the
|
| + const bool started_in_foreground_; |
|
bengr
2016/09/23 18:45:31
I'd make this an enum with states FOREGROUND, BACK
Raj
2016/09/23 22:34:09
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(DataUseUserData); |
| }; |