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 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 const ArgB& b, | 851 const ArgB& b, |
852 const ArgC& c, | 852 const ArgC& c, |
853 const ArgD& d, | 853 const ArgD& d, |
854 const ArgE& e) { | 854 const ArgE& e) { |
855 DCHECK(thread_) << "History service being called after cleanup"; | 855 DCHECK(thread_) << "History service being called after cleanup"; |
856 DCHECK(thread_checker_.CalledOnValidThread()); | 856 DCHECK(thread_checker_.CalledOnValidThread()); |
857 ScheduleTask(priority, base::Bind(func, history_backend_.get(), | 857 ScheduleTask(priority, base::Bind(func, history_backend_.get(), |
858 a, b, c, d, e)); | 858 a, b, c, d, e)); |
859 } | 859 } |
860 | 860 |
861 // TODO(sdefresne): http://crbug.com/430070 remove this method. | |
862 Profile* profile() { return profile_; } | |
863 | |
864 base::ThreadChecker thread_checker_; | 861 base::ThreadChecker thread_checker_; |
865 | 862 |
866 content::NotificationRegistrar registrar_; | 863 content::NotificationRegistrar registrar_; |
867 | 864 |
868 // The thread used by the history service to run complicated operations. | 865 // The thread used by the history service to run complicated operations. |
869 // |thread_| is NULL once |Cleanup| is NULL. | 866 // |thread_| is NULL once |Cleanup| is NULL. |
870 base::Thread* thread_; | 867 base::Thread* thread_; |
871 | 868 |
872 // This class has most of the implementation and runs on the 'thread_'. | 869 // This class has most of the implementation and runs on the 'thread_'. |
873 // You MUST communicate with this class ONLY through the thread_'s | 870 // 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 | 910 |
914 history::DeleteDirectiveHandler delete_directive_handler_; | 911 history::DeleteDirectiveHandler delete_directive_handler_; |
915 | 912 |
916 // All vended weak pointers are invalidated in Cleanup(). | 913 // All vended weak pointers are invalidated in Cleanup(). |
917 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; | 914 base::WeakPtrFactory<HistoryService> weak_ptr_factory_; |
918 | 915 |
919 DISALLOW_COPY_AND_ASSIGN(HistoryService); | 916 DISALLOW_COPY_AND_ASSIGN(HistoryService); |
920 }; | 917 }; |
921 | 918 |
922 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ | 919 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ |
OLD | NEW |