| OLD | NEW |
| 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 #include "chrome/browser/sync/glue/autofill_model_associator.h" | 5 #include "chrome/browser/sync/glue/autofill_model_associator.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 Associate(&tag, node.GetId()); | 88 Associate(&tag, node.GetId()); |
| 89 } else { | 89 } else { |
| 90 sync_api::WriteNode node(write_trans); | 90 sync_api::WriteNode node(write_trans); |
| 91 if (!node.InitUniqueByCreation(syncable::AUTOFILL, | 91 if (!node.InitUniqueByCreation(syncable::AUTOFILL, |
| 92 autofill_root, tag)) { | 92 autofill_root, tag)) { |
| 93 LOG(ERROR) << "Failed to create autofill sync node."; | 93 LOG(ERROR) << "Failed to create autofill sync node."; |
| 94 return false; | 94 return false; |
| 95 } | 95 } |
| 96 node.SetTitle(UTF16ToWide(ix->key().name() + ix->key().value())); | 96 node.SetTitle(UTF8ToWide(tag)); |
| 97 AutofillChangeProcessor::WriteAutofillEntry(*ix, &node); | 97 AutofillChangeProcessor::WriteAutofillEntry(*ix, &node); |
| 98 Associate(&tag, node.GetId()); | 98 Associate(&tag, node.GetId()); |
| 99 } | 99 } |
| 100 | 100 |
| 101 current_entries->insert(ix->key()); | 101 current_entries->insert(ix->key()); |
| 102 } | 102 } |
| 103 return true; | 103 return true; |
| 104 } | 104 } |
| 105 | 105 |
| 106 bool AutofillModelAssociator::TraverseAndAssociateChromeAutoFillProfiles( | 106 bool AutofillModelAssociator::TraverseAndAssociateChromeAutoFillProfiles( |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 diff = MergeField(p, EMAIL_ADDRESS, s.email_address()) || diff; | 497 diff = MergeField(p, EMAIL_ADDRESS, s.email_address()) || diff; |
| 498 diff = MergeField(p, COMPANY_NAME, s.company_name()) || diff; | 498 diff = MergeField(p, COMPANY_NAME, s.company_name()) || diff; |
| 499 diff = MergeField(p, PHONE_FAX_WHOLE_NUMBER, s.phone_fax_whole_number()) | 499 diff = MergeField(p, PHONE_FAX_WHOLE_NUMBER, s.phone_fax_whole_number()) |
| 500 || diff; | 500 || diff; |
| 501 diff = MergeField(p, PHONE_HOME_WHOLE_NUMBER, s.phone_home_whole_number()) | 501 diff = MergeField(p, PHONE_HOME_WHOLE_NUMBER, s.phone_home_whole_number()) |
| 502 || diff; | 502 || diff; |
| 503 return diff; | 503 return diff; |
| 504 } | 504 } |
| 505 | 505 |
| 506 } // namespace browser_sync | 506 } // namespace browser_sync |
| OLD | NEW |