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

Side by Side Diff: chrome/browser/sync/glue/autofill_profile_syncable_service.cc

Issue 7892048: Autofill: Remove fax number completely. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comment fix. Created 9 years, 3 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 #include "chrome/browser/sync/glue/autofill_profile_syncable_service.h" 5 #include "chrome/browser/sync/glue/autofill_profile_syncable_service.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/tracked.h" 8 #include "base/tracked.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 diff = MergeField(profile, ADDRESS_HOME_CITY, 256 diff = MergeField(profile, ADDRESS_HOME_CITY,
257 specifics.address_home_city()) || diff; 257 specifics.address_home_city()) || diff;
258 diff = MergeField(profile, ADDRESS_HOME_STATE, 258 diff = MergeField(profile, ADDRESS_HOME_STATE,
259 specifics.address_home_state()) || diff; 259 specifics.address_home_state()) || diff;
260 diff = MergeField(profile, ADDRESS_HOME_COUNTRY, 260 diff = MergeField(profile, ADDRESS_HOME_COUNTRY,
261 specifics.address_home_country()) || diff; 261 specifics.address_home_country()) || diff;
262 diff = MergeField(profile, ADDRESS_HOME_ZIP, 262 diff = MergeField(profile, ADDRESS_HOME_ZIP,
263 specifics.address_home_zip()) || diff; 263 specifics.address_home_zip()) || diff;
264 diff = MergeField(profile, EMAIL_ADDRESS, specifics.email_address()) || diff; 264 diff = MergeField(profile, EMAIL_ADDRESS, specifics.email_address()) || diff;
265 diff = MergeField(profile, COMPANY_NAME, specifics.company_name()) || diff; 265 diff = MergeField(profile, COMPANY_NAME, specifics.company_name()) || diff;
266 diff = MergeField(profile, PHONE_FAX_WHOLE_NUMBER,
267 specifics.phone_fax_whole_number()) || diff;
268 diff = MergeField(profile, PHONE_HOME_WHOLE_NUMBER, 266 diff = MergeField(profile, PHONE_HOME_WHOLE_NUMBER,
269 specifics.phone_home_whole_number()) || diff; 267 specifics.phone_home_whole_number()) || diff;
270 return diff; 268 return diff;
271 } 269 }
272 270
273 // static 271 // static
274 void AutofillProfileSyncableService::WriteAutofillProfile( 272 void AutofillProfileSyncableService::WriteAutofillProfile(
275 const AutofillProfile& profile, 273 const AutofillProfile& profile,
276 sync_pb::EntitySpecifics* profile_specifics) { 274 sync_pb::EntitySpecifics* profile_specifics) {
277 sync_pb::AutofillProfileSpecifics* specifics = 275 sync_pb::AutofillProfileSpecifics* specifics =
(...skipping 12 matching lines...) Expand all
290 specifics->set_address_home_city(UTF16ToUTF8(profile.GetInfo( 288 specifics->set_address_home_city(UTF16ToUTF8(profile.GetInfo(
291 ADDRESS_HOME_CITY))); 289 ADDRESS_HOME_CITY)));
292 specifics->set_address_home_state(UTF16ToUTF8(profile.GetInfo( 290 specifics->set_address_home_state(UTF16ToUTF8(profile.GetInfo(
293 ADDRESS_HOME_STATE))); 291 ADDRESS_HOME_STATE)));
294 specifics->set_address_home_country(UTF16ToUTF8(profile.GetInfo( 292 specifics->set_address_home_country(UTF16ToUTF8(profile.GetInfo(
295 ADDRESS_HOME_COUNTRY))); 293 ADDRESS_HOME_COUNTRY)));
296 specifics->set_address_home_zip(UTF16ToUTF8(profile.GetInfo( 294 specifics->set_address_home_zip(UTF16ToUTF8(profile.GetInfo(
297 ADDRESS_HOME_ZIP))); 295 ADDRESS_HOME_ZIP)));
298 specifics->set_email_address(UTF16ToUTF8(profile.GetInfo(EMAIL_ADDRESS))); 296 specifics->set_email_address(UTF16ToUTF8(profile.GetInfo(EMAIL_ADDRESS)));
299 specifics->set_company_name(UTF16ToUTF8(profile.GetInfo(COMPANY_NAME))); 297 specifics->set_company_name(UTF16ToUTF8(profile.GetInfo(COMPANY_NAME)));
300 specifics->set_phone_fax_whole_number(UTF16ToUTF8(profile.GetInfo(
301 PHONE_FAX_WHOLE_NUMBER)));
302 specifics->set_phone_home_whole_number(UTF16ToUTF8(profile.GetInfo( 298 specifics->set_phone_home_whole_number(UTF16ToUTF8(profile.GetInfo(
303 PHONE_HOME_WHOLE_NUMBER))); 299 PHONE_HOME_WHOLE_NUMBER)));
304 } 300 }
305 301
306 void AutofillProfileSyncableService::CreateGUIDToProfileMap( 302 void AutofillProfileSyncableService::CreateGUIDToProfileMap(
307 const std::vector<AutofillProfile*>& profiles, 303 const std::vector<AutofillProfile*>& profiles,
308 GUIDToProfileMap* profile_map) { 304 GUIDToProfileMap* profile_map) {
309 DCHECK(profile_map); 305 DCHECK(profile_map);
310 profile_map->clear(); 306 profile_map->clear();
311 for (size_t i = 0; i < profiles.size(); ++i) 307 for (size_t i = 0; i < profiles.size(); ++i)
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics); 408 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics);
413 } 409 }
414 410
415 AutofillProfileSyncableService::DataBundle::DataBundle() {} 411 AutofillProfileSyncableService::DataBundle::DataBundle() {}
416 412
417 AutofillProfileSyncableService::DataBundle::~DataBundle() { 413 AutofillProfileSyncableService::DataBundle::~DataBundle() {
418 } 414 }
419 415
420 } // namespace browser_sync 416 } // namespace browser_sync
421 417
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/autofill_model_associator.cc ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698