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

Side by Side Diff: chrome/browser/ui/webui/settings/people_handler.cc

Issue 1869473002: Fixed crash on double profile delete operation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: param renaming. Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/webui/settings/people_handler.h" 5 #include "chrome/browser/ui/webui/settings/people_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 bool delete_profile = false; 576 bool delete_profile = false;
577 args->GetBoolean(0, &delete_profile); 577 args->GetBoolean(0, &delete_profile);
578 signin_metrics::SignoutDelete delete_metric = 578 signin_metrics::SignoutDelete delete_metric =
579 delete_profile ? signin_metrics::SignoutDelete::DELETED 579 delete_profile ? signin_metrics::SignoutDelete::DELETED
580 : signin_metrics::SignoutDelete::KEEPING; 580 : signin_metrics::SignoutDelete::KEEPING;
581 SigninManagerFactory::GetForProfile(profile_) 581 SigninManagerFactory::GetForProfile(profile_)
582 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric); 582 ->SignOut(signin_metrics::USER_CLICKED_SIGNOUT_SETTINGS, delete_metric);
583 583
584 if (delete_profile) { 584 if (delete_profile) {
585 // Do as BrowserOptionsHandler::DeleteProfile(). 585 // Do as BrowserOptionsHandler::DeleteProfile().
586 webui::DeleteProfileAtPath(profile_->GetPath(), web_ui()); 586 webui::DeleteProfileAtPath(profile_->GetPath(),
587 web_ui(),
588 ProfileMetrics::DELETE_PROFILE_SETTINGS);
587 } 589 }
588 } 590 }
589 #endif 591 #endif
590 592
591 void PeopleHandler::HandleCloseTimeout(const base::ListValue* args) { 593 void PeopleHandler::HandleCloseTimeout(const base::ListValue* args) {
592 CloseSyncSetup(); 594 CloseSyncSetup();
593 } 595 }
594 596
595 void PeopleHandler::HandleGetSyncStatus(const base::ListValue* args) { 597 void PeopleHandler::HandleGetSyncStatus(const base::ListValue* args) {
596 CHECK_EQ(1U, args->GetSize()); 598 CHECK_EQ(1U, args->GetSize());
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
936 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback", 938 web_ui()->CallJavascriptFunction("cr.webUIListenerCallback",
937 base::StringValue("sync-status-changed"), 939 base::StringValue("sync-status-changed"),
938 *GetSyncStatusDictionary()); 940 *GetSyncStatusDictionary());
939 } 941 }
940 942
941 void PeopleHandler::OnSigninAllowedPrefChange() { 943 void PeopleHandler::OnSigninAllowedPrefChange() {
942 UpdateSyncStatus(); 944 UpdateSyncStatus();
943 } 945 }
944 946
945 } // namespace settings 947 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/profile_helper.cc ('k') | chrome/browser/ui/webui/signin/signin_create_profile_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698