Chromium Code Reviews| Index: chrome/browser/profiles/profile_shortcut_manager_win.h |
| =================================================================== |
| --- chrome/browser/profiles/profile_shortcut_manager_win.h (revision 0) |
| +++ chrome/browser/profiles/profile_shortcut_manager_win.h (revision 0) |
| @@ -0,0 +1,63 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
| +#define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
| +#pragma once |
| + |
| +#include <vector> |
| + |
| +#include "base/callback.h" |
| +#include "base/compiler_specific.h" |
| +#include "base/string16.h" |
| +#include "chrome/browser/profiles/profile_info_cache_observer.h" |
| + |
| +// This class observes the ProfileInfoCache, and makes corresponding changes |
| +// to shortcuts on the user's desktop in Windows systems. |
| +class ProfileShortcutManagerWin : public ProfileInfoCacheObserver { |
| + public: |
| + ProfileShortcutManagerWin(); |
| + ~ProfileShortcutManagerWin(); |
|
Robert Sesek
2011/11/18 14:13:43
virtual
Miranda Callahan
2011/11/18 19:00:36
Done.
|
| + |
| + // ProfileInfoCacheObserver: |
| + virtual void OnProfileAdded(string16 profile_name, |
| + string16 profile_base_dir) OVERRIDE; |
| + virtual void OnProfileRemoved(string16 profile_name) OVERRIDE; |
| + virtual void OnProfileNameChanged(string16 old_profile_name, |
| + string16 new_profile_name) OVERRIDE; |
| + |
| + // Wrap a ShellUtil function that returns a bool so it can be posted in a |
|
Robert Sesek
2011/11/18 14:13:43
private:?
Miranda Callahan
2011/11/18 19:00:36
Done.
|
| + // task to the FILE Thread. |
| + static void CallShellUtilBoolFunction( |
|
Robert Sesek
2011/11/18 14:13:43
This could go in the anon namespace in the .cc bec
Miranda Callahan
2011/11/18 19:00:36
Done.
|
| + const base::Callback<bool(void)>& bool_function); |
| + |
| + // Takes a vector of profile names (for example: "Sparky") and generates a |
| + // vector of shortcut link names (for example: "Chromium (Sparky).lnk"). |
| + static std::vector<string16> GenerateShortcutsFromProfiles( |
| + std::vector<string16> profile_names); |
|
Robert Sesek
2011/11/18 14:13:43
I think these methods can take const-ref arguments
Miranda Callahan
2011/11/18 19:00:36
That's right -- I wondered if that was so. That's
|
| + |
| + // Creates a desktop shortcut to open Chrome with the given profile name and |
| + // directory. Iff |create|, create shortcut if it doesn't already exist. Must |
| + // be called on the FILE thread. |
| + static void CreateChromeDesktopShortcutForProfile( |
| + string16 profile_name, |
| + string16 directory, |
| + bool create); |
| + |
| + // Renames an existing Chrome desktop profile shortcut. Must be called on the |
| + // FILE thread. |
| + static void RenameChromeDesktopShortcutForProfile( |
| + string16 old_profile_name, |
| + string16 new_profile_name); |
| + |
| + // Updates the arguments to a Chrome desktop shortcut for a profile. Must be |
| + // called on the FILE thread. |
| + static void UpdateChromeDesktopShortcutForProfile( |
| + string16 shortcut, |
| + string16 arguments); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ |
| Property changes on: chrome\browser\profiles\profile_shortcut_manager_win.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |