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

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

Issue 2698683002: Forced ephemeral profile deletion on browser removal crash fix. (Closed)
Patch Set: Changed active profile selection logic upon ephemeral profile deletion. Created 3 years, 9 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
« no previous file with comments | « no previous file | 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 <stddef.h> 10 #include <stddef.h>
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // |status|) and isn't already scheduled for deletion, then finishes adding 376 // |status|) and isn't already scheduled for deletion, then finishes adding
377 // |profile_to_delete_dir| to the queue of profiles to be deleted, and updates 377 // |profile_to_delete_dir| to the queue of profiles to be deleted, and updates
378 // the kProfileLastUsed preference based on 378 // the kProfileLastUsed preference based on
379 // |last_non_supervised_profile_path|. 379 // |last_non_supervised_profile_path|.
380 void OnNewActiveProfileLoaded( 380 void OnNewActiveProfileLoaded(
381 const base::FilePath& profile_to_delete_path, 381 const base::FilePath& profile_to_delete_path,
382 const base::FilePath& last_non_supervised_profile_path, 382 const base::FilePath& last_non_supervised_profile_path,
383 const CreateCallback& original_callback, 383 const CreateCallback& original_callback,
384 Profile* loaded_profile, 384 Profile* loaded_profile,
385 Profile::CreateStatus status); 385 Profile::CreateStatus status);
386
387 // Schedules the forced ephemeral profile at the given path to be deleted on
388 // shutdown. New profiles will not be created.
389 void ScheduleForcedEphemeralProfileForDeletion(
390 const base::FilePath& profile_dir);
386 #endif // !defined(OS_ANDROID) 391 #endif // !defined(OS_ANDROID)
387 392
388 // Object to cache various information about profiles. Contains information 393 // Object to cache various information about profiles. Contains information
389 // about every profile which has been created for this instance of Chrome, 394 // about every profile which has been created for this instance of Chrome,
390 // if it has not been explicitly deleted. It must be destroyed after 395 // if it has not been explicitly deleted. It must be destroyed after
391 // |profiles_info_| because ~ProfileInfo can trigger a chain of events leading 396 // |profiles_info_| because ~ProfileInfo can trigger a chain of events leading
392 // to an access to this member. 397 // to an access to this member.
393 std::unique_ptr<ProfileInfoCache> profile_info_cache_; 398 std::unique_ptr<ProfileInfoCache> profile_info_cache_;
394 399
395 content::NotificationRegistrar registrar_; 400 content::NotificationRegistrar registrar_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 class ProfileManagerWithoutInit : public ProfileManager { 435 class ProfileManagerWithoutInit : public ProfileManager {
431 public: 436 public:
432 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 437 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
433 438
434 protected: 439 protected:
435 void DoFinalInitForServices(Profile*, bool) override {} 440 void DoFinalInitForServices(Profile*, bool) override {}
436 void DoFinalInitLogging(Profile*) override {} 441 void DoFinalInitLogging(Profile*) override {}
437 }; 442 };
438 443
439 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 444 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698