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

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

Issue 2021253002: Skip profiles in GetLastOpenedProfiles that fail to initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 (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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::FilePath GetLastUsedProfileDir(const base::FilePath& user_data_dir); 133 base::FilePath GetLastUsedProfileDir(const base::FilePath& user_data_dir);
134 134
135 // Get the name of the last used profile, or if that's undefined, the default 135 // Get the name of the last used profile, or if that's undefined, the default
136 // profile. 136 // profile.
137 std::string GetLastUsedProfileName(); 137 std::string GetLastUsedProfileName();
138 138
139 // Get the Profiles which are currently open, i.e., have open browsers, or 139 // Get the Profiles which are currently open, i.e., have open browsers, or
140 // were open the last time Chrome was running. The Profiles appear in the 140 // were open the last time Chrome was running. The Profiles appear in the
141 // order they were opened. The last used profile will be on the list, but its 141 // order they were opened. The last used profile will be on the list, but its
142 // index on the list will depend on when it was opened (it is not necessarily 142 // index on the list will depend on when it was opened (it is not necessarily
143 // the last one). 143 // the last one). However profiles that fails to initialize (e.g. due to disk
144 // errors) are skipped.
144 std::vector<Profile*> GetLastOpenedProfiles( 145 std::vector<Profile*> GetLastOpenedProfiles(
145 const base::FilePath& user_data_dir); 146 const base::FilePath& user_data_dir);
146 147
147 // Returns created and fully initialized profiles. Note, profiles order is NOT 148 // Returns created and fully initialized profiles. Note, profiles order is NOT
148 // guaranteed to be related with the creation order. 149 // guaranteed to be related with the creation order.
149 std::vector<Profile*> GetLoadedProfiles() const; 150 std::vector<Profile*> GetLoadedProfiles() const;
150 151
151 // If a profile with the given path is currently managed by this object and 152 // If a profile with the given path is currently managed by this object and
152 // fully initialized, return a pointer to the corresponding Profile object; 153 // fully initialized, return a pointer to the corresponding Profile object;
153 // otherwise return null. 154 // otherwise return null.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 class ProfileManagerWithoutInit : public ProfileManager { 418 class ProfileManagerWithoutInit : public ProfileManager {
418 public: 419 public:
419 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 420 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
420 421
421 protected: 422 protected:
422 void DoFinalInitForServices(Profile*, bool) override {} 423 void DoFinalInitForServices(Profile*, bool) override {}
423 void DoFinalInitLogging(Profile*) override {} 424 void DoFinalInitLogging(Profile*) override {}
424 }; 425 };
425 426
426 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 427 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.cc » ('j') | chrome/browser/profiles/profile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698