| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "base/strings/string16.h" | 26 #include "base/strings/string16.h" |
| 27 #include "base/task/cancelable_task_tracker.h" | 27 #include "base/task/cancelable_task_tracker.h" |
| 28 #include "base/threading/thread_checker.h" | 28 #include "base/threading/thread_checker.h" |
| 29 #include "base/time/time.h" | 29 #include "base/time/time.h" |
| 30 #include "build/build_config.h" | 30 #include "build/build_config.h" |
| 31 #include "components/favicon_base/favicon_callback.h" | 31 #include "components/favicon_base/favicon_callback.h" |
| 32 #include "components/favicon_base/favicon_usage_data.h" | 32 #include "components/favicon_base/favicon_usage_data.h" |
| 33 #include "components/history/core/browser/delete_directive_handler.h" | 33 #include "components/history/core/browser/delete_directive_handler.h" |
| 34 #include "components/history/core/browser/history_types.h" | 34 #include "components/history/core/browser/history_types.h" |
| 35 #include "components/history/core/browser/keyword_id.h" | 35 #include "components/history/core/browser/keyword_id.h" |
| 36 #include "components/history/core/browser/typed_url_sync_bridge.h" |
| 36 #include "components/history/core/browser/typed_url_syncable_service.h" | 37 #include "components/history/core/browser/typed_url_syncable_service.h" |
| 37 #include "components/keyed_service/core/keyed_service.h" | 38 #include "components/keyed_service/core/keyed_service.h" |
| 38 #include "components/sync/model/syncable_service.h" | 39 #include "components/sync/model/syncable_service.h" |
| 39 #include "sql/init_status.h" | 40 #include "sql/init_status.h" |
| 40 #include "ui/base/page_transition_types.h" | 41 #include "ui/base/page_transition_types.h" |
| 41 | 42 |
| 42 class GURL; | 43 class GURL; |
| 43 class HistoryQuickProviderTest; | 44 class HistoryQuickProviderTest; |
| 44 class HistoryURLProvider; | 45 class HistoryURLProvider; |
| 45 class InMemoryURLIndexTest; | 46 class InMemoryURLIndexTest; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // database has not been loaded yet. This pointer is owned by the history | 123 // database has not been loaded yet. This pointer is owned by the history |
| 123 // system. Callers should not store or cache this value. | 124 // system. Callers should not store or cache this value. |
| 124 // | 125 // |
| 125 // TODO(brettw) this should return the InMemoryHistoryBackend. | 126 // TODO(brettw) this should return the InMemoryHistoryBackend. |
| 126 URLDatabase* InMemoryDatabase(); | 127 URLDatabase* InMemoryDatabase(); |
| 127 | 128 |
| 128 // Following functions get URL information from in-memory database. | 129 // Following functions get URL information from in-memory database. |
| 129 // They return false if database is not available (e.g. not loaded yet) or the | 130 // They return false if database is not available (e.g. not loaded yet) or the |
| 130 // URL does not exist. | 131 // URL does not exist. |
| 131 | 132 |
| 133 // Returns a pointer to the TypedURLSyncBridge owned by HistoryBackend. |
| 134 // This method should only be called from the history thread, because the |
| 135 // returned bridge is intended to be accessed only via the history thread. |
| 136 TypedURLSyncBridge* GetTypedURLSyncBridge() const; |
| 137 |
| 132 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. | 138 // Returns a pointer to the TypedUrlSyncableService owned by HistoryBackend. |
| 133 // This method should only be called from the history thread, because the | 139 // This method should only be called from the history thread, because the |
| 134 // returned service is intended to be accessed only via the history thread. | 140 // returned service is intended to be accessed only via the history thread. |
| 135 TypedUrlSyncableService* GetTypedUrlSyncableService() const; | 141 TypedUrlSyncableService* GetTypedUrlSyncableService() const; |
| 136 | 142 |
| 137 // KeyedService: | 143 // KeyedService: |
| 138 void Shutdown() override; | 144 void Shutdown() override; |
| 139 | 145 |
| 140 // Callback for value asynchronously returned by | 146 // Callback for value asynchronously returned by |
| 141 // GetCountsAndLastVisitForOrigins(). | 147 // GetCountsAndLastVisitForOrigins(). |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 | 842 |
| 837 // All vended weak pointers are invalidated in Cleanup(). | 843 // All vended weak pointers are invalidated in Cleanup(). |
| 838 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 844 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 839 | 845 |
| 840 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 846 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 841 }; | 847 }; |
| 842 | 848 |
| 843 } // namespace history | 849 } // namespace history |
| 844 | 850 |
| 845 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ | 851 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_SERVICE_H_ |
| OLD | NEW |