Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 322533002: Restart Chrome on ChromeOS as early as possible to speed up restart. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win build. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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().c_str());
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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1297 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1294 FinishDeletingProfile(profile_to_delete_path); 1298 FinishDeletingProfile(profile_to_delete_path);
1295 } 1299 }
1296 } 1300 }
1297 } 1301 }
1298 #endif 1302 #endif
1299 1303
1300 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1304 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1301 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1305 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1302 } 1306 }
OLDNEW
« chrome/browser/chromeos/login/login_utils.cc ('K') | « chrome/browser/profiles/profile_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698