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

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

Issue 50293011: Improve ephemeral profiles clean up code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed param. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | 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 // This class keeps track of the currently-active profiles in the runtime. 5 // This class keeps track of the currently-active profiles in the runtime.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Returns a ProfileShortcut Manager that enables the caller to create 180 // Returns a ProfileShortcut Manager that enables the caller to create
181 // profile specfic desktop shortcuts. 181 // profile specfic desktop shortcuts.
182 ProfileShortcutManager* profile_shortcut_manager(); 182 ProfileShortcutManager* profile_shortcut_manager();
183 183
184 // Schedules the profile at the given path to be deleted on shutdown. If we're 184 // Schedules the profile at the given path to be deleted on shutdown. If we're
185 // deleting the last profile, a new one will be created in its place, and in 185 // deleting the last profile, a new one will be created in its place, and in
186 // that case the callback will be called when profile creation is complete. 186 // that case the callback will be called when profile creation is complete.
187 void ScheduleProfileForDeletion(const base::FilePath& profile_dir, 187 void ScheduleProfileForDeletion(const base::FilePath& profile_dir,
188 const CreateCallback& callback); 188 const CreateCallback& callback);
189 189
190 // Called on start-up if there are any stale ephemeral profiles to be deleted.
191 // This can be the case if the browser has crashed and the clean-up code had
192 // no chance to run then.
193 static void CleanUpStaleProfiles(
194 const std::vector<base::FilePath>& profile_paths);
195
190 // Autoloads profiles if they are running background apps. 196 // Autoloads profiles if they are running background apps.
191 void AutoloadProfiles(); 197 void AutoloadProfiles();
192 198
193 // Sign-Out a profile against use until re-authentication. 199 // Sign-Out a profile against use until re-authentication.
194 void SignOutProfile(Profile* profile); 200 void SignOutProfile(Profile* profile);
195 201
196 // Initializes user prefs of |profile|. This includes profile name and 202 // Initializes user prefs of |profile|. This includes profile name and
197 // avatar values. 203 // avatar values.
198 void InitProfileUserPrefs(Profile* profile); 204 void InitProfileUserPrefs(Profile* profile);
199 205
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 class ProfileManagerWithoutInit : public ProfileManager { 366 class ProfileManagerWithoutInit : public ProfileManager {
361 public: 367 public:
362 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 368 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
363 369
364 protected: 370 protected:
365 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} 371 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
366 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} 372 virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
367 }; 373 };
368 374
369 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 375 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698