| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 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 CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_H_ | |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_H_ | |
| 7 | |
| 8 #include "base/files/file_path.h" | |
| 9 #include "base/memory/ref_counted.h" | |
| 10 | |
| 11 namespace base { | |
| 12 class FilePath; | |
| 13 } | |
| 14 | |
| 15 namespace quota { | |
| 16 class QuotaManagerProxy; | |
| 17 } | |
| 18 | |
| 19 namespace content { | |
| 20 | |
| 21 // This class manages metadata associated with all service workers, | |
| 22 // including: | |
| 23 // - persistent storage of pattern -> service worker scripts | |
| 24 // - initialization and initial installation of service workers | |
| 25 // - dispatching of non-fetch events to service workers | |
| 26 class ServiceWorkerContext | |
| 27 : public base::RefCountedThreadSafe<ServiceWorkerContext> { | |
| 28 public: | |
| 29 // This is owned by the StoragePartition, which will supply it with | |
| 30 // the local path on disk. | |
| 31 ServiceWorkerContext(const base::FilePath& path, | |
| 32 quota::QuotaManagerProxy* quota_manager_proxy); | |
| 33 | |
| 34 private: | |
| 35 friend class base::RefCountedThreadSafe<ServiceWorkerContext>; | |
| 36 ~ServiceWorkerContext(); | |
| 37 | |
| 38 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; | |
| 39 base::FilePath path_; | |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_H_ | |
| OLD | NEW |