| 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 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1108 } |
| 1109 | 1109 |
| 1110 void ProfileManager::DoFinalInit(Profile* profile, bool go_off_the_record) { | 1110 void ProfileManager::DoFinalInit(Profile* profile, bool go_off_the_record) { |
| 1111 TRACE_EVENT0("browser", "ProfileManager::DoFinalInit"); | 1111 TRACE_EVENT0("browser", "ProfileManager::DoFinalInit"); |
| 1112 TRACK_SCOPED_REGION("Startup", "ProfileManager::DoFinalInit"); | 1112 TRACK_SCOPED_REGION("Startup", "ProfileManager::DoFinalInit"); |
| 1113 | 1113 |
| 1114 DoFinalInitForServices(profile, go_off_the_record); | 1114 DoFinalInitForServices(profile, go_off_the_record); |
| 1115 AddProfileToCache(profile); | 1115 AddProfileToCache(profile); |
| 1116 DoFinalInitLogging(profile); | 1116 DoFinalInitLogging(profile); |
| 1117 | 1117 |
| 1118 ProfileMetrics::LogNumberOfProfiles(this); |
| 1118 content::NotificationService::current()->Notify( | 1119 content::NotificationService::current()->Notify( |
| 1119 chrome::NOTIFICATION_PROFILE_ADDED, | 1120 chrome::NOTIFICATION_PROFILE_ADDED, |
| 1120 content::Source<Profile>(profile), | 1121 content::Source<Profile>(profile), |
| 1121 content::NotificationService::NoDetails()); | 1122 content::NotificationService::NoDetails()); |
| 1122 | 1123 |
| 1123 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) | 1124 #if !defined(OS_ANDROID) && !defined(OS_IOS) && !defined(OS_CHROMEOS) |
| 1124 // Record statistics to ProfileInfoCache if statistics were not recorded | 1125 // Record statistics to ProfileInfoCache if statistics were not recorded |
| 1125 // during shutdown, i.e. the last shutdown was a system shutdown or a crash. | 1126 // during shutdown, i.e. the last shutdown was a system shutdown or a crash. |
| 1126 if (!profile->IsGuestSession() && !profile->IsSystemProfile() && | 1127 if (!profile->IsGuestSession() && !profile->IsSystemProfile() && |
| 1127 !profile->IsNewProfile() && !go_off_the_record && | 1128 !profile->IsNewProfile() && !go_off_the_record && |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 | 1617 |
| 1617 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1618 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1618 if (!original_callback.is_null()) | 1619 if (!original_callback.is_null()) |
| 1619 original_callback.Run(loaded_profile, status); | 1620 original_callback.Run(loaded_profile, status); |
| 1620 } | 1621 } |
| 1621 #endif // !defined(OS_ANDROID) | 1622 #endif // !defined(OS_ANDROID) |
| 1622 | 1623 |
| 1623 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1624 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1624 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1625 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1625 } | 1626 } |
| OLD | NEW |