Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_INFO_CACHE_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_OBSERVER_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_OBSERVER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 | 10 |
| 11 class FilePath; | 11 class FilePath; |
| 12 | 12 |
| 13 // This class provides an Observer interface to watch for changes to the | 13 // This class provides an Observer interface to watch for changes to the |
| 14 // ProfileInfoCache. | 14 // ProfileInfoCache. |
| 15 class ProfileInfoCacheObserver { | 15 class ProfileInfoCacheObserver { |
| 16 public: | 16 public: |
| 17 virtual ~ProfileInfoCacheObserver() {} | 17 virtual ~ProfileInfoCacheObserver() {} |
| 18 | 18 |
| 19 virtual void OnProfileAdded( | 19 virtual void OnProfileAdded( |
| 20 const string16& profile_name, | |
| 21 const string16& profile_base_dir, | |
| 22 const FilePath& profile_path, | 20 const FilePath& profile_path, |
| 23 const gfx::Image* avatar_image) = 0; | 21 const string16& profile_base_dir) = 0; |
|
SteveT
2011/12/21 17:12:45
I would love to remove |profile_base_dir| as well,
sail
2011/12/21 17:51:10
Hi Steve, do you actually need the profile_base_di
SteveT
2011/12/21 20:47:03
As I commented above - no we don't, but unfortunat
sail
2011/12/21 21:04:12
I think the Cache key concept should remain privat
| |
| 24 virtual void OnProfileWillBeRemoved( | 22 virtual void OnProfileWillBeRemoved( |
| 25 const string16& profile_name) = 0; | 23 const string16& profile_name) = 0; |
|
sail
2011/12/21 17:51:10
If possible, could you change all the callbacks to
SteveT
2011/12/21 20:47:03
Sounds good. All done - except I had to include th
| |
| 26 virtual void OnProfileWasRemoved( | 24 virtual void OnProfileWasRemoved( |
| 27 const string16& profile_name) = 0; | 25 const string16& profile_name) = 0; |
| 28 virtual void OnProfileNameChanged( | 26 virtual void OnProfileNameChanged( |
| 29 const string16& old_profile_name, | 27 const string16& old_profile_name, |
| 30 const string16& new_profile_name) = 0; | 28 const string16& new_profile_name) = 0; |
| 31 virtual void OnProfileAvatarChanged( | 29 virtual void OnProfileAvatarChanged( |
| 32 const string16& profile_name, | |
| 33 const string16& profile_base_dir, | |
| 34 const FilePath& profile_path, | 30 const FilePath& profile_path, |
| 35 const gfx::Image* avatar_image) = 0; | 31 const string16& profile_base_dir) = 0; |
|
SteveT
2011/12/21 17:12:45
As above.
| |
| 36 | 32 |
| 37 protected: | 33 protected: |
| 38 ProfileInfoCacheObserver() {} | 34 ProfileInfoCacheObserver() {} |
| 39 | 35 |
| 40 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCacheObserver); | 36 DISALLOW_COPY_AND_ASSIGN(ProfileInfoCacheObserver); |
| 41 }; | 37 }; |
| 42 | 38 |
| 43 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_OBSERVER_H_ | 39 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_CACHE_OBSERVER_H_ |
| OLD | NEW |