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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // Returns created profiles. Note, profiles order is NOT guaranteed to be | 121 // Returns created profiles. Note, profiles order is NOT guaranteed to be |
122 // related with the creation order. | 122 // related with the creation order. |
123 std::vector<Profile*> GetLoadedProfiles() const; | 123 std::vector<Profile*> GetLoadedProfiles() const; |
124 | 124 |
125 // content::NotificationObserver implementation. | 125 // content::NotificationObserver implementation. |
126 virtual void Observe(int type, | 126 virtual void Observe(int type, |
127 const content::NotificationSource& source, | 127 const content::NotificationSource& source, |
128 const content::NotificationDetails& details) OVERRIDE; | 128 const content::NotificationDetails& details) OVERRIDE; |
129 | 129 |
| 130 // Returns true if the given command line indicates that this is a short-lived |
| 131 // profile import process. |
| 132 static bool IsImportProcess(const CommandLine& command_line); |
| 133 |
130 // Indicate that an import process will run for the next created Profile. | 134 // Indicate that an import process will run for the next created Profile. |
131 void SetWillImport(); | 135 void SetWillImport(); |
132 bool will_import() { return will_import_; } | 136 bool will_import() { return will_import_; } |
133 | 137 |
134 // Indicate that the import process for |profile| has completed. | 138 // Indicate that the import process for |profile| has completed. |
135 void OnImportFinished(Profile* profile); | 139 void OnImportFinished(Profile* profile); |
136 | 140 |
137 // ------------------ static utility functions ------------------- | 141 // ------------------ static utility functions ------------------- |
138 | 142 |
139 // Returns the path to the default profile directory, based on the given | 143 // Returns the path to the default profile directory, based on the given |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 class ProfileManagerWithoutInit : public ProfileManager { | 373 class ProfileManagerWithoutInit : public ProfileManager { |
370 public: | 374 public: |
371 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 375 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
372 | 376 |
373 protected: | 377 protected: |
374 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 378 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
375 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 379 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
376 }; | 380 }; |
377 | 381 |
378 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 382 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |