Chromium Code Reviews| 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 23 matching lines...) Expand all Loading... | |
| 34 #include "components/history/core/browser/visit_tracker.h" | 34 #include "components/history/core/browser/visit_tracker.h" |
| 35 #include "sql/init_status.h" | 35 #include "sql/init_status.h" |
| 36 | 36 |
| 37 class HistoryURLProvider; | 37 class HistoryURLProvider; |
| 38 struct HistoryURLProviderParams; | 38 struct HistoryURLProviderParams; |
| 39 class SkBitmap; | 39 class SkBitmap; |
| 40 class TestingProfile; | 40 class TestingProfile; |
| 41 struct ThumbnailScore; | 41 struct ThumbnailScore; |
| 42 | 42 |
| 43 namespace base { | 43 namespace base { |
| 44 class MessageLoop; | 44 class MessageLoop; |
|
sdefresne
2016/10/13 17:25:35
I think you can remove this line.
fdoray
2016/10/13 18:30:27
Done.
| |
| 45 class SingleThreadTaskRunner; | 45 class SingleThreadTaskRunner; |
| 46 } | 46 } |
| 47 | 47 |
| 48 namespace history { | 48 namespace history { |
| 49 class CommitLaterTask; | 49 class CommitLaterTask; |
| 50 struct DownloadRow; | 50 struct DownloadRow; |
| 51 class HistoryBackendClient; | 51 class HistoryBackendClient; |
| 52 class HistoryBackendDBBaseTest; | 52 class HistoryBackendDBBaseTest; |
| 53 class HistoryBackendObserver; | 53 class HistoryBackendObserver; |
| 54 class HistoryBackendTest; | 54 class HistoryBackendTest; |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 450 // This object will TAKE OWNERSHIP of the given data pointer, and will | 450 // This object will TAKE OWNERSHIP of the given data pointer, and will |
| 451 // delete the object if it is changed or the object is destroyed. | 451 // delete the object if it is changed or the object is destroyed. |
| 452 base::SupportsUserData::Data* GetUserData(const void* key) const; | 452 base::SupportsUserData::Data* GetUserData(const void* key) const; |
| 453 void SetUserData(const void* key, base::SupportsUserData::Data* data); | 453 void SetUserData(const void* key, base::SupportsUserData::Data* data); |
| 454 | 454 |
| 455 // Testing ------------------------------------------------------------------- | 455 // Testing ------------------------------------------------------------------- |
| 456 | 456 |
| 457 // Sets the task to run and the message loop to run it on when this object | 457 // Sets the task to run and the message loop to run it on when this object |
| 458 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more | 458 // is destroyed. See HistoryService::SetOnBackendDestroyTask for a more |
| 459 // complete description. | 459 // complete description. |
| 460 void SetOnBackendDestroyTask(base::MessageLoop* message_loop, | 460 void SetOnBackendDestroyTask( |
| 461 const base::Closure& task); | 461 scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 462 const base::Closure& task); | |
| 462 | 463 |
| 463 // Adds the given rows to the database if it doesn't exist. A visit will be | 464 // Adds the given rows to the database if it doesn't exist. A visit will be |
| 464 // added for each given URL at the last visit time in the URLRow if the | 465 // added for each given URL at the last visit time in the URLRow if the |
| 465 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself). | 466 // passed visit type != SOURCE_SYNCED (the sync code manages visits itself). |
| 466 // Each visit will have the visit_source type set. | 467 // Each visit will have the visit_source type set. |
| 467 void AddPagesWithDetails(const URLRows& info, VisitSource visit_source); | 468 void AddPagesWithDetails(const URLRows& info, VisitSource visit_source); |
| 468 | 469 |
| 469 #if defined(UNIT_TEST) | 470 #if defined(UNIT_TEST) |
| 470 HistoryDatabase* db() const { return db_.get(); } | 471 HistoryDatabase* db() const { return db_.get(); } |
| 471 | 472 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 845 // | 846 // |
| 846 // As with AddPage, the last item in the redirect chain will be the | 847 // As with AddPage, the last item in the redirect chain will be the |
| 847 // destination of the redirect (i.e., the key into recent_redirects_); | 848 // destination of the redirect (i.e., the key into recent_redirects_); |
| 848 typedef base::MRUCache<GURL, RedirectList> RedirectCache; | 849 typedef base::MRUCache<GURL, RedirectList> RedirectCache; |
| 849 RedirectCache recent_redirects_; | 850 RedirectCache recent_redirects_; |
| 850 | 851 |
| 851 // Timestamp of the first entry in our database. | 852 // Timestamp of the first entry in our database. |
| 852 base::Time first_recorded_time_; | 853 base::Time first_recorded_time_; |
| 853 | 854 |
| 854 // When set, this is the task that should be invoked on destruction. | 855 // When set, this is the task that should be invoked on destruction. |
| 855 base::MessageLoop* backend_destroy_message_loop_; | 856 scoped_refptr<base::SingleThreadTaskRunner> backend_destroy_task_runner_; |
| 856 base::Closure backend_destroy_task_; | 857 base::Closure backend_destroy_task_; |
| 857 | 858 |
| 858 // Tracks page transition types. | 859 // Tracks page transition types. |
| 859 VisitTracker tracker_; | 860 VisitTracker tracker_; |
| 860 | 861 |
| 861 // A boolean variable to track whether we have already purged obsolete segment | 862 // A boolean variable to track whether we have already purged obsolete segment |
| 862 // data. | 863 // data. |
| 863 bool segment_queried_; | 864 bool segment_queried_; |
| 864 | 865 |
| 865 // List of QueuedHistoryDBTasks to run; | 866 // List of QueuedHistoryDBTasks to run; |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 892 | 893 |
| 893 // List of observers | 894 // List of observers |
| 894 base::ObserverList<HistoryBackendObserver> observers_; | 895 base::ObserverList<HistoryBackendObserver> observers_; |
| 895 | 896 |
| 896 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 897 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 897 }; | 898 }; |
| 898 | 899 |
| 899 } // namespace history | 900 } // namespace history |
| 900 | 901 |
| 901 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 902 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| OLD | NEW |