OLD | NEW |
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_CONTEXT_WRAPPER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 virtual void DeleteForOrigin(const GURL& origin_url, | 91 virtual void DeleteForOrigin(const GURL& origin_url, |
92 const ResultCallback& done); | 92 const ResultCallback& done); |
93 | 93 |
94 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); | 94 void StartServiceWorker(const GURL& pattern, const StatusCallback& callback); |
95 void AddObserver(ServiceWorkerContextObserver* observer); | 95 void AddObserver(ServiceWorkerContextObserver* observer); |
96 void RemoveObserver(ServiceWorkerContextObserver* observer); | 96 void RemoveObserver(ServiceWorkerContextObserver* observer); |
97 | 97 |
98 bool is_incognito() const { return is_incognito_; } | 98 bool is_incognito() const { return is_incognito_; } |
99 | 99 |
100 private: | 100 private: |
| 101 friend class BackgroundSyncManagerTest; |
101 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; | 102 friend class base::RefCountedThreadSafe<ServiceWorkerContextWrapper>; |
102 friend class EmbeddedWorkerTestHelper; | 103 friend class EmbeddedWorkerTestHelper; |
103 friend class ServiceWorkerProcessManager; | 104 friend class ServiceWorkerProcessManager; |
104 friend class MockServiceWorkerContextWrapper; | 105 friend class MockServiceWorkerContextWrapper; |
105 | 106 |
106 ~ServiceWorkerContextWrapper() override; | 107 ~ServiceWorkerContextWrapper() override; |
107 | 108 |
108 void InitInternal( | 109 void InitInternal( |
109 const base::FilePath& user_data_directory, | 110 const base::FilePath& user_data_directory, |
110 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, | 111 scoped_ptr<ServiceWorkerDatabaseTaskManager> database_task_manager, |
(...skipping 23 matching lines...) Expand all Loading... |
134 // Initialized in Init(); true if the user data directory is empty. | 135 // Initialized in Init(); true if the user data directory is empty. |
135 bool is_incognito_; | 136 bool is_incognito_; |
136 | 137 |
137 // Raw pointer to the StoragePartitionImpl owning |this|. | 138 // Raw pointer to the StoragePartitionImpl owning |this|. |
138 StoragePartitionImpl* storage_partition_; | 139 StoragePartitionImpl* storage_partition_; |
139 }; | 140 }; |
140 | 141 |
141 } // namespace content | 142 } // namespace content |
142 | 143 |
143 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ | 144 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_WRAPPER_H_ |
OLD | NEW |