Chromium Code Reviews| Index: content/browser/background_fetch/background_fetch_context.h |
| diff --git a/content/browser/background_fetch/background_fetch_context.h b/content/browser/background_fetch/background_fetch_context.h |
| index 41c9e7fd739a5f00c4b8e7e99f540f94458749ea..48ef9625d00fc7d8c1da99052a75ece70aaf0120 100644 |
| --- a/content/browser/background_fetch/background_fetch_context.h |
| +++ b/content/browser/background_fetch/background_fetch_context.h |
| @@ -11,6 +11,7 @@ |
| #include "base/macros.h" |
| #include "base/memory/ref_counted.h" |
| #include "content/common/content_export.h" |
| +#include "content/public/browser/background_fetch_delegate.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "third_party/WebKit/public/platform/modules/background_fetch/background_fetch.mojom.h" |
| @@ -30,7 +31,8 @@ class StoragePartitionImpl; |
| // Background Fetch requests function similar to normal fetches except that |
| // they are persistent across Chromium or service worker shutdown. |
| class CONTENT_EXPORT BackgroundFetchContext |
| - : public base::RefCountedThreadSafe<BackgroundFetchContext, |
| + : public BackgroundFetchDelegate, |
| + public base::RefCountedThreadSafe<BackgroundFetchContext, |
| BrowserThread::DeleteOnUIThread> { |
| public: |
| // The BackgroundFetchContext will watch the ServiceWorkerContextWrapper so |
| @@ -52,13 +54,18 @@ class CONTENT_EXPORT BackgroundFetchContext |
| const BackgroundFetchOptions& options, |
| const blink::mojom::BackgroundFetchService::FetchCallback& callback); |
| + // BackgroundFetchDelegate method overrides; |
|
Peter Beverloo
2017/03/29 14:32:12
nit: s/method overrides;/implementation:/
(They'r
harkness
2017/03/30 12:42:35
Done.
|
| + void CancelDownload(const std::string& id) override; |
| + void PauseDownload(const std::string& id) override; |
| + void ResumeDownload(const std::string& id) override; |
|
Peter Beverloo
2017/03/29 14:32:12
nit: could we s/id/serialized_registration_id/ to
harkness
2017/03/30 12:42:35
Done.
|
| + |
| private: |
| friend class base::DeleteHelper<BackgroundFetchContext>; |
| friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; |
| friend class base::RefCountedThreadSafe<BackgroundFetchContext, |
| BrowserThread::DeleteOnUIThread>; |
| - ~BackgroundFetchContext(); |
| + ~BackgroundFetchContext() override; |
| // Shuts down the active Job Controllers on the IO thread. |
| void ShutdownOnIO(); |