| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 UMA_HISTOGRAM_COUNTS_10000("Profile.VisitedLinksSize", size_MB); | 196 UMA_HISTOGRAM_COUNTS_10000("Profile.VisitedLinksSize", size_MB); |
| 197 | 197 |
| 198 size = ComputeFilesSize(path, FILE_PATH_LITERAL("Web Data")); | 198 size = ComputeFilesSize(path, FILE_PATH_LITERAL("Web Data")); |
| 199 size_MB = static_cast<int>(size / kBytesInOneMB); | 199 size_MB = static_cast<int>(size / kBytesInOneMB); |
| 200 UMA_HISTOGRAM_COUNTS_10000("Profile.WebDataSize", size_MB); | 200 UMA_HISTOGRAM_COUNTS_10000("Profile.WebDataSize", size_MB); |
| 201 | 201 |
| 202 size = ComputeFilesSize(path, FILE_PATH_LITERAL("Extension*")); | 202 size = ComputeFilesSize(path, FILE_PATH_LITERAL("Extension*")); |
| 203 size_MB = static_cast<int>(size / kBytesInOneMB); | 203 size_MB = static_cast<int>(size / kBytesInOneMB); |
| 204 UMA_HISTOGRAM_COUNTS_10000("Profile.ExtensionSize", size_MB); | 204 UMA_HISTOGRAM_COUNTS_10000("Profile.ExtensionSize", size_MB); |
| 205 | 205 |
| 206 size = ComputeFilesSize(path, FILE_PATH_LITERAL("Policy")); | |
| 207 size_MB = static_cast<int>(size / kBytesInOneMB); | |
| 208 UMA_HISTOGRAM_COUNTS_10000("Profile.PolicySize", size_MB); | |
| 209 | |
| 210 // Count number of enabled apps in this profile, if we know. | 206 // Count number of enabled apps in this profile, if we know. |
| 211 if (enabled_app_count != -1) | 207 if (enabled_app_count != -1) |
| 212 UMA_HISTOGRAM_COUNTS_10000("Profile.AppCount", enabled_app_count); | 208 UMA_HISTOGRAM_COUNTS_10000("Profile.AppCount", enabled_app_count); |
| 213 } | 209 } |
| 214 | 210 |
| 215 #if !defined(OS_ANDROID) | 211 #if !defined(OS_ANDROID) |
| 216 // Schedule a profile for deletion if it isn't already scheduled. | 212 // Schedule a profile for deletion if it isn't already scheduled. |
| 217 // Returns whether the profile has been newly scheduled. | 213 // Returns whether the profile has been newly scheduled. |
| 218 bool ScheduleProfileDirectoryForDeletion(const base::FilePath& path) { | 214 bool ScheduleProfileDirectoryForDeletion(const base::FilePath& path) { |
| 219 if (ContainsKey(ProfilesToDelete(), path)) | 215 if (ContainsKey(ProfilesToDelete(), path)) |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 | 1669 |
| 1674 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1670 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1675 if (!original_callback.is_null()) | 1671 if (!original_callback.is_null()) |
| 1676 original_callback.Run(loaded_profile, status); | 1672 original_callback.Run(loaded_profile, status); |
| 1677 } | 1673 } |
| 1678 #endif // !defined(OS_ANDROID) | 1674 #endif // !defined(OS_ANDROID) |
| 1679 | 1675 |
| 1680 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1676 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1681 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1677 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1682 } | 1678 } |
| OLD | NEW |