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

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

Issue 8565032: Fixing ProfileManagerTest to use the TestingProfile instead of a real profile. This will allow ea... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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
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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 void RegisterTestingProfile(Profile* profile, bool addToCache); 191 void RegisterTestingProfile(Profile* profile, bool addToCache);
192 192
193 const FilePath& user_data_dir() const { return user_data_dir_; } 193 const FilePath& user_data_dir() const { return user_data_dir_; }
194 194
195 protected: 195 protected:
196 // Does final initial actions. 196 // Does final initial actions.
197 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); 197 virtual void DoFinalInit(Profile* profile, bool go_off_the_record);
198 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); 198 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record);
199 virtual void DoFinalInitLogging(Profile* profile); 199 virtual void DoFinalInitLogging(Profile* profile);
200 200
201 // Creates a new profile. Virtual so that unittests can return TestingProfile. 201 // Creates a new profile. Virtual so that unittests can return a
202 // TestingProfile.
202 virtual Profile* CreateProfile(const FilePath& path); 203 virtual Profile* CreateProfile(const FilePath& path);
203 204
205 // Creates a new profile asynchronously. Virtual so that unittests can return
206 // a TestingProfile.
207 virtual Profile* CreateAsyncProfile(const FilePath& path,
Miranda Callahan 2011/11/21 15:31:31 I think making an asynchronous creation method ana
rpetterson 2011/11/21 22:59:30 I see your point. I renamed the helper functions t
208 Delegate* delegate);
209
204 private: 210 private:
205 friend class TestingProfileManager; 211 friend class TestingProfileManager;
206 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles); 212 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles);
207 213
208 // This struct contains information about profiles which are being loaded or 214 // This struct contains information about profiles which are being loaded or
209 // were loaded. 215 // were loaded.
210 struct ProfileInfo { 216 struct ProfileInfo {
211 ProfileInfo(Profile* profile, bool created) 217 ProfileInfo(Profile* profile, bool created)
212 : profile(profile), created(created) { 218 : profile(profile), created(created) {
213 } 219 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 class ProfileManagerWithoutInit : public ProfileManager { 291 class ProfileManagerWithoutInit : public ProfileManager {
286 public: 292 public:
287 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); 293 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir);
288 294
289 protected: 295 protected:
290 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} 296 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
291 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} 297 virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
292 }; 298 };
293 299
294 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 300 #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_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698