Cleanup: new common GetProfileSwitcherTextForItem for use on both Win and Mac
[chromium-blink-merge.git] / chrome / browser / profiles / profile_shortcut_manager.h
blob68cc32467d6052d054f75dd33e90aefc70e3cf52
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_
8 #include "base/callback.h"
9 #include "base/files/file_path.h"
10 #include "base/strings/string16.h"
11 #include "chrome/browser/profiles/profile_info_cache.h"
13 class ProfileManager;
15 namespace base {
16 class CommandLine;
19 class ProfileShortcutManager {
20 public:
21 virtual ~ProfileShortcutManager();
23 // Create a profile icon for the profile with path |profile_path|.
24 virtual void CreateOrUpdateProfileIcon(
25 const base::FilePath& profile_path) = 0;
27 // Create a profile shortcut for the profile with path |profile_path|, plus
28 // update the original profile shortcut if |profile_path| is the second
29 // profile created.
30 virtual void CreateProfileShortcut(const base::FilePath& profile_path) = 0;
32 // Removes any desktop profile shortcuts for the profile corresponding to
33 // |profile_path|.
34 virtual void RemoveProfileShortcuts(const base::FilePath& profile_path) = 0;
36 // Checks if a profile at |profile_path| has any shortcuts and invokes
37 // |callback| with the bool result some time later. Does not consider
38 // non-profile specific shortcuts.
39 virtual void HasProfileShortcuts(
40 const base::FilePath& profile_path,
41 const base::Callback<void(bool)>& callback) = 0;
43 // Populates the |command_line|, |name| and |icon_path| that a shortcut for
44 // the given |profile_path| should use.
45 virtual void GetShortcutProperties(const base::FilePath& profile_path,
46 base::CommandLine* command_line,
47 base::string16* name,
48 base::FilePath* icon_path) = 0;
50 static bool IsFeatureEnabled();
51 static ProfileShortcutManager* Create(ProfileManager* manager);
53 protected:
54 ProfileShortcutManager();
56 private:
57 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManager);
60 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_