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. 4 5#ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ 6#define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ 7 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" 12 13class ProfileManager; 14 15class ProfileShortcutManager { 16 public: 17 virtual ~ProfileShortcutManager(); 18 19 // Create a profile icon for the profile with path |profile_path|. 20 // |callback| is called only on creation success. 21 virtual void CreateOrUpdateProfileIcon( 22 const base::FilePath& profile_path, 23 const base::Closure& callback) = 0; 24 25 // Create a profile shortcut for the profile with path |profile_path|, plus 26 // update the original profile shortcut if |profile_path| is the second 27 // profile created. 28 virtual void CreateProfileShortcut(const base::FilePath& profile_path) = 0; 29 30 // Removes any desktop profile shortcuts for the profile corresponding to 31 // |profile_path|. 32 virtual void RemoveProfileShortcuts(const base::FilePath& profile_path) = 0; 33 34 // Checks if a profile at |profile_path| has any shortcuts and invokes 35 // |callback| with the bool result some time later. Does not consider 36 // non-profile specific shortcuts. 37 virtual void HasProfileShortcuts( 38 const base::FilePath& profile_path, 39 const base::Callback<void(bool)>& callback) = 0; 40 41 static bool IsFeatureEnabled(); 42 static ProfileShortcutManager* Create(ProfileManager* manager); 43 44 protected: 45 ProfileShortcutManager(); 46 47 private: 48 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManager); 49}; 50 51#endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_H_ 52