| 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/extension_model_associator.h" | 5 #include "chrome/browser/sync/glue/extension_model_associator.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "chrome/browser/extensions/extension_sync_data.h" |
| 8 #include "chrome/browser/sync/engine/syncapi.h" | 9 #include "chrome/browser/sync/engine/syncapi.h" |
| 9 #include "chrome/browser/sync/glue/extension_data.h" | |
| 10 #include "chrome/browser/sync/glue/extension_sync_traits.h" | 10 #include "chrome/browser/sync/glue/extension_sync_traits.h" |
| 11 #include "chrome/browser/sync/glue/extension_sync.h" | 11 #include "chrome/browser/sync/glue/extension_sync.h" |
| 12 #include "chrome/browser/sync/profile_sync_service.h" | 12 #include "chrome/browser/sync/profile_sync_service.h" |
| 13 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" | 13 #include "chrome/browser/sync/protocol/extension_specifics.pb.h" |
| 14 #include "chrome/browser/sync/syncable/nigori_util.h" | 14 #include "chrome/browser/sync/syncable/nigori_util.h" |
| 15 #include "content/browser/browser_thread.h" | 15 #include "content/browser/browser_thread.h" |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace browser_sync { |
| 18 | 18 |
| 19 ExtensionModelAssociator::ExtensionModelAssociator( | 19 ExtensionModelAssociator::ExtensionModelAssociator( |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 bool ExtensionModelAssociator::CryptoReadyIfNecessary() { | 60 bool ExtensionModelAssociator::CryptoReadyIfNecessary() { |
| 61 // We only access the cryptographer while holding a transaction. | 61 // We only access the cryptographer while holding a transaction. |
| 62 sync_api::ReadTransaction trans(user_share_); | 62 sync_api::ReadTransaction trans(user_share_); |
| 63 const syncable::ModelTypeSet& encrypted_types = | 63 const syncable::ModelTypeSet& encrypted_types = |
| 64 GetEncryptedDataTypes(trans.GetWrappedTrans()); | 64 GetEncryptedDataTypes(trans.GetWrappedTrans()); |
| 65 return encrypted_types.count(traits_.model_type) == 0 || | 65 return encrypted_types.count(traits_.model_type) == 0 || |
| 66 trans.GetCryptographer()->is_ready(); | 66 trans.GetCryptographer()->is_ready(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 } // namespace browser_sync | 69 } // namespace browser_sync |
| OLD | NEW |