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

Side by Side Diff: components/autofill/browser/webdata/autofill_webdata_service.h

Issue 14103021: Use Observer to notify of WebDB load instead of callbacks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix WIN builds Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ 5 #ifndef COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_
6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ 6 #define COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void AddObserver(AutofillWebDataServiceObserverOnDBThread* observer); 82 void AddObserver(AutofillWebDataServiceObserverOnDBThread* observer);
83 void RemoveObserver(AutofillWebDataServiceObserverOnDBThread* observer); 83 void RemoveObserver(AutofillWebDataServiceObserverOnDBThread* observer);
84 84
85 void AddObserver(AutofillWebDataServiceObserverOnUIThread* observer); 85 void AddObserver(AutofillWebDataServiceObserverOnUIThread* observer);
86 void RemoveObserver(AutofillWebDataServiceObserverOnUIThread* observer); 86 void RemoveObserver(AutofillWebDataServiceObserverOnUIThread* observer);
87 87
88 protected: 88 protected:
89 virtual ~AutofillWebDataService(); 89 virtual ~AutofillWebDataService();
90 90
91 // WebDataServiceBase overrides:
92 virtual void NotifyDatabaseLoadedOnUIThread() OVERRIDE;
93
94 private: 91 private:
95 WebDatabase::State AddFormElementsImpl( 92 WebDatabase::State AddFormElementsImpl(
96 const std::vector<FormFieldData>& fields, WebDatabase* db); 93 const std::vector<FormFieldData>& fields, WebDatabase* db);
97 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl( 94 scoped_ptr<WDTypedResult> GetFormValuesForElementNameImpl(
98 const base::string16& name, const base::string16& prefix, int limit, 95 const base::string16& name, const base::string16& prefix, int limit,
99 WebDatabase* db); 96 WebDatabase* db);
100 WebDatabase::State RemoveFormElementsAddedBetweenImpl( 97 WebDatabase::State RemoveFormElementsAddedBetweenImpl(
101 const base::Time& delete_begin, const base::Time& delete_end, 98 const base::Time& delete_begin, const base::Time& delete_end,
102 WebDatabase* db); 99 WebDatabase* db);
103 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db); 100 WebDatabase::State RemoveExpiredFormElementsImpl(WebDatabase* db);
(...skipping 26 matching lines...) Expand all
130 127
131 ObserverList<AutofillWebDataServiceObserverOnDBThread> db_observer_list_; 128 ObserverList<AutofillWebDataServiceObserverOnDBThread> db_observer_list_;
132 ObserverList<AutofillWebDataServiceObserverOnUIThread> ui_observer_list_; 129 ObserverList<AutofillWebDataServiceObserverOnUIThread> ui_observer_list_;
133 130
134 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataService); 131 DISALLOW_COPY_AND_ASSIGN(AutofillWebDataService);
135 }; 132 };
136 133
137 } // namespace autofill 134 } // namespace autofill
138 135
139 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_ 136 #endif // COMPONENTS_AUTOFILL_BROWSER_WEBDATA_AUTOFILL_WEBDATA_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/webdata/web_data_service_factory.cc ('k') | components/autofill/browser/webdata/autofill_webdata_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698