OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 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_FETCH_STORE_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_STORE_H_ |
| 7 |
| 8 #include "base/files/file_path.h" |
| 9 |
| 10 namespace content { |
| 11 |
| 12 // TODO(jkarlin): Fill this in with a real FetchStore implementation as |
| 13 // specified in |
| 14 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html. |
| 15 class ServiceWorkerFetchStore { |
| 16 public: |
| 17 static ServiceWorkerFetchStore* CreateMemoryStore(const std::string& name); |
| 18 static ServiceWorkerFetchStore* CreatePersistentStore( |
| 19 const base::FilePath& path, |
| 20 const std::string& name); |
| 21 virtual ~ServiceWorkerFetchStore(); |
| 22 |
| 23 void set_name(const std::string& name) { name_ = name; } |
| 24 const std::string& name() const { return name_; } |
| 25 int32 id() const { return id_; } |
| 26 void set_id(int32 id) { id_ = id; } |
| 27 |
| 28 private: |
| 29 ServiceWorkerFetchStore(const base::FilePath& path, const std::string& name); |
| 30 |
| 31 base::FilePath path_; |
| 32 std::string name_; |
| 33 int32 id_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerFetchStore); |
| 36 }; |
| 37 |
| 38 } // namespace content |
| 39 |
| 40 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_FETCH_STORE_H_ |
OLD | NEW |