OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_DATABASE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // Writes a batch into the database. | 273 // Writes a batch into the database. |
274 // NOTE: You must call this when you want to put something into the database | 274 // NOTE: You must call this when you want to put something into the database |
275 // because this initializes the database if needed. | 275 // because this initializes the database if needed. |
276 Status WriteBatch(leveldb::WriteBatch* batch); | 276 Status WriteBatch(leveldb::WriteBatch* batch); |
277 | 277 |
278 // Bumps the next available id if |used_id| is greater than or equal to the | 278 // Bumps the next available id if |used_id| is greater than or equal to the |
279 // cached one. | 279 // cached one. |
280 void BumpNextRegistrationIdIfNeeded( | 280 void BumpNextRegistrationIdIfNeeded( |
281 int64 used_id, | 281 int64 used_id, |
282 leveldb::WriteBatch* batch); | 282 leveldb::WriteBatch* batch); |
| 283 void BumpNextResourceIdIfNeeded( |
| 284 int64 used_id, |
| 285 leveldb::WriteBatch* batch); |
283 void BumpNextVersionIdIfNeeded( | 286 void BumpNextVersionIdIfNeeded( |
284 int64 used_id, | 287 int64 used_id, |
285 leveldb::WriteBatch* batch); | 288 leveldb::WriteBatch* batch); |
286 | 289 |
287 bool IsOpen(); | 290 bool IsOpen(); |
288 | 291 |
289 void Disable( | 292 void Disable( |
290 const tracked_objects::Location& from_here, | 293 const tracked_objects::Location& from_here, |
291 Status status); | 294 Status status); |
292 void HandleOpenResult( | 295 void HandleOpenResult( |
(...skipping 28 matching lines...) Expand all Loading... |
321 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); | 324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); |
322 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); | 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); |
323 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); | 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); |
324 | 327 |
325 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); | 328 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); |
326 }; | 329 }; |
327 | 330 |
328 } // namespace content | 331 } // namespace content |
329 | 332 |
330 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 333 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
OLD | NEW |