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

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

Issue 1102833002: Reland: 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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 // profile has been loaded, we must pre-load a next one. 706 // profile has been loaded, we must pre-load a next one.
707 const std::string last_used_profile = 707 const std::string last_used_profile =
708 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); 708 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed);
709 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || 709 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() ||
710 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { 710 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) {
711 CreateProfileAsync(last_non_supervised_profile_path, 711 CreateProfileAsync(last_non_supervised_profile_path,
712 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, 712 base::Bind(&ProfileManager::OnNewActiveProfileLoaded,
713 base::Unretained(this), 713 base::Unretained(this),
714 profile_dir, 714 profile_dir,
715 last_non_supervised_profile_path, 715 last_non_supervised_profile_path,
716 CreateCallback()), 716 callback),
717 base::string16(), 717 base::string16(),
718 base::string16(), 718 base::string16(),
719 std::string()); 719 std::string());
720 return; 720 return;
721 } 721 }
722 #endif // defined(OS_MACOSX) 722 #endif // defined(OS_MACOSX)
723 723
724 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); 724 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path);
725 } 725 }
726 726
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 } 1398 }
1399 1399
1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1401 if (!original_callback.is_null()) 1401 if (!original_callback.is_null())
1402 original_callback.Run(loaded_profile, status); 1402 original_callback.Run(loaded_profile, status);
1403 } 1403 }
1404 1404
1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1407 } 1407 }
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