| 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 // Constants for the categories in ProfileStatisticsValues | 
|  | 17 extern const char kProfileStatisticsBrowsingHistory[]; | 
|  | 18 extern const char kProfileStatisticsPasswords[]; | 
|  | 19 extern const char kProfileStatisticsBookmarks[]; | 
|  | 20 extern const char kProfileStatisticsSettings[]; | 
|  | 21 | 
|  | 22 // Definition of the return value of |ProfileStatisticsCallback|. | 
|  | 23 // The data stored in |ProfileStatisticsValues| looks like this: | 
|  | 24 // <"Browsing History", 912>, <"Passwords", 71>, <"Bookmarks", 120>, | 
|  | 25 // <"Settings", 200> | 
|  | 26 typedef std::vector<std::pair<std::string, int> > ProfileStatisticsValues; | 
|  | 27 | 
|  | 28 // Definition of the callback function. Note that a copy of | 
|  | 29 // |ProfileStatisticsValues| is made each time the callback is called. | 
|  | 30 typedef base::Callback<void(ProfileStatisticsValues)> | 
|  | 31     ProfileStatisticsCallback; | 
|  | 32 | 
|  | 33 // This function collects statistical information about |profile| and returns | 
|  | 34 // the information via |callback|. Currently bookmarks, history, logins and | 
|  | 35 // preferences are counted. The callback function will probably be called more | 
|  | 36 // than once so binding parameters with bind::Passed() is prohibited. | 
|  | 37 void GetProfileStatistics(Profile* profile, | 
|  | 38                           const ProfileStatisticsCallback& callback, | 
|  | 39                           base::CancelableTaskTracker* tracker); | 
|  | 40 | 
|  | 41 }  // namespace profiles | 
|  | 42 | 
|  | 43 #endif  // CHROME_BROWSER_PROFILES_PROFILE_STATISTICS_H_ | 
| OLD | NEW | 
|---|