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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // content::NotificationObserver implementation. | 123 // content::NotificationObserver implementation. |
124 virtual void Observe(int type, | 124 virtual void Observe(int type, |
125 const content::NotificationSource& source, | 125 const content::NotificationSource& source, |
126 const content::NotificationDetails& details) OVERRIDE; | 126 const content::NotificationDetails& details) OVERRIDE; |
127 | 127 |
128 // Returns true if the given command line indicates that this is a short-lived | 128 // Returns true if the given command line indicates that this is a short-lived |
129 // profile import process. | 129 // profile import process. |
130 static bool IsImportProcess(const CommandLine& command_line); | 130 static bool IsImportProcess(const CommandLine& command_line); |
131 | 131 |
132 // Whether a first-run import was triggered before the browser mainloop began. | |
133 // This is used in testing to verify import startup actions that occur before | |
134 // an observer can be registered in the test. | |
135 static bool DidPerformProfileImport(); | |
136 | |
137 // Indicate that an import process will run for the next created Profile. | 132 // Indicate that an import process will run for the next created Profile. |
138 void SetWillImport(); | 133 void SetWillImport(); |
139 bool will_import() { return will_import_; } | 134 bool will_import() { return will_import_; } |
140 | 135 |
141 // Indicate that the import process for |profile| has completed. | 136 // Indicate that the import process for |profile| has completed. |
142 void OnImportFinished(Profile* profile); | 137 void OnImportFinished(Profile* profile); |
143 | 138 |
144 // ------------------ static utility functions ------------------- | 139 // ------------------ static utility functions ------------------- |
145 | 140 |
146 // Returns the path to the default profile directory, based on the given | 141 // Returns the path to the default profile directory, based on the given |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 class ProfileManagerWithoutInit : public ProfileManager { | 361 class ProfileManagerWithoutInit : public ProfileManager { |
367 public: | 362 public: |
368 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 363 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
369 | 364 |
370 protected: | 365 protected: |
371 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 366 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
372 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 367 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
373 }; | 368 }; |
374 | 369 |
375 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 370 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |