| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 void ProfileManager::DoFinalInit(Profile* profile, bool go_off_the_record) { | 1112 void ProfileManager::DoFinalInit(Profile* profile, bool go_off_the_record) { |
| 1113 TRACE_EVENT0("browser", "ProfileManager::DoFinalInit"); | 1113 TRACE_EVENT0("browser", "ProfileManager::DoFinalInit"); |
| 1114 TRACK_SCOPED_REGION("Startup", "ProfileManager::DoFinalInit"); | 1114 TRACK_SCOPED_REGION("Startup", "ProfileManager::DoFinalInit"); |
| 1115 | 1115 |
| 1116 DoFinalInitForServices(profile, go_off_the_record); | 1116 DoFinalInitForServices(profile, go_off_the_record); |
| 1117 AddProfileToStorage(profile); | 1117 AddProfileToStorage(profile); |
| 1118 DoFinalInitLogging(profile); | 1118 DoFinalInitLogging(profile); |
| 1119 | 1119 |
| 1120 ProfileMetrics::LogNumberOfProfiles(this); | |
| 1121 content::NotificationService::current()->Notify( | 1120 content::NotificationService::current()->Notify( |
| 1122 chrome::NOTIFICATION_PROFILE_ADDED, | 1121 chrome::NOTIFICATION_PROFILE_ADDED, |
| 1123 content::Source<Profile>(profile), | 1122 content::Source<Profile>(profile), |
| 1124 content::NotificationService::NoDetails()); | 1123 content::NotificationService::NoDetails()); |
| 1125 | 1124 |
| 1126 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 1125 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
| 1127 // Record statistics to ProfileInfoCache if statistics were not recorded | 1126 // Record statistics to ProfileInfoCache if statistics were not recorded |
| 1128 // during shutdown, i.e. the last shutdown was a system shutdown or a crash. | 1127 // during shutdown, i.e. the last shutdown was a system shutdown or a crash. |
| 1129 if (!profile->IsGuestSession() && !profile->IsSystemProfile() && | 1128 if (!profile->IsGuestSession() && !profile->IsSystemProfile() && |
| 1130 !profile->IsNewProfile() && !go_off_the_record && | 1129 !profile->IsNewProfile() && !go_off_the_record && |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 | 1624 |
| 1626 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1625 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1627 if (!original_callback.is_null()) | 1626 if (!original_callback.is_null()) |
| 1628 original_callback.Run(loaded_profile, status); | 1627 original_callback.Run(loaded_profile, status); |
| 1629 } | 1628 } |
| 1630 #endif // !defined(OS_ANDROID) | 1629 #endif // !defined(OS_ANDROID) |
| 1631 | 1630 |
| 1632 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1631 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1633 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1632 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1634 } | 1633 } |
| OLD | NEW |