| 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..579bf1d708d82c9d6847503feb66c0099434e6d3 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,11 @@ class DataUseUserData : public base::SupportsUserData::Data {
|
| NTP_SNIPPETS,
|
| };
|
|
|
| - explicit DataUseUserData(ServiceName service_name);
|
| + // The state of the application. Only available on Android and on other
|
| + // platforms it is always FOREGROUND.
|
| + enum AppState { UNKNOWN, BACKGROUND, FOREGROUND };
|
| +
|
| + DataUseUserData(ServiceName service_name, AppState app_state);
|
| ~DataUseUserData() override;
|
|
|
| // Helper function to create DataUseUserData. The caller takes the ownership
|
| @@ -60,12 +64,17 @@ class DataUseUserData : public base::SupportsUserData::Data {
|
|
|
| ServiceName service_name() const { return service_name_; }
|
|
|
| + AppState app_state() const { return app_state_; }
|
| +
|
| // The key for retrieving back this type of user data.
|
| static const void* const kUserDataKey;
|
|
|
| private:
|
| const ServiceName service_name_;
|
|
|
| + // App state when the request started.
|
| + const AppState app_state_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(DataUseUserData);
|
| };
|
|
|
|
|