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

Unified Diff: chrome/browser/profiles/avatar_menu_actions_desktop.cc

Issue 64313005: Fix crash when locking a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/avatar_menu_actions_desktop.cc
diff --git a/chrome/browser/profiles/avatar_menu_actions_desktop.cc b/chrome/browser/profiles/avatar_menu_actions_desktop.cc
index 4335d159d2efd9c6a55d8ba14db847705f31cfbe..bb6d11c965765db17024ab4a4d83181168e1b0d3 100644
--- a/chrome/browser/profiles/avatar_menu_actions_desktop.cc
+++ b/chrome/browser/profiles/avatar_menu_actions_desktop.cc
@@ -120,7 +120,7 @@ bool AvatarMenuActionsDesktop::ShouldShowEditProfileLink() const {
return true;
}
-content::WebContents* AvatarMenuActionsDesktop::BeginSignOut() {
+void AvatarMenuActionsDesktop::BeginSignOut() {
ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* current_profile = browser_->profile();
@@ -128,34 +128,12 @@ content::WebContents* AvatarMenuActionsDesktop::BeginSignOut() {
size_t index = cache.GetIndexOfProfileWithPath(current_profile->GetPath());
cache.SetProfileSigninRequiredAtIndex(index, true);
- std::string landing_url = signin::GetLandingURL("close", 1).spec();
- GURL logout_url(GaiaUrls::GetInstance()->service_logout_url());
- logout_url = net::AppendQueryParameter(logout_url, "continue", landing_url);
- if (!logout_override_.empty()) {
- // We're testing...
- landing_url = logout_override_;
- logout_url = GURL(logout_override_);
+ if (profiles::IsNewProfileManagementEnabled()) {
Roger Tawa OOO till Jul 10th 2013/11/12 15:27:49 nit: do we need this if? I assume this function c
noms (inactive) 2013/11/12 16:47:27 Changed to a DCHECK. It can technically be called
+ DCHECK(current_profile);
+ chrome::ShowUserManager(current_profile->GetPath());
}
- content::WebContents::CreateParams create_params(current_profile);
- create_params.site_instance =
- content::SiteInstance::CreateForURL(current_profile, logout_url);
- content::WebContents* contents = content::WebContents::Create(create_params);
- // This object may be destructed when the menu closes but we need something
- // around to finish the sign-out process and close the profile windows.
- new SignoutTracker(current_profile,
- GURL(landing_url),
- contents,
- browser_);
- contents->GetController().LoadURL(
- logout_url, content::Referrer(),
- content::PAGE_TRANSITION_GENERATED, std::string());
-
- return contents; // returned for testing purposes
-}
-
-void AvatarMenuActionsDesktop::SetLogoutURL(const std::string& logout_url) {
- logout_override_ = logout_url;
+ BrowserList::CloseAllBrowsersWithProfile(current_profile);
}
void AvatarMenuActionsDesktop::ActiveBrowserChanged(Browser* browser) {

Powered by Google App Engine
This is Rietveld 408576698