Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <list> | 10 #include <list> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 FilePath GetInitialProfileDir(); | 94 FilePath GetInitialProfileDir(); |
| 95 | 95 |
| 96 // Get the Profile last used (the Profile to which owns the most recently | 96 // Get the Profile last used (the Profile to which owns the most recently |
| 97 // focused window) with this Chrome build. If no signed profile has been | 97 // focused window) with this Chrome build. If no signed profile has been |
| 98 // stored in Local State, hand back the Default profile. | 98 // stored in Local State, hand back the Default profile. |
| 99 Profile* GetLastUsedProfile(const FilePath& user_data_dir); | 99 Profile* GetLastUsedProfile(const FilePath& user_data_dir); |
| 100 | 100 |
| 101 // Same as instance method but provides the default user_data_dir as well. | 101 // Same as instance method but provides the default user_data_dir as well. |
| 102 static Profile* GetLastUsedProfile(); | 102 static Profile* GetLastUsedProfile(); |
| 103 | 103 |
| 104 // Get the path of the last used profile, or if that's undefined, the default | |
| 105 // profile. | |
| 106 FilePath GetLastUsedProfilePath(const FilePath& user_data_dir); | |
|
sail
2013/01/23 16:55:24
The profile manager class is way to big right now.
koz (OOO until 15th September)
2013/01/25 00:32:46
I think the existence of these related functions i
sail
2013/01/25 18:22:34
Argh. I'd like to avoid this. If you can't figure
koz (OOO until 15th September)
2013/01/29 00:34:11
Unfortunately a better way doesn't jump out at me,
| |
| 107 | |
| 104 // Get the Profiles which are currently open, i.e., have open browsers, or | 108 // Get the Profiles which are currently open, i.e., have open browsers, or |
| 105 // were open the last time Chrome was running. The Profiles appear in the | 109 // were open the last time Chrome was running. The Profiles appear in the |
| 106 // order they were opened. The last used profile will be on the list, but its | 110 // order they were opened. The last used profile will be on the list, but its |
| 107 // index on the list will depend on when it was opened (it is not necessarily | 111 // index on the list will depend on when it was opened (it is not necessarily |
| 108 // the last one). | 112 // the last one). |
| 109 std::vector<Profile*> GetLastOpenedProfiles(const FilePath& user_data_dir); | 113 std::vector<Profile*> GetLastOpenedProfiles(const FilePath& user_data_dir); |
| 110 | 114 |
| 111 // Same as instance method but provides the default user_data_dir as well. | 115 // Same as instance method but provides the default user_data_dir as well. |
| 112 static std::vector<Profile*> GetLastOpenedProfiles(); | 116 static std::vector<Profile*> GetLastOpenedProfiles(); |
| 113 | 117 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 357 class ProfileManagerWithoutInit : public ProfileManager { | 361 class ProfileManagerWithoutInit : public ProfileManager { |
| 358 public: | 362 public: |
| 359 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 363 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
| 360 | 364 |
| 361 protected: | 365 protected: |
| 362 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 366 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
| 363 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 367 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 364 }; | 368 }; |
| 365 | 369 |
| 366 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 370 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |