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

Unified Diff: chrome/browser/autofill/personal_data_manager.h

Issue 7541065: autofill: Refactor PersonalDataManager::Observer into its own header file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autofill/personal_data_manager.h
diff --git a/chrome/browser/autofill/personal_data_manager.h b/chrome/browser/autofill/personal_data_manager.h
index 3e945ec5bd7eea881bf421fe1f59231521c6518e..00a687684748608fe2399a2267853381a6559db3 100644
--- a/chrome/browser/autofill/personal_data_manager.h
+++ b/chrome/browser/autofill/personal_data_manager.h
@@ -24,6 +24,7 @@
class AutofillManager;
class AutofillMetrics;
class FormStructure;
+class PersonalDataManagerObserver;
class Profile;
// Handles loading and saving Autofill profile information to the web database.
@@ -34,27 +35,15 @@ class PersonalDataManager
public ProfileSyncServiceObserver,
public base::RefCountedThreadSafe<PersonalDataManager> {
public:
- // An interface the PersonalDataManager uses to notify its clients (observers)
- // when it has finished loading personal data from the web database. Register
- // the observer via PersonalDataManager::SetObserver.
- class Observer {
- public:
- // Notifies the observer that the PersonalDataManager changed in some way.
- virtual void OnPersonalDataChanged() = 0;
-
- protected:
- virtual ~Observer() {}
- };
-
// WebDataServiceConsumer implementation:
virtual void OnWebDataServiceRequestDone(WebDataService::Handle h,
const WDTypedResult* result);
// Sets the listener to be notified of PersonalDataManager events.
- virtual void SetObserver(PersonalDataManager::Observer* observer);
+ virtual void SetObserver(PersonalDataManagerObserver* observer);
// Removes |observer| as the observer of this PersonalDataManager.
- virtual void RemoveObserver(PersonalDataManager::Observer* observer);
+ virtual void RemoveObserver(PersonalDataManagerObserver* observer);
// ProfileSyncServiceObserver:
virtual void OnStateChanged();
@@ -234,7 +223,7 @@ class PersonalDataManager
WebDataService::Handle pending_creditcards_query_;
// The observers.
- ObserverList<Observer> observers_;
+ ObserverList<PersonalDataManagerObserver> observers_;
private:
// For logging UMA metrics. Overridden by metrics tests.
« no previous file with comments | « chrome/browser/autofill/autofill_ie_toolbar_import_win.cc ('k') | chrome/browser/autofill/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698