| 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_SERVICE_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 | 99 |
| 100 // Triggers the backend to load if it hasn't already, and then returns whether | 100 // Triggers the backend to load if it hasn't already, and then returns whether |
| 101 // it's finished loading. | 101 // it's finished loading. |
| 102 // Note: Virtual needed for mocking. | 102 // Note: Virtual needed for mocking. |
| 103 virtual bool BackendLoaded(); | 103 virtual bool BackendLoaded(); |
| 104 | 104 |
| 105 // Returns true if the backend has finished loading. | 105 // Returns true if the backend has finished loading. |
| 106 bool backend_loaded() const { return backend_loaded_; } | 106 bool backend_loaded() const { return backend_loaded_; } |
| 107 | 107 |
| 108 #if defined(OS_IOS) |
| 109 // Causes the history backend to commit any in-progress transactions. Called |
| 110 // when the application is being backgrounded. |
| 111 void HandleBackgrounding(); |
| 112 #endif |
| 113 |
| 108 // Context ids are used to scope page IDs (see AddPage). These contexts | 114 // Context ids are used to scope page IDs (see AddPage). These contexts |
| 109 // must tell us when they are being invalidated so that we can clear | 115 // must tell us when they are being invalidated so that we can clear |
| 110 // out any cached data associated with that context. | 116 // out any cached data associated with that context. |
| 111 void ClearCachedDataForContextID(ContextID context_id); | 117 void ClearCachedDataForContextID(ContextID context_id); |
| 112 | 118 |
| 113 // Triggers the backend to load if it hasn't already, and then returns the | 119 // Triggers the backend to load if it hasn't already, and then returns the |
| 114 // in-memory URL database. The returned pointer may be null if the in-memory | 120 // in-memory URL database. The returned pointer may be null if the in-memory |
| 115 // database has not been loaded yet. This pointer is owned by the history | 121 // database has not been loaded yet. This pointer is owned by the history |
| 116 // system. Callers should not store or cache this value. | 122 // system. Callers should not store or cache this value. |
| 117 // | 123 // |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 | 809 |
| 804 // All vended weak pointers are invalidated in Cleanup(). | 810 // All vended weak pointers are invalidated in Cleanup(). |
| 805 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 811 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 806 | 812 |
| 807 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 813 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 808 }; | 814 }; |
| 809 | 815 |
| 810 } // namespace history | 816 } // namespace history |
| 811 | 817 |
| 812 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 818 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |