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

Unified Diff: chrome/browser/extensions/api/principals_private/principals_private_api.cc

Issue 64313005: Fix crash when locking a profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix flaky test 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/extensions/api/principals_private/principals_private_api.cc
diff --git a/chrome/browser/extensions/api/principals_private/principals_private_api.cc b/chrome/browser/extensions/api/principals_private/principals_private_api.cc
index e1902a2335dbc4146d3f0ad826c7f4b3d9a827e0..f08bd6df868ce203d33e48669eaa206e0c40f998 100644
--- a/chrome/browser/extensions/api/principals_private/principals_private_api.cc
+++ b/chrome/browser/extensions/api/principals_private/principals_private_api.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/avatar_menu.h"
-#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/profiles/profiles_state.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
@@ -25,10 +25,7 @@ bool PrincipalsPrivateExtensionFunction::RunImpl() {
bool PrincipalsPrivateSignOutFunction::RunImplSafe() {
Browser* browser = GetCurrentBrowser();
if (browser) {
- AvatarMenu avatar_menu(
- &g_browser_process->profile_manager()->GetProfileInfoCache(), NULL,
- browser);
- avatar_menu.BeginSignOut();
+ profiles::LockProfile(browser->profile());
}
return true;
}
« no previous file with comments | « chrome/browser/chromeos/profiles/avatar_menu_actions_chromeos.cc ('k') | chrome/browser/profiles/avatar_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698