| 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 CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 6 #define CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class PageUsageRequest; | 46 class PageUsageRequest; |
| 47 class Profile; | 47 class Profile; |
| 48 struct ImportedFaviconUsage; | 48 struct ImportedFaviconUsage; |
| 49 class SkBitmap; | 49 class SkBitmap; |
| 50 | 50 |
| 51 namespace base { | 51 namespace base { |
| 52 class FilePath; | 52 class FilePath; |
| 53 class Thread; | 53 class Thread; |
| 54 } | 54 } |
| 55 | 55 |
| 56 namespace safe_browsing { | |
| 57 class LastDownloadFinder; | |
| 58 } | |
| 59 | |
| 60 namespace visitedlink { | 56 namespace visitedlink { |
| 61 class VisitedLinkMaster; | 57 class VisitedLinkMaster; |
| 62 } | 58 } |
| 63 | 59 |
| 64 namespace history { | 60 namespace history { |
| 65 | 61 |
| 66 class HistoryBackend; | 62 class HistoryBackend; |
| 67 class HistoryClient; | 63 class HistoryClient; |
| 68 class HistoryDatabase; | 64 class HistoryDatabase; |
| 69 class HistoryDBTask; | 65 class HistoryDBTask; |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 friend class FaviconService; | 532 friend class FaviconService; |
| 537 friend class history::HistoryBackend; | 533 friend class history::HistoryBackend; |
| 538 friend class history::HistoryQueryTest; | 534 friend class history::HistoryQueryTest; |
| 539 friend class HistoryOperation; | 535 friend class HistoryOperation; |
| 540 friend class HistoryQuickProviderTest; | 536 friend class HistoryQuickProviderTest; |
| 541 friend class history::HistoryTest; | 537 friend class history::HistoryTest; |
| 542 friend class HistoryURLProvider; | 538 friend class HistoryURLProvider; |
| 543 friend class HistoryURLProviderTest; | 539 friend class HistoryURLProviderTest; |
| 544 friend class history::InMemoryURLIndexTest; | 540 friend class history::InMemoryURLIndexTest; |
| 545 template<typename Info, typename Callback> friend class DownloadRequest; | 541 template<typename Info, typename Callback> friend class DownloadRequest; |
| 546 friend class safe_browsing::LastDownloadFinder; | |
| 547 friend class PageUsageRequest; | 542 friend class PageUsageRequest; |
| 548 friend class RedirectRequest; | 543 friend class RedirectRequest; |
| 549 friend class SyncBookmarkDataTypeControllerTest; | 544 friend class SyncBookmarkDataTypeControllerTest; |
| 550 friend class TestingProfile; | 545 friend class TestingProfile; |
| 551 | 546 |
| 552 // Called on shutdown, this will tell the history backend to complete and | 547 // Called on shutdown, this will tell the history backend to complete and |
| 553 // will release pointers to it. No other functions should be called once | 548 // will release pointers to it. No other functions should be called once |
| 554 // cleanup has happened that may dispatch to the history thread (because it | 549 // cleanup has happened that may dispatch to the history thread (because it |
| 555 // will be NULL). | 550 // will be NULL). |
| 556 // | 551 // |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 const ArgB& b, | 846 const ArgB& b, |
| 852 const ArgC& c, | 847 const ArgC& c, |
| 853 const ArgD& d, | 848 const ArgD& d, |
| 854 const ArgE& e) { | 849 const ArgE& e) { |
| 855 DCHECK(thread_) << "History service being called after cleanup"; | 850 DCHECK(thread_) << "History service being called after cleanup"; |
| 856 DCHECK(thread_checker_.CalledOnValidThread()); | 851 DCHECK(thread_checker_.CalledOnValidThread()); |
| 857 ScheduleTask(priority, base::Bind(func, history_backend_.get(), | 852 ScheduleTask(priority, base::Bind(func, history_backend_.get(), |
| 858 a, b, c, d, e)); | 853 a, b, c, d, e)); |
| 859 } | 854 } |
| 860 | 855 |
| 861 // TODO(sdefresne): http://crbug.com/430070 remove this method. | |
| 862 Profile* profile() { return profile_; } | |
| 863 | |
| 864 base::ThreadChecker thread_checker_; | 856 base::ThreadChecker thread_checker_; |
| 865 | 857 |
| 866 content::NotificationRegistrar registrar_; | 858 content::NotificationRegistrar registrar_; |
| 867 | 859 |
| 868 // The thread used by the history service to run complicated operations. | 860 // The thread used by the history service to run complicated operations. |
| 869 // |thread_| is NULL once |Cleanup| is NULL. | 861 // |thread_| is NULL once |Cleanup| is NULL. |
| 870 base::Thread* thread_; | 862 base::Thread* thread_; |
| 871 | 863 |
| 872 // This class has most of the implementation and runs on the 'thread_'. | 864 // This class has most of the implementation and runs on the 'thread_'. |
| 873 // You MUST communicate with this class ONLY through the thread_'s | 865 // You MUST communicate with this class ONLY through the thread_'s |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 | 905 |
| 914 history::DeleteDirectiveHandler delete_directive_handler_; | 906 history::DeleteDirectiveHandler delete_directive_handler_; |
| 915 | 907 |
| 916 // All vended weak pointers are invalidated in Cleanup(). | 908 // All vended weak pointers are invalidated in Cleanup(). |
| 917 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 909 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
| 918 | 910 |
| 919 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 911 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
| 920 }; | 912 }; |
| 921 | 913 |
| 922 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 914 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
| OLD | NEW |