| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_UTIL_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_UTIL_H_ |
| 7 |
| 8 #include "chrome/browser/ui/host_desktop.h" |
| 9 #include "chrome/browser/ui/startup/startup_types.h" |
| 10 |
| 11 namespace base { |
| 12 class FilePath; |
| 13 } |
| 14 class PrefRegistrySimple; |
| 15 class Profile; |
| 16 |
| 17 namespace profiles { |
| 18 |
| 19 // Checks if multiple profiles is enabled. |
| 20 bool IsMultipleProfilesEnabled(); |
| 21 |
| 22 // Returns the path to the default profile directory, based on the given |
| 23 // user data directory. |
| 24 base::FilePath GetDefaultProfileDir(const base::FilePath& user_data_dir); |
| 25 |
| 26 // Returns the path to the preferences file given the user profile directory. |
| 27 base::FilePath GetProfilePrefsPath(const base::FilePath& profile_dir); |
| 28 |
| 29 // Register multi-profile related preferences in Local State. |
| 30 void RegisterPrefs(PrefRegistrySimple* registry); |
| 31 |
| 32 // Activates a window for |profile| on the desktop specified by |
| 33 // |desktop_type|. If no such window yet exists, or if |always_create| is |
| 34 // true, this first creates a new window, then activates |
| 35 // that. If activating an exiting window and multiple windows exists then the |
| 36 // window that was most recently active is activated. This is used for |
| 37 // creation of a window from the multi-profile dropdown menu. |
| 38 void FindOrCreateNewWindowForProfile( |
| 39 Profile* profile, |
| 40 chrome::startup::IsProcessStartup process_startup, |
| 41 chrome::startup::IsFirstRun is_first_run, |
| 42 chrome::HostDesktopType desktop_type, |
| 43 bool always_create); |
| 44 |
| 45 } // namespace profiles |
| 46 |
| 47 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_UTIL_H_ |
| OLD | NEW |