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

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

Issue 6901031: Profile shouldn't own Session/TabRestore services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac build Created 9 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 9 #pragma once
10 10
(...skipping 21 matching lines...) Expand all
32 class Observer { 32 class Observer {
33 public: 33 public:
34 // This method is called when profile is ready. If profile creation has been 34 // This method is called when profile is ready. If profile creation has been
35 // failed, method is called with |profile| equals to NULL. 35 // failed, method is called with |profile| equals to NULL.
36 virtual void OnProfileCreated(Profile* profile) = 0; 36 virtual void OnProfileCreated(Profile* profile) = 0;
37 }; 37 };
38 38
39 ProfileManager(); 39 ProfileManager();
40 virtual ~ProfileManager(); 40 virtual ~ProfileManager();
41 41
42 // Invokes ShutdownSessionService() on all profiles. 42 // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles.
43 static void ShutdownSessionServices(); 43 static void ShutdownSessionServices();
44 44
45 // Returns the default profile. This adds the profile to the 45 // Returns the default profile. This adds the profile to the
46 // ProfileManager if it doesn't already exist. This method returns NULL if 46 // ProfileManager if it doesn't already exist. This method returns NULL if
47 // the profile doesn't exist and we can't create it. 47 // the profile doesn't exist and we can't create it.
48 // The profile used can be overridden by using --login-profile on cros. 48 // The profile used can be overridden by using --login-profile on cros.
49 Profile* GetDefaultProfile(const FilePath& user_data_dir); 49 Profile* GetDefaultProfile(const FilePath& user_data_dir);
50 50
51 // Same as instance method but provides the default user_data_dir as well. 51 // Same as instance method but provides the default user_data_dir as well.
52 static Profile* GetDefaultProfile(); 52 static Profile* GetDefaultProfile();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 }; 161 };
162 162
163 // Same as the ProfileManager, but doesn't initialize some services of the 163 // Same as the ProfileManager, but doesn't initialize some services of the
164 // profile. This one is useful in unittests. 164 // profile. This one is useful in unittests.
165 class ProfileManagerWithoutInit : public ProfileManager { 165 class ProfileManagerWithoutInit : public ProfileManager {
166 protected: 166 protected:
167 virtual void DoFinalInit(Profile*) {} 167 virtual void DoFinalInit(Profile*) {}
168 }; 168 };
169 169
170 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 170 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698