OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_H_ | |
6 #define CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_H_ | |
7 | |
8 #include <string> | |
9 #include <utility> | |
10 #include <vector> | |
11 #include "base/task/cancelable_task_tracker.h" | |
12 #include "chrome/browser/profiles/profile.h" | |
13 | |
14 namespace profiles { | |
15 | |
16 // Definition of the return value of |ProfileStatisticsCallback|. | |
17 // The data stored in |ProfileStatisticsValues| looks like this: | |
18 // <"Browsing History", 912>, <"Passwords", 71>, <"Bookmarks", 120>, | |
19 // <"Settings", 200> | |
20 typedef std::vector<std::pair<std::string, int> > ProfileStatisticsValues; | |
21 | |
22 // Definition of the callback function. Note that a copy of | |
23 // |ProfileStatisticsValues| is made each time the callback is called. | |
24 typedef base::Callback<void(ProfileStatisticsValues)> | |
25 ProfileStatisticsCallback; | |
26 | |
27 // This fucntion collects statistical information about |profile| and returns | |
Mike Lerman
2015/08/05 19:26:09
nit: spelling (fucntion/function)
lwchkg
2015/08/06 04:32:59
Acknowledged.
| |
28 // the information via |callback|. Currently bookmarks, history, logins and | |
29 // preferences are counted. The callback function may be called more than once. | |
Mike Lerman
2015/08/05 19:26:09
I'd replace "may" with "will probably", before "be
lwchkg
2015/08/06 04:32:59
Acknowledged.
| |
30 void GetProfileStatistics(Profile* profile, | |
31 const ProfileStatisticsCallback& callback, | |
32 base::CancelableTaskTracker* tracker); | |
33 | |
34 } // namespace profiles | |
35 | |
36 #endif // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_H_ | |
OLD | NEW |