OLD | NEW |
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 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" | 5 #include "chrome/browser/webdata/autofill_profile_syncable_service.h" |
6 | 6 |
7 #include "base/guid.h" | 7 #include "base/guid.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 << " Guid: " << change.key(); | 493 << " Guid: " << change.key(); |
494 } | 494 } |
495 } | 495 } |
496 | 496 |
497 syncer::SyncData AutofillProfileSyncableService::CreateData( | 497 syncer::SyncData AutofillProfileSyncableService::CreateData( |
498 const AutofillProfile& profile) { | 498 const AutofillProfile& profile) { |
499 sync_pb::EntitySpecifics specifics; | 499 sync_pb::EntitySpecifics specifics; |
500 WriteAutofillProfile(profile, &specifics); | 500 WriteAutofillProfile(profile, &specifics); |
501 return | 501 return |
502 syncer::SyncData::CreateLocalData( | 502 syncer::SyncData::CreateLocalData( |
503 profile.guid(), profile.guid(), specifics); | 503 profile.guid(), profile.guid(), specifics, false); |
504 } | 504 } |
505 | 505 |
506 bool AutofillProfileSyncableService::UpdateField( | 506 bool AutofillProfileSyncableService::UpdateField( |
507 AutofillFieldType field_type, | 507 AutofillFieldType field_type, |
508 const std::string& new_value, | 508 const std::string& new_value, |
509 AutofillProfile* autofill_profile) { | 509 AutofillProfile* autofill_profile) { |
510 if (UTF16ToUTF8(autofill_profile->GetRawInfo(field_type)) == new_value) | 510 if (UTF16ToUTF8(autofill_profile->GetRawInfo(field_type)) == new_value) |
511 return false; | 511 return false; |
512 autofill_profile->SetRawInfo(field_type, UTF8ToUTF16(new_value)); | 512 autofill_profile->SetRawInfo(field_type, UTF8ToUTF16(new_value)); |
513 return true; | 513 return true; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 546 } |
547 | 547 |
548 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { | 548 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { |
549 return web_data_service_->GetDatabase()->GetAutofillTable(); | 549 return web_data_service_->GetDatabase()->GetAutofillTable(); |
550 } | 550 } |
551 | 551 |
552 AutofillProfileSyncableService::DataBundle::DataBundle() {} | 552 AutofillProfileSyncableService::DataBundle::DataBundle() {} |
553 | 553 |
554 AutofillProfileSyncableService::DataBundle::~DataBundle() { | 554 AutofillProfileSyncableService::DataBundle::~DataBundle() { |
555 } | 555 } |
OLD | NEW |