| 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/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/autofill/autofill_profile.h" | 10 #include "chrome/browser/autofill/autofill_profile.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 new_changes.push_back(SyncChange(SyncChange::ACTION_DELETE, | 451 new_changes.push_back(SyncChange(SyncChange::ACTION_DELETE, |
| 452 CreateData(empty_profile))); | 452 CreateData(empty_profile))); |
| 453 profiles_map_.erase(change.key()); | 453 profiles_map_.erase(change.key()); |
| 454 break; | 454 break; |
| 455 } | 455 } |
| 456 default: | 456 default: |
| 457 NOTREACHED(); | 457 NOTREACHED(); |
| 458 } | 458 } |
| 459 SyncError error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes); | 459 SyncError error = sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes); |
| 460 if (error.IsSet()) { | 460 if (error.IsSet()) { |
| 461 DLOG(WARNING) << "[AUTOFILL SYNC]" | 461 // TODO(isherman): Investigating http://crbug.com/121592 |
| 462 << " Failed processing change:" | 462 VLOG(1) << "[AUTOFILL SYNC] " |
| 463 << " Error:" << error.message() | 463 << "Failed processing change:\n" |
| 464 << " Guid:" << change.key(); | 464 << " Error: " << error.message() << "\n" |
| 465 << " Guid: " << change.key(); |
| 465 } | 466 } |
| 466 } | 467 } |
| 467 | 468 |
| 468 SyncData AutofillProfileSyncableService::CreateData( | 469 SyncData AutofillProfileSyncableService::CreateData( |
| 469 const AutofillProfile& profile) { | 470 const AutofillProfile& profile) { |
| 470 sync_pb::EntitySpecifics specifics; | 471 sync_pb::EntitySpecifics specifics; |
| 471 WriteAutofillProfile(profile, &specifics); | 472 WriteAutofillProfile(profile, &specifics); |
| 472 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics); | 473 return SyncData::CreateLocalData(profile.guid(), profile.guid(), specifics); |
| 473 } | 474 } |
| 474 | 475 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 516 } |
| 516 | 517 |
| 517 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { | 518 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { |
| 518 return web_data_service_->GetDatabase()->GetAutofillTable(); | 519 return web_data_service_->GetDatabase()->GetAutofillTable(); |
| 519 } | 520 } |
| 520 | 521 |
| 521 AutofillProfileSyncableService::DataBundle::DataBundle() {} | 522 AutofillProfileSyncableService::DataBundle::DataBundle() {} |
| 522 | 523 |
| 523 AutofillProfileSyncableService::DataBundle::~DataBundle() { | 524 AutofillProfileSyncableService::DataBundle::~DataBundle() { |
| 524 } | 525 } |
| OLD | NEW |