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

Side by Side Diff: components/ukm/observers/history_delete_observer.cc

Issue 2567263003: Basic UkmService implementation (Closed)
Patch Set: Rebase Created 3 years, 11 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/ukm/observers/history_delete_observer.h"
6
7 #include "components/history/core/browser/history_service.h"
8
9 namespace ukm {
10
11 HistoryDeleteObserver::HistoryDeleteObserver() : history_observer_(this) {}
12
13 HistoryDeleteObserver::~HistoryDeleteObserver() {}
14
15 void HistoryDeleteObserver::ObserveServiceForDeletions(
16 history::HistoryService* history_service) {
17 if (history_service) {
18 history_observer_.Add(history_service);
19 }
20 }
21
22 void HistoryDeleteObserver::OnURLsDeleted(
23 history::HistoryService* history_service,
24 bool all_history,
25 bool expired,
26 const history::URLRows& deleted_rows,
27 const std::set<GURL>& favicon_urls) {
28 if (!expired)
29 OnHistoryDeleted();
30 }
31
32 void HistoryDeleteObserver::HistoryServiceBeingDeleted(
33 history::HistoryService* history_service) {
34 history_observer_.Remove(history_service);
35 }
36
37 } // namespace ukm
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698