Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: content/browser/service_worker/service_worker_storage.h

Issue 142973003: Have a central operation status code for ServiceWorker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 13 matching lines...) Expand all
24 class ServiceWorkerRegistration; 24 class ServiceWorkerRegistration;
25 25
26 // This class provides an interface to load registration data and 26 // This class provides an interface to load registration data and
27 // instantiate ServiceWorkerRegistration objects. 27 // instantiate ServiceWorkerRegistration objects.
28 class CONTENT_EXPORT ServiceWorkerStorage { 28 class CONTENT_EXPORT ServiceWorkerStorage {
29 public: 29 public:
30 ServiceWorkerStorage(const base::FilePath& path, 30 ServiceWorkerStorage(const base::FilePath& path,
31 quota::QuotaManagerProxy* quota_manager_proxy); 31 quota::QuotaManagerProxy* quota_manager_proxy);
32 ~ServiceWorkerStorage(); 32 ~ServiceWorkerStorage();
33 33
34 // `found` is only valid if status == REGISTRATION_OK. 34 // `found` is only valid if status == SERVICE_WORKER_OK.
35 typedef base::Callback<void(bool found, 35 typedef base::Callback<void(bool found,
36 ServiceWorkerRegistrationStatus status, 36 ServiceWorkerStatusCode status,
37 const scoped_refptr<ServiceWorkerRegistration>& 37 const scoped_refptr<ServiceWorkerRegistration>&
38 registration)> FindRegistrationCallback; 38 registration)> FindRegistrationCallback;
39 39
40 void FindRegistrationForDocument(const GURL& document_url, 40 void FindRegistrationForDocument(const GURL& document_url,
41 const FindRegistrationCallback& callback); 41 const FindRegistrationCallback& callback);
42 void FindRegistrationForPattern(const GURL& pattern, 42 void FindRegistrationForPattern(const GURL& pattern,
43 const FindRegistrationCallback& callback); 43 const FindRegistrationCallback& callback);
44 44
45 // TODO(alecflett): These are temporary internal methods providing 45 // TODO(alecflett): These are temporary internal methods providing
46 // synchronous in-memory registration. Eventually these will be 46 // synchronous in-memory registration. Eventually these will be
(...skipping 17 matching lines...) Expand all
64 64
65 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; 65 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
66 base::FilePath path_; 66 base::FilePath path_;
67 67
68 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage); 68 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerStorage);
69 }; 69 };
70 70
71 } // namespace content 71 } // namespace content
72 72
73 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_ 73 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698