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

Side by Side Diff: chrome/browser/ui/webui/options/options_handlers_helper.cc

Issue 1113333003: Don't create a new profile when cleaning up stale ephemeral profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fix? Created 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/profiles/profile_manager.h" 7 #include "chrome/browser/profiles/profile_manager.h"
8 #include "chrome/browser/profiles/profile_metrics.h" 8 #include "chrome/browser/profiles/profile_metrics.h"
9 #include "chrome/browser/profiles/profile_window.h" 9 #include "chrome/browser/profiles/profile_window.h"
10 #include "chrome/browser/profiles/profiles_state.h" 10 #include "chrome/browser/profiles/profiles_state.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) { 52 void DeleteProfileAtPath(base::FilePath file_path, content::WebUI* web_ui) {
53 DCHECK(web_ui); 53 DCHECK(web_ui);
54 54
55 if (!profiles::IsMultipleProfilesEnabled()) 55 if (!profiles::IsMultipleProfilesEnabled())
56 return; 56 return;
57 57
58 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS); 58 ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::DELETE_PROFILE_SETTINGS);
59 59
60 g_browser_process->profile_manager()->ScheduleProfileForDeletion( 60 g_browser_process->profile_manager()->ScheduleProfileForDeletion(
61 file_path, 61 file_path, false /* suppress_profile_creation */,
62 base::Bind(&OpenNewWindowForProfile, GetDesktopType(web_ui))); 62 base::Bind(&OpenNewWindowForProfile, GetDesktopType(web_ui)));
63 } 63 }
64 64
65 } // namespace helper 65 } // namespace helper
66 } // namespace options 66 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698