| Index: content/browser/background_fetch/background_fetch_job_controller.h
|
| diff --git a/content/browser/background_fetch/background_fetch_job_controller.h b/content/browser/background_fetch/background_fetch_job_controller.h
|
| index 5d4fdcc7f006abfde28b6c958df77fa485ed549b..eac97eff46b74f0a2de7a7463b1ba2169c1741b6 100644
|
| --- a/content/browser/background_fetch/background_fetch_job_controller.h
|
| +++ b/content/browser/background_fetch/background_fetch_job_controller.h
|
| @@ -30,9 +30,10 @@ class StoragePartition;
|
| class CONTENT_EXPORT BackgroundFetchJobController
|
| : public DownloadItem::Observer {
|
| public:
|
| + enum class State { INITIALIZED, FETCHING, ABORTED, COMPLETED };
|
| +
|
| using CompletedCallback =
|
| - base::OnceCallback<void(const BackgroundFetchRegistrationId&,
|
| - bool /* aborted_by_developer */)>;
|
| + base::OnceCallback<void(BackgroundFetchJobController*)>;
|
|
|
| BackgroundFetchJobController(
|
| const BackgroundFetchRegistrationId& registration_id,
|
| @@ -57,6 +58,9 @@ class CONTENT_EXPORT BackgroundFetchJobController
|
| // Called by the BackgroundFetchContext when the system is shutting down.
|
| void Shutdown();
|
|
|
| + // Returns the current state of this Job Controller.
|
| + State state() const { return state_; }
|
| +
|
| // Returns the registration id for which this job is fetching data.
|
| const BackgroundFetchRegistrationId& registration_id() const {
|
| return registration_id_;
|
| @@ -84,6 +88,9 @@ class CONTENT_EXPORT BackgroundFetchJobController
|
| // Options for the represented background fetch registration.
|
| BackgroundFetchOptions options_;
|
|
|
| + // The current state of this Job Controller.
|
| + State state_ = State::INITIALIZED;
|
| +
|
| // TODO(peter): Deprecated, remove in favor of |registration_id|.
|
| std::string job_guid_;
|
|
|
|
|