Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: chrome/browser/history/history_service.h

Issue 575993002: Fix WeakPtrFactory member ordering in chrome/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 const ArgB& b, 820 const ArgB& b,
821 const ArgC& c, 821 const ArgC& c,
822 const ArgD& d, 822 const ArgD& d,
823 const ArgE& e) { 823 const ArgE& e) {
824 DCHECK(thread_) << "History service being called after cleanup"; 824 DCHECK(thread_) << "History service being called after cleanup";
825 DCHECK(thread_checker_.CalledOnValidThread()); 825 DCHECK(thread_checker_.CalledOnValidThread());
826 ScheduleTask(priority, base::Bind(func, history_backend_.get(), 826 ScheduleTask(priority, base::Bind(func, history_backend_.get(),
827 a, b, c, d, e)); 827 a, b, c, d, e));
828 } 828 }
829 829
830 // All vended weak pointers are invalidated in Cleanup().
831 base::WeakPtrFactory<HistoryService> weak_ptr_factory_;
832
833 base::ThreadChecker thread_checker_; 830 base::ThreadChecker thread_checker_;
834 831
835 content::NotificationRegistrar registrar_; 832 content::NotificationRegistrar registrar_;
836 833
837 // The thread used by the history service to run complicated operations. 834 // The thread used by the history service to run complicated operations.
838 // |thread_| is NULL once |Cleanup| is NULL. 835 // |thread_| is NULL once |Cleanup| is NULL.
839 base::Thread* thread_; 836 base::Thread* thread_;
840 837
841 // This class has most of the implementation and runs on the 'thread_'. 838 // This class has most of the implementation and runs on the 'thread_'.
842 // You MUST communicate with this class ONLY through the thread_'s 839 // You MUST communicate with this class ONLY through the thread_'s
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 // See http://crbug.com/138321 873 // See http://crbug.com/138321
877 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_; 874 scoped_ptr<history::InMemoryURLIndex> in_memory_url_index_;
878 875
879 ObserverList<history::VisitDatabaseObserver> visit_database_observers_; 876 ObserverList<history::VisitDatabaseObserver> visit_database_observers_;
880 877
881 base::CallbackList<void(const std::set<GURL>&)> 878 base::CallbackList<void(const std::set<GURL>&)>
882 favicon_changed_callback_list_; 879 favicon_changed_callback_list_;
883 880
884 history::DeleteDirectiveHandler delete_directive_handler_; 881 history::DeleteDirectiveHandler delete_directive_handler_;
885 882
883 // All vended weak pointers are invalidated in Cleanup().
884 base::WeakPtrFactory<HistoryService> weak_ptr_factory_;
885
886 DISALLOW_COPY_AND_ASSIGN(HistoryService); 886 DISALLOW_COPY_AND_ASSIGN(HistoryService);
887 }; 887 };
888 888
889 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_ 889 #endif // CHROME_BROWSER_HISTORY_HISTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend.cc ('k') | chrome/browser/history/history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698