| OLD | NEW |
| 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_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/callback_forward.h" | 14 #include "base/callback_forward.h" |
| 15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
| 16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 17 #include "base/task_runner.h" | 17 #include "base/task_runner.h" |
| 18 #include "chrome/browser/profiles/profile_statistics_common.h" | 18 #include "chrome/browser/profiles/profile_statistics_common.h" |
| 19 #include "components/bookmarks/browser/bookmark_model_observer.h" | 19 #include "components/bookmarks/browser/bookmark_model_observer.h" |
| 20 #include "components/history/core/browser/history_types.h" | 20 #include "components/history/core/browser/history_types.h" |
| 21 #include "components/password_manager/core/browser/password_store_consumer.h" | 21 #include "components/password_manager/core/browser/password_store_consumer.h" |
| 22 | 22 |
| 23 namespace bookmarks { | |
| 24 class BookMarkModel; | |
| 25 class BookMarkNode; | |
| 26 } | |
| 27 | |
| 28 class Profile; | 23 class Profile; |
| 29 | 24 |
| 30 class ProfileStatisticsAggregator | 25 class ProfileStatisticsAggregator |
| 31 : public base::RefCountedThreadSafe<ProfileStatisticsAggregator> { | 26 : public base::RefCountedThreadSafe<ProfileStatisticsAggregator> { |
| 32 // This class is used internally by GetProfileStatistics and | 27 // This class is used internally by GetProfileStatistics and |
| 33 // StoreProfileStatisticsToCache. | 28 // StoreProfileStatisticsToCache. |
| 34 // | 29 // |
| 35 // The class collects statistical information about the profile and returns | 30 // The class collects statistical information about the profile and returns |
| 36 // the information via a callback function. Currently bookmarks, history, | 31 // the information via a callback function. Currently bookmarks, history, |
| 37 // logins and preferences are counted. | 32 // logins and preferences are counted. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 // Bookmark counting | 150 // Bookmark counting |
| 156 std::unique_ptr<BookmarkModelHelper> bookmark_model_helper_; | 151 std::unique_ptr<BookmarkModelHelper> bookmark_model_helper_; |
| 157 | 152 |
| 158 // Password counting. | 153 // Password counting. |
| 159 PasswordStoreConsumerHelper password_store_consumer_helper_; | 154 PasswordStoreConsumerHelper password_store_consumer_helper_; |
| 160 | 155 |
| 161 DISALLOW_COPY_AND_ASSIGN(ProfileStatisticsAggregator); | 156 DISALLOW_COPY_AND_ASSIGN(ProfileStatisticsAggregator); |
| 162 }; | 157 }; |
| 163 | 158 |
| 164 #endif // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ | 159 #endif // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_AGGREGATOR_H_ |
| OLD | NEW |