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

Side by Side Diff: components/browsing_data/core/counters/history_counter.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_ 5 #ifndef COMPONENTS_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_
6 #define COMPONENTS_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_ 6 #define COMPONENTS_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/task/cancelable_task_tracker.h" 10 #include "base/task/cancelable_task_tracker.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 private: 51 private:
52 void Count() override; 52 void Count() override;
53 53
54 void OnGetLocalHistoryCount(history::HistoryCountResult result); 54 void OnGetLocalHistoryCount(history::HistoryCountResult result);
55 void OnGetWebHistoryCount(history::WebHistoryService::Request* request, 55 void OnGetWebHistoryCount(history::WebHistoryService::Request* request,
56 const base::DictionaryValue* result); 56 const base::DictionaryValue* result);
57 void OnWebHistoryTimeout(); 57 void OnWebHistoryTimeout();
58 void MergeResults(); 58 void MergeResults();
59 59
60 // SyncServiceObserver implementation. 60 // SyncServiceObserver implementation.
61 void OnStateChanged() override; 61 void OnStateChanged(syncer::SyncService* sync) override;
62 62
63 history::HistoryService* history_service_; 63 history::HistoryService* history_service_;
64 64
65 GetUpdatedWebHistoryServiceCallback web_history_service_callback_; 65 GetUpdatedWebHistoryServiceCallback web_history_service_callback_;
66 66
67 syncer::SyncService* sync_service_; 67 syncer::SyncService* sync_service_;
68 68
69 bool has_synced_visits_; 69 bool has_synced_visits_;
70 70
71 bool local_counting_finished_; 71 bool local_counting_finished_;
72 bool web_counting_finished_; 72 bool web_counting_finished_;
73 73
74 base::CancelableTaskTracker cancelable_task_tracker_; 74 base::CancelableTaskTracker cancelable_task_tracker_;
75 std::unique_ptr<history::WebHistoryService::Request> web_history_request_; 75 std::unique_ptr<history::WebHistoryService::Request> web_history_request_;
76 base::OneShotTimer web_history_timeout_; 76 base::OneShotTimer web_history_timeout_;
77 77
78 base::ThreadChecker thread_checker_; 78 base::ThreadChecker thread_checker_;
79 79
80 BrowsingDataCounter::ResultInt local_result_; 80 BrowsingDataCounter::ResultInt local_result_;
81 81
82 bool history_sync_enabled_; 82 bool history_sync_enabled_;
83 83
84 base::WeakPtrFactory<HistoryCounter> weak_ptr_factory_; 84 base::WeakPtrFactory<HistoryCounter> weak_ptr_factory_;
85 }; 85 };
86 86
87 } // namespace browsing_data 87 } // namespace browsing_data
88 88
89 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_ 89 #endif // COMPONENTS_BROWSING_DATA_CORE_COUNTERS_HISTORY_COUNTER_H_
OLDNEW
« no previous file with comments | « components/browser_sync/profile_sync_service_unittest.cc ('k') | components/browsing_data/core/counters/history_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698