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

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

Issue 1072193012: Revert of [Mac] AppControllerMac updates the window when a Profile is deleted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 // profile has been loaded, we must pre-load a next one. 701 // profile has been loaded, we must pre-load a next one.
702 const std::string last_used_profile = 702 const std::string last_used_profile =
703 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); 703 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed);
704 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || 704 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() ||
705 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { 705 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) {
706 CreateProfileAsync(last_non_supervised_profile_path, 706 CreateProfileAsync(last_non_supervised_profile_path,
707 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, 707 base::Bind(&ProfileManager::OnNewActiveProfileLoaded,
708 base::Unretained(this), 708 base::Unretained(this),
709 profile_dir, 709 profile_dir,
710 last_non_supervised_profile_path, 710 last_non_supervised_profile_path,
711 callback), 711 CreateCallback()),
712 base::string16(), 712 base::string16(),
713 base::string16(), 713 base::string16(),
714 std::string()); 714 std::string());
715 return; 715 return;
716 } 716 }
717 #endif // defined(OS_MACOSX) 717 #endif // defined(OS_MACOSX)
718 718
719 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); 719 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path);
720 } 720 }
721 721
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 } 1393 }
1394 1394
1395 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1395 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1396 if (!original_callback.is_null()) 1396 if (!original_callback.is_null())
1397 original_callback.Run(loaded_profile, status); 1397 original_callback.Run(loaded_profile, status);
1398 } 1398 }
1399 1399
1400 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1400 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1401 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1401 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1402 } 1402 }
OLDNEW
« no previous file with comments | « chrome/browser/app_controller_mac_browsertest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698