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

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: Make RestartToApplyPerSessionFlagsIfNeed global function. 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return GetProfileInfoCache().GetNumberOfProfiles(); 367 return GetProfileInfoCache().GetNumberOfProfiles();
368 } 368 }
369 369
370 void ProfileManager::CreateProfileAsync( 370 void ProfileManager::CreateProfileAsync(
371 const base::FilePath& profile_path, 371 const base::FilePath& profile_path,
372 const CreateCallback& callback, 372 const CreateCallback& callback,
373 const base::string16& name, 373 const base::string16& name,
374 const base::string16& icon_url, 374 const base::string16& icon_url,
375 const std::string& managed_user_id) { 375 const std::string& managed_user_id) {
376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 376 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
377 TRACE_EVENT1("startup",
378 "ProfileManager::CreateProfileAsync",
379 "profile_path",
380 profile_path.value());
377 381
378 // Make sure that this profile is not pending deletion. 382 // Make sure that this profile is not pending deletion.
379 if (IsProfileMarkedForDeletion(profile_path)) { 383 if (IsProfileMarkedForDeletion(profile_path)) {
380 if (!callback.is_null()) 384 if (!callback.is_null())
381 callback.Run(NULL, Profile::CREATE_STATUS_LOCAL_FAIL); 385 callback.Run(NULL, Profile::CREATE_STATUS_LOCAL_FAIL);
382 return; 386 return;
383 } 387 }
384 388
385 // Create the profile if needed and collect its ProfileInfo. 389 // Create the profile if needed and collect its ProfileInfo.
386 ProfilesInfoMap::iterator iter = profiles_info_.find(profile_path); 390 ProfilesInfoMap::iterator iter = profiles_info_.find(profile_path);
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 last_non_managed_profile_path.BaseName().MaybeAsASCII()); 1283 last_non_managed_profile_path.BaseName().MaybeAsASCII());
1280 FinishDeletingProfile(profile_to_delete_path); 1284 FinishDeletingProfile(profile_to_delete_path);
1281 } 1285 }
1282 } 1286 }
1283 } 1287 }
1284 #endif 1288 #endif
1285 1289
1286 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1290 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1287 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1291 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1288 } 1292 }
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