| 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_associator2.h" | 5 #include "chrome/browser/sync/glue/autofill_model_associator2.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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 AutoLock lock(abort_association_pending_lock_); | 414 AutoLock lock(abort_association_pending_lock_); |
| 415 abort_association_pending_ = true; | 415 abort_association_pending_ = true; |
| 416 } | 416 } |
| 417 | 417 |
| 418 const std::string* | 418 const std::string* |
| 419 AutofillModelAssociator2::GetChromeNodeFromSyncId(int64 sync_id) { | 419 AutofillModelAssociator2::GetChromeNodeFromSyncId(int64 sync_id) { |
| 420 return NULL; | 420 return NULL; |
| 421 } | 421 } |
| 422 | 422 |
| 423 bool AutofillModelAssociator2::InitSyncNodeFromChromeId( | 423 bool AutofillModelAssociator2::InitSyncNodeFromChromeId( |
| 424 std::string node_id, | 424 const std::string& node_id, |
| 425 sync_api::BaseNode* sync_node) { | 425 sync_api::BaseNode* sync_node) { |
| 426 return false; | 426 return false; |
| 427 } | 427 } |
| 428 | 428 |
| 429 int64 AutofillModelAssociator2::GetSyncIdFromChromeId( | 429 int64 AutofillModelAssociator2::GetSyncIdFromChromeId( |
| 430 const std::string autofill) { | 430 const std::string& autofill) { |
| 431 AutofillToSyncIdMap::const_iterator iter = id_map_.find(autofill); | 431 AutofillToSyncIdMap::const_iterator iter = id_map_.find(autofill); |
| 432 return iter == id_map_.end() ? sync_api::kInvalidId : iter->second; | 432 return iter == id_map_.end() ? sync_api::kInvalidId : iter->second; |
| 433 } | 433 } |
| 434 | 434 |
| 435 void AutofillModelAssociator2::Associate( | 435 void AutofillModelAssociator2::Associate( |
| 436 const std::string* autofill, int64 sync_id) { | 436 const std::string* autofill, int64 sync_id) { |
| 437 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 437 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
| 438 DCHECK_NE(sync_api::kInvalidId, sync_id); | 438 DCHECK_NE(sync_api::kInvalidId, sync_id); |
| 439 DCHECK(id_map_.find(*autofill) == id_map_.end()); | 439 DCHECK(id_map_.find(*autofill) == id_map_.end()); |
| 440 DCHECK(id_map_inverse_.find(sync_id) == id_map_inverse_.end()); | 440 DCHECK(id_map_inverse_.find(sync_id) == id_map_inverse_.end()); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 diff = MergeField2(p, COMPANY_NAME, s.company_name()) || diff; | 538 diff = MergeField2(p, COMPANY_NAME, s.company_name()) || diff; |
| 539 diff = MergeField2(p, PHONE_FAX_WHOLE_NUMBER, s.phone_fax_whole_number()) | 539 diff = MergeField2(p, PHONE_FAX_WHOLE_NUMBER, s.phone_fax_whole_number()) |
| 540 || diff; | 540 || diff; |
| 541 diff = MergeField2(p, PHONE_HOME_WHOLE_NUMBER, s.phone_home_whole_number()) | 541 diff = MergeField2(p, PHONE_HOME_WHOLE_NUMBER, s.phone_home_whole_number()) |
| 542 || diff; | 542 || diff; |
| 543 return diff; | 543 return diff; |
| 544 } | 544 } |
| 545 | 545 |
| 546 } // namespace browser_sync | 546 } // namespace browser_sync |
| 547 | 547 |
| OLD | NEW |