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

Side by Side Diff: chrome/browser/autofill/personal_data_manager.h

Issue 6213002: Propagate correct data to the Toolbar servers (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_AUTOFILL_PERSONAL_DATA_MANAGER_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_
6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ 6 #define CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // Re-loads profiles and credit cards from the WebDatabase asynchronously. 152 // Re-loads profiles and credit cards from the WebDatabase asynchronously.
153 // In the general case, this is a no-op and will re-create the same 153 // In the general case, this is a no-op and will re-create the same
154 // in-memory model as existed prior to the call. If any change occurred to 154 // in-memory model as existed prior to the call. If any change occurred to
155 // profiles in the WebDatabase directly, as is the case if the browser sync 155 // profiles in the WebDatabase directly, as is the case if the browser sync
156 // engine processed a change from the cloud, we will learn of these as a 156 // engine processed a change from the cloud, we will learn of these as a
157 // result of this call. 157 // result of this call.
158 // 158 //
159 // Also see SetProfile for more details. 159 // Also see SetProfile for more details.
160 virtual void Refresh(); 160 virtual void Refresh();
161 161
162 // Gets hexadecimal string of a bitmask of the data available in profile with
163 // |profile_guid| guid and credit card with |cc_guid| guid.
164 std::string PresentData(const std::string& profile_guid,
165 const std::string& cc_guid);
166
162 // Kicks off asynchronous loading of profiles and credit cards. 167 // Kicks off asynchronous loading of profiles and credit cards.
163 void Init(Profile* profile); 168 void Init(Profile* profile);
164 169
165 protected: 170 protected:
Ilya Sherman 2011/01/11 23:17:37 nit: Do we really want all of the below code to be
GeorgeY 2011/01/13 23:22:28 Probably not, but this is for another cl - this on
166 // Make sure that only Profile and certain tests can create an instance of 171 // Make sure that only Profile and certain tests can create an instance of
167 // PersonalDataManager. 172 // PersonalDataManager.
168 friend class base::RefCountedThreadSafe<PersonalDataManager>; 173 friend class base::RefCountedThreadSafe<PersonalDataManager>;
169 friend class PersonalDataManagerTest; 174 friend class PersonalDataManagerTest;
170 friend class ProfileImpl; 175 friend class ProfileImpl;
171 friend class ProfileSyncServiceAutofillTest; 176 friend class ProfileSyncServiceAutofillTest;
172 177
173 PersonalDataManager(); 178 PersonalDataManager();
174 ~PersonalDataManager(); 179 ~PersonalDataManager();
175 180
(...skipping 25 matching lines...) Expand all
201 206
202 // Ensures that all profile labels are unique by appending an increasing digit 207 // Ensures that all profile labels are unique by appending an increasing digit
203 // to the end of non-unique labels. 208 // to the end of non-unique labels.
204 // TODO(jhawkins): Create a new interface for labeled entities and turn these 209 // TODO(jhawkins): Create a new interface for labeled entities and turn these
205 // two methods into one. 210 // two methods into one.
206 void SetUniqueCreditCardLabels(std::vector<CreditCard>* credit_cards); 211 void SetUniqueCreditCardLabels(std::vector<CreditCard>* credit_cards);
207 212
208 // Saves |imported_profile_| to the WebDB if it exists. 213 // Saves |imported_profile_| to the WebDB if it exists.
209 void SaveImportedProfile(); 214 void SaveImportedProfile();
210 215
216 // Helper for PresentData(): sets present bits in |binary_data_mask|
217 // for the |profile|.
218 void SetDataPresenseBits(FormGroup const* profile, uint8* binary_data_mask);
Ilya Sherman 2011/01/11 23:17:37 nit: "Presence", not "Presense"
GeorgeY 2011/01/13 23:22:28 Fixed
219
211 // The profile hosting this PersonalDataManager. 220 // The profile hosting this PersonalDataManager.
212 Profile* profile_; 221 Profile* profile_;
213 222
214 // True if personal data has been loaded from the web database. 223 // True if personal data has been loaded from the web database.
215 bool is_data_loaded_; 224 bool is_data_loaded_;
216 225
217 // The loaded web profiles. 226 // The loaded web profiles.
218 ScopedVector<AutoFillProfile> web_profiles_; 227 ScopedVector<AutoFillProfile> web_profiles_;
219 228
220 // Auxiliary profiles. 229 // Auxiliary profiles.
(...skipping 23 matching lines...) Expand all
244 WebDataService::Handle pending_profiles_query_; 253 WebDataService::Handle pending_profiles_query_;
245 WebDataService::Handle pending_creditcards_query_; 254 WebDataService::Handle pending_creditcards_query_;
246 255
247 // The observers. 256 // The observers.
248 ObserverList<Observer> observers_; 257 ObserverList<Observer> observers_;
249 258
250 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager); 259 DISALLOW_COPY_AND_ASSIGN(PersonalDataManager);
251 }; 260 };
252 261
253 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_ 262 #endif // CHROME_BROWSER_AUTOFILL_PERSONAL_DATA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698