OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 // things go better then. Continue running but without reading or storing any | 446 // things go better then. Continue running but without reading or storing any |
447 // state into the HistoryBackend databases. Close all of the databases managed | 447 // state into the HistoryBackend databases. Close all of the databases managed |
448 // HistoryBackend as there are no provisions for accessing the other databases | 448 // HistoryBackend as there are no provisions for accessing the other databases |
449 // managed by HistoryBackend when the history database cannot be accessed. | 449 // managed by HistoryBackend when the history database cannot be accessed. |
450 void KillHistoryDatabase(); | 450 void KillHistoryDatabase(); |
451 | 451 |
452 // SupportsUserData ---------------------------------------------------------- | 452 // SupportsUserData ---------------------------------------------------------- |
453 | 453 |
454 // The user data allows the clients to associate data with this object. | 454 // The user data allows the clients to associate data with this object. |
455 // Multiple user data values can be stored under different keys. | 455 // Multiple user data values can be stored under different keys. |
456 // This object will TAKE OWNERSHIP of the given data pointer, and will | |
457 // delete the object if it is changed or the object is destroyed. | |
458 base::SupportsUserData::Data* GetUserData(const void* key) const; | 456 base::SupportsUserData::Data* GetUserData(const void* key) const; |
459 void SetUserData(const void* key, base::SupportsUserData::Data* data); | 457 void SetUserData(const void* key, |
| 458 std::unique_ptr<base::SupportsUserData::Data> data); |
460 | 459 |
461 // Testing ------------------------------------------------------------------- | 460 // Testing ------------------------------------------------------------------- |
462 | 461 |
463 // Sets the task to run and the message loop to run it on when this object | 462 // Sets the task to run and the message loop to run it on when this object |
464 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more | 463 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more |
465 // complete description. | 464 // complete description. |
466 void SetOnBackendDestroyTask( | 465 void SetOnBackendDestroyTask( |
467 scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 466 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
468 const base::Closure& task); | 467 const base::Closure& task); |
469 | 468 |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 // it unregisters itself as observer during destruction. | 919 // it unregisters itself as observer during destruction. |
921 std::unique_ptr<TypedUrlSyncableService> typed_url_syncable_service_; | 920 std::unique_ptr<TypedUrlSyncableService> typed_url_syncable_service_; |
922 std::unique_ptr<TypedURLSyncBridge> typed_url_sync_bridge_; | 921 std::unique_ptr<TypedURLSyncBridge> typed_url_sync_bridge_; |
923 | 922 |
924 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 923 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
925 }; | 924 }; |
926 | 925 |
927 } // namespace history | 926 } // namespace history |
928 | 927 |
929 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 928 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
OLD | NEW |