| 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 <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 return GetProfileInfoCache().GetNumberOfProfiles(); | 375 return GetProfileInfoCache().GetNumberOfProfiles(); |
| 376 } | 376 } |
| 377 | 377 |
| 378 void ProfileManager::CreateProfileAsync( | 378 void ProfileManager::CreateProfileAsync( |
| 379 const base::FilePath& profile_path, | 379 const base::FilePath& profile_path, |
| 380 const CreateCallback& callback, | 380 const CreateCallback& callback, |
| 381 const base::string16& name, | 381 const base::string16& name, |
| 382 const base::string16& icon_url, | 382 const base::string16& icon_url, |
| 383 const std::string& supervised_user_id) { | 383 const std::string& supervised_user_id) { |
| 384 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 384 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 385 TRACE_EVENT1("startup", |
| 386 "ProfileManager::CreateProfileAsync", |
| 387 "profile_path", |
| 388 profile_path.value()); |
| 385 | 389 |
| 386 // Make sure that this profile is not pending deletion. | 390 // Make sure that this profile is not pending deletion. |
| 387 if (IsProfileMarkedForDeletion(profile_path)) { | 391 if (IsProfileMarkedForDeletion(profile_path)) { |
| 388 if (!callback.is_null()) | 392 if (!callback.is_null()) |
| 389 callback.Run(NULL, Profile::CREATE_STATUS_LOCAL_FAIL); | 393 callback.Run(NULL, Profile::CREATE_STATUS_LOCAL_FAIL); |
| 390 return; | 394 return; |
| 391 } | 395 } |
| 392 | 396 |
| 393 // Create the profile if needed and collect its ProfileInfo. | 397 // Create the profile if needed and collect its ProfileInfo. |
| 394 ProfilesInfoMap::iterator iter = profiles_info_.find(profile_path); | 398 ProfilesInfoMap::iterator iter = profiles_info_.find(profile_path); |
| (...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1293 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
| 1290 FinishDeletingProfile(profile_to_delete_path); | 1294 FinishDeletingProfile(profile_to_delete_path); |
| 1291 } | 1295 } |
| 1292 } | 1296 } |
| 1293 } | 1297 } |
| 1294 #endif | 1298 #endif |
| 1295 | 1299 |
| 1296 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1300 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1297 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1301 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1298 } | 1302 } |
| OLD | NEW |