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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| 11 #include "chrome/browser/profiles/profile_info_cache.h" | 11 #include "chrome/browser/profiles/profile_info_cache.h" |
| 12 | 12 |
| 13 class ProfileManager; | 13 class ProfileManager; |
| 14 | 14 |
| 15 class ProfileShortcutManager { | 15 class ProfileShortcutManager { |
| 16 public: | 16 public: |
| 17 virtual ~ProfileShortcutManager(); | 17 virtual ~ProfileShortcutManager(); |
| 18 | 18 |
| 19 // Create a profile icon for the profile with path |profile_path|. This will | |
| 20 // not overwrite an already existing profile icon. | |
|
Alexei Svitkine (slow)
2013/06/05 14:06:03
Please document |callback| - i.e. that it's only c
calamity
2013/06/07 04:26:26
Done.
| |
| 21 virtual void CreateProfileIcon( | |
| 22 const base::FilePath& profile_path, | |
| 23 const base::Closure& callback) = 0; | |
| 24 | |
| 19 // Create a profile shortcut for the profile with path |profile_path|, plus | 25 // Create a profile shortcut for the profile with path |profile_path|, plus |
| 20 // update the original profile shortcut if |profile_path| is the second | 26 // update the original profile shortcut if |profile_path| is the second |
| 21 // profile created. | 27 // profile created. |
| 22 virtual void CreateProfileShortcut(const base::FilePath& profile_path) = 0; | 28 virtual void CreateProfileShortcut(const base::FilePath& profile_path) = 0; |
| 23 | 29 |
| 24 // Removes any desktop profile shortcuts for the profile corresponding to | 30 // Removes any desktop profile shortcuts for the profile corresponding to |
| 25 // |profile_path|. | 31 // |profile_path|. |
| 26 virtual void RemoveProfileShortcuts(const base::FilePath& profile_path) = 0; | 32 virtual void RemoveProfileShortcuts(const base::FilePath& profile_path) = 0; |
| 27 | 33 |
| 28 // Checks if a profile at |profile_path| has any shortcuts and invokes | 34 // Checks if a profile at |profile_path| has any shortcuts and invokes |
| 29 // |callback| with the bool result some time later. Does not consider | 35 // |callback| with the bool result some time later. Does not consider |
| 30 // non-profile specific shortcuts. | 36 // non-profile specific shortcuts. |
| 31 virtual void HasProfileShortcuts( | 37 virtual void HasProfileShortcuts( |
| 32 const base::FilePath& profile_path, | 38 const base::FilePath& profile_path, |
| 33 const base::Callback<void(bool)>& callback) = 0; | 39 const base::Callback<void(bool)>& callback) = 0; |
| 34 | 40 |
| 35 static bool IsFeatureEnabled(); | 41 static bool IsFeatureEnabled(); |
| 36 static ProfileShortcutManager* Create(ProfileManager* manager); | 42 static ProfileShortcutManager* Create(ProfileManager* manager); |
| 37 | 43 |
| 38 protected: | 44 protected: |
| 39 ProfileShortcutManager(); | 45 ProfileShortcutManager(); |
| 40 | 46 |
| 41 private: | 47 private: |
| 42 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManager); | 48 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManager); |
| 43 }; | 49 }; |
| 44 | 50 |
| 45 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ | 51 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ |
| OLD | NEW |