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

Side by Side Diff: chrome/browser/history/browsing_history_service.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BROWSING_HISTORY_SERVICE_H_ 5 #ifndef CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_
6 #define CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ 6 #define CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // Core implementation of history querying. 138 // Core implementation of history querying.
139 void QueryHistory(const base::string16& search_text, 139 void QueryHistory(const base::string16& search_text,
140 const history::QueryOptions& options); 140 const history::QueryOptions& options);
141 141
142 // Removes |items| from history. 142 // Removes |items| from history.
143 void RemoveVisits( 143 void RemoveVisits(
144 std::vector<std::unique_ptr<BrowsingHistoryService::HistoryEntry>>* 144 std::vector<std::unique_ptr<BrowsingHistoryService::HistoryEntry>>*
145 items); 145 items);
146 146
147 // SyncServiceObserver implementation. 147 // SyncServiceObserver implementation.
148 void OnStateChanged() override; 148 void OnStateChanged(syncer::SyncService* sync) override;
149 149
150 // Merges duplicate entries from the query results, only retaining the most 150 // Merges duplicate entries from the query results, only retaining the most
151 // recent visit to a URL on a particular day. That visit contains the 151 // recent visit to a URL on a particular day. That visit contains the
152 // timestamps of the other visits. 152 // timestamps of the other visits.
153 static void MergeDuplicateResults( 153 static void MergeDuplicateResults(
154 std::vector<BrowsingHistoryService::HistoryEntry>* results); 154 std::vector<BrowsingHistoryService::HistoryEntry>* results);
155 155
156 // Callback from the history system when a history query has completed. 156 // Callback from the history system when a history query has completed.
157 // Exposed for testing. 157 // Exposed for testing.
158 void QueryComplete(const base::string16& search_text, 158 void QueryComplete(const base::string16& search_text,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 252
253 // The clock used to vend times. 253 // The clock used to vend times.
254 std::unique_ptr<base::Clock> clock_; 254 std::unique_ptr<base::Clock> clock_;
255 255
256 base::WeakPtrFactory<BrowsingHistoryService> weak_factory_; 256 base::WeakPtrFactory<BrowsingHistoryService> weak_factory_;
257 257
258 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryService); 258 DISALLOW_COPY_AND_ASSIGN(BrowsingHistoryService);
259 }; 259 };
260 260
261 #endif // CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_ 261 #endif // CHROME_BROWSER_HISTORY_BROWSING_HISTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_pref_loader.cc ('k') | chrome/browser/history/browsing_history_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698