| OLD | NEW |
| 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/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" |
| 11 #include "chrome/browser/autofill/form_group.h" | 11 #include "chrome/browser/autofill/form_group.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/sync/api/sync_error.h" | 13 #include "chrome/browser/sync/api/sync_error.h" |
| 14 #include "chrome/browser/webdata/autofill_table.h" | 14 #include "chrome/browser/webdata/autofill_table.h" |
| 15 #include "chrome/browser/webdata/web_database.h" | 15 #include "chrome/browser/webdata/web_database.h" |
| 16 #include "chrome/browser/webdata/web_data_service.h" | 16 #include "chrome/browser/webdata/web_data_service.h" |
| 17 #include "chrome/common/chrome_notification_types.h" | 17 #include "chrome/common/chrome_notification_types.h" |
| 18 #include "chrome/common/guid.h" | 18 #include "chrome/common/guid.h" |
| 19 #include "content/browser/browser_thread.h" | 19 #include "content/browser/browser_thread.h" |
| 20 #include "content/common/notification_service.h" | 20 #include "content/public/browser/notification_details.h" |
| 21 #include "content/public/browser/notification_source.h" |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 // Helper to compare the local value and cloud value of a field, merge into | 25 // Helper to compare the local value and cloud value of a field, merge into |
| 25 // the local value if they differ, and return whether the merge happened. | 26 // the local value if they differ, and return whether the merge happened. |
| 26 bool MergeField(FormGroup* form_group, | 27 bool MergeField(FormGroup* form_group, |
| 27 AutofillFieldType field_type, | 28 AutofillFieldType field_type, |
| 28 const std::string& specifics_field) { | 29 const std::string& specifics_field) { |
| 29 if (UTF16ToUTF8(form_group->GetInfo(field_type)) == specifics_field) | 30 if (UTF16ToUTF8(form_group->GetInfo(field_type)) == specifics_field) |
| 30 return false; | 31 return false; |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 } | 412 } |
| 412 | 413 |
| 413 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { | 414 AutofillTable* AutofillProfileSyncableService::GetAutofillTable() const { |
| 414 return web_data_service_->GetDatabase()->GetAutofillTable(); | 415 return web_data_service_->GetDatabase()->GetAutofillTable(); |
| 415 } | 416 } |
| 416 | 417 |
| 417 AutofillProfileSyncableService::DataBundle::DataBundle() {} | 418 AutofillProfileSyncableService::DataBundle::DataBundle() {} |
| 418 | 419 |
| 419 AutofillProfileSyncableService::DataBundle::~DataBundle() { | 420 AutofillProfileSyncableService::DataBundle::~DataBundle() { |
| 420 } | 421 } |
| OLD | NEW |