| 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/sync/glue/autofill_profile_model_associator.h" | 5 #include "chrome/browser/sync/glue/autofill_profile_model_associator.h" |
| 6 | 6 |
| 7 #include "base/tracked.h" | 7 #include "base/tracked.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/sync/api/sync_error.h" | 9 #include "chrome/browser/sync/api/sync_error.h" |
| 10 #include "chrome/browser/sync/glue/autofill_profile_change_processor.h" | 10 #include "chrome/browser/sync/glue/autofill_profile_change_processor.h" |
| 11 #include "chrome/browser/sync/glue/do_optimistic_refresh_task.h" | 11 #include "chrome/browser/sync/glue/do_optimistic_refresh_task.h" |
| 12 #include "chrome/browser/sync/internal_api/read_node.h" |
| 13 #include "chrome/browser/sync/internal_api/read_transaction.h" |
| 14 #include "chrome/browser/sync/internal_api/write_node.h" |
| 15 #include "chrome/browser/sync/internal_api/write_transaction.h" |
| 12 #include "chrome/browser/sync/profile_sync_service.h" | 16 #include "chrome/browser/sync/profile_sync_service.h" |
| 13 #include "chrome/browser/webdata/autofill_table.h" | 17 #include "chrome/browser/webdata/autofill_table.h" |
| 14 #include "chrome/browser/webdata/web_database.h" | 18 #include "chrome/browser/webdata/web_database.h" |
| 15 #include "chrome/common/guid.h" | 19 #include "chrome/common/guid.h" |
| 16 | 20 |
| 17 using sync_api::ReadNode; | 21 using sync_api::ReadNode; |
| 18 namespace browser_sync { | 22 namespace browser_sync { |
| 19 | 23 |
| 20 const char kAutofillProfileTag[] = "google_chrome_autofill_profiles"; | 24 const char kAutofillProfileTag[] = "google_chrome_autofill_profiles"; |
| 21 | 25 |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 bool AutofillProfileModelAssociator::CryptoReadyIfNecessary() { | 509 bool AutofillProfileModelAssociator::CryptoReadyIfNecessary() { |
| 506 // We only access the cryptographer while holding a transaction. | 510 // We only access the cryptographer while holding a transaction. |
| 507 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 511 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
| 508 syncable::ModelTypeSet encrypted_types; | 512 syncable::ModelTypeSet encrypted_types; |
| 509 encrypted_types = sync_api::GetEncryptedTypes(&trans); | 513 encrypted_types = sync_api::GetEncryptedTypes(&trans); |
| 510 return encrypted_types.count(syncable::AUTOFILL_PROFILE) == 0 || | 514 return encrypted_types.count(syncable::AUTOFILL_PROFILE) == 0 || |
| 511 sync_service_->IsCryptographerReady(&trans); | 515 sync_service_->IsCryptographerReady(&trans); |
| 512 } | 516 } |
| 513 | 517 |
| 514 } // namespace browser_sync | 518 } // namespace browser_sync |
| OLD | NEW |