Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/profiles/profile_shortcut_manager_win.h

Issue 9271018: Merge 115621 - Refactor ProfileInfoCacheObserver interface and usage thereof. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/963/src/
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WIN_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "chrome/browser/profiles/profile_info_cache_observer.h" 12 #include "chrome/browser/profiles/profile_info_cache_observer.h"
13 13
14 // This class observes the ProfileInfoCache, and makes corresponding changes 14 // This class observes the ProfileInfoCache, and makes corresponding changes
15 // to shortcuts on the user's desktop in Windows systems. 15 // to shortcuts on the user's desktop in Windows systems.
16 class ProfileShortcutManagerWin : public ProfileInfoCacheObserver { 16 class ProfileShortcutManagerWin : public ProfileInfoCacheObserver {
17 public: 17 public:
18 ProfileShortcutManagerWin(); 18 ProfileShortcutManagerWin();
19 virtual ~ProfileShortcutManagerWin(); 19 virtual ~ProfileShortcutManagerWin();
20 20
21 // ProfileInfoCacheObserver: 21 // ProfileInfoCacheObserver:
22 virtual void OnProfileAdded( 22 virtual void OnProfileAdded(const FilePath& profile_path) OVERRIDE;
23 const string16& profile_name, 23 virtual void OnProfileWillBeRemoved(
24 const string16& profile_base_dir, 24 const FilePath& profile_path) OVERRIDE;
25 virtual void OnProfileWasRemoved(
25 const FilePath& profile_path, 26 const FilePath& profile_path,
26 const gfx::Image* avatar_image) OVERRIDE;
27 virtual void OnProfileWillBeRemoved(
28 const string16& profile_name) OVERRIDE;
29 virtual void OnProfileWasRemoved(
30 const string16& profile_name) OVERRIDE; 27 const string16& profile_name) OVERRIDE;
31 virtual void OnProfileNameChanged( 28 virtual void OnProfileNameChanged(
32 const string16& old_profile_name,
33 const string16& new_profile_name) OVERRIDE;
34 virtual void OnProfileAvatarChanged(
35 const string16& profile_name,
36 const string16& profile_base_dir,
37 const FilePath& profile_path, 29 const FilePath& profile_path,
38 const gfx::Image* avatar_image) OVERRIDE; 30 const string16& old_profile_name) OVERRIDE;
31 virtual void OnProfileAvatarChanged(const FilePath& profile_path) OVERRIDE;
39 32
40 // Takes a vector of profile names (for example: "Sparky") and generates a 33 // Takes a vector of profile names (for example: "Sparky") and generates a
41 // vector of shortcut link names (for example: "Chromium (Sparky).lnk"). 34 // vector of shortcut link names (for example: "Chromium (Sparky).lnk").
42 static std::vector<string16> GenerateShortcutsFromProfiles( 35 static std::vector<string16> GenerateShortcutsFromProfiles(
43 const std::vector<string16>& profile_names); 36 const std::vector<string16>& profile_names);
44 37
45 private: 38 private:
46 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin); 39 DISALLOW_COPY_AND_ASSIGN(ProfileShortcutManagerWin);
47 }; 40 };
48 41
49 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_ 42 #endif // CHROME_BROWSER_PROFILES_PROFILE_SHORTCUT_MANAGER_WIN_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_unittest.cc ('k') | chrome/browser/profiles/profile_shortcut_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698