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

Unified Diff: chrome/browser/browsing_data/history_counter.h

Issue 2153863002: Move counters for passwords, history and autofill to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@separate_build_targets_in_components_bd
Patch Set: Addressed comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data/downloads_counter.cc ('k') | chrome/browser/browsing_data/history_counter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/history_counter.h
diff --git a/chrome/browser/browsing_data/history_counter.h b/chrome/browser/browsing_data/history_counter.h
deleted file mode 100644
index 1ce74cdc4824364ee24e13dd2976768be2ce14b3..0000000000000000000000000000000000000000
--- a/chrome/browser/browsing_data/history_counter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright (c) 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_BROWSING_DATA_HISTORY_COUNTER_H_
-#define CHROME_BROWSER_BROWSING_DATA_HISTORY_COUNTER_H_
-
-#include "base/memory/weak_ptr.h"
-#include "base/task/cancelable_task_tracker.h"
-#include "base/timer/timer.h"
-#include "components/browsing_data/core/counters/browsing_data_counter.h"
-#include "components/history/core/browser/history_service.h"
-#include "components/history/core/browser/web_history_service.h"
-#include "components/sync_driver/sync_service_observer.h"
-
-class Profile;
-
-class ProfileSyncService;
-
-class HistoryCounter : public browsing_data::BrowsingDataCounter,
- public sync_driver::SyncServiceObserver {
- public:
- class HistoryResult : public FinishedResult {
- public:
- HistoryResult(const HistoryCounter* source,
- ResultInt value,
- bool has_synced_visits);
- ~HistoryResult() override;
-
- bool has_synced_visits() const { return has_synced_visits_; }
-
- private:
- bool has_synced_visits_;
- };
-
- explicit HistoryCounter(Profile* profile);
- ~HistoryCounter() override;
-
- void OnInitialized() override;
-
- // Whether there are counting tasks in progress. Only used for testing.
- bool HasTrackedTasks();
-
- // Make the history counter use a custom WebHistoryService instance. Only
- // used for testing.
- void SetWebHistoryServiceForTesting(history::WebHistoryService* service);
-
- private:
- Profile* profile_;
-
- BrowsingDataCounter::ResultInt local_result_;
- bool has_synced_visits_;
-
- bool local_counting_finished_;
- bool web_counting_finished_;
-
- history::WebHistoryService* testing_web_history_service_;
-
- base::CancelableTaskTracker cancelable_task_tracker_;
- std::unique_ptr<history::WebHistoryService::Request> web_history_request_;
- base::OneShotTimer web_history_timeout_;
-
- base::ThreadChecker thread_checker_;
-
- ProfileSyncService* sync_service_;
- bool history_sync_enabled_;
-
- base::WeakPtrFactory<HistoryCounter> weak_ptr_factory_;
-
- void Count() override;
-
- void OnGetLocalHistoryCount(history::HistoryCountResult result);
- void OnGetWebHistoryCount(history::WebHistoryService::Request* request,
- const base::DictionaryValue* result);
- void OnWebHistoryTimeout();
- void MergeResults();
-
- // SyncServiceObserver implementation.
- void OnStateChanged() override;
-};
-
-#endif // CHROME_BROWSER_BROWSING_DATA_HISTORY_COUNTER_H_
« no previous file with comments | « chrome/browser/browsing_data/downloads_counter.cc ('k') | chrome/browser/browsing_data/history_counter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698