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

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

Issue 2021253002: Skip profiles in GetLastOpenedProfiles that fail to initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments in code % pkasting's comments 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 gathers state related to a single user profile. 5 // This class gathers state related to a single user profile.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_
9 9
10 #include <string> 10 #include <string>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 Profile(); 123 Profile();
124 ~Profile() override; 124 ~Profile() override;
125 125
126 // Profile prefs are registered as soon as the prefs are loaded for the first 126 // Profile prefs are registered as soon as the prefs are loaded for the first
127 // time. 127 // time.
128 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 128 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
129 129
130 // Create a new profile given a path. If |create_mode| is 130 // Create a new profile given a path. If |create_mode| is
131 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously. 131 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously.
132 // Can return null if |create_mode| is CREATE_MODE_SYNCHRONOUS and the
133 // creation of the profile directory fails.
132 static Profile* CreateProfile(const base::FilePath& path, 134 static Profile* CreateProfile(const base::FilePath& path,
133 Delegate* delegate, 135 Delegate* delegate,
134 CreateMode create_mode); 136 CreateMode create_mode);
135 137
136 // Returns the profile corresponding to the given browser context. 138 // Returns the profile corresponding to the given browser context.
137 static Profile* FromBrowserContext(content::BrowserContext* browser_context); 139 static Profile* FromBrowserContext(content::BrowserContext* browser_context);
138 140
139 // Returns the profile corresponding to the given WebUI. 141 // Returns the profile corresponding to the given WebUI.
140 static Profile* FromWebUI(content::WebUI* web_ui); 142 static Profile* FromWebUI(content::WebUI* web_ui);
141 143
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 375
374 DISALLOW_COPY_AND_ASSIGN(Profile); 376 DISALLOW_COPY_AND_ASSIGN(Profile);
375 }; 377 };
376 378
377 // The comparator for profile pointers as key in a map. 379 // The comparator for profile pointers as key in a map.
378 struct ProfileCompare { 380 struct ProfileCompare {
379 bool operator()(Profile* a, Profile* b) const; 381 bool operator()(Profile* a, Profile* b) const;
380 }; 382 };
381 383
382 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ 384 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_manager.h » ('j') | chrome/browser/profiles/profile_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698