| 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/session_model_associator.h" | 5 #include "chrome/browser/sync/glue/session_model_associator.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1240 const TabNavigation navigation = *i; | 1240 const TabNavigation navigation = *i; |
| 1241 sync_pb::TabNavigation* tab_navigation = | 1241 sync_pb::TabNavigation* tab_navigation = |
| 1242 session_tab->add_navigation(); | 1242 session_tab->add_navigation(); |
| 1243 PopulateSessionSpecificsNavigation(&navigation, tab_navigation); | 1243 PopulateSessionSpecificsNavigation(&navigation, tab_navigation); |
| 1244 } | 1244 } |
| 1245 } | 1245 } |
| 1246 | 1246 |
| 1247 bool SessionModelAssociator::CryptoReadyIfNecessary() { | 1247 bool SessionModelAssociator::CryptoReadyIfNecessary() { |
| 1248 // We only access the cryptographer while holding a transaction. | 1248 // We only access the cryptographer while holding a transaction. |
| 1249 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 1249 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
| 1250 syncable::ModelTypeSet encrypted_types; | 1250 const syncable::ModelEnumSet encrypted_types = |
| 1251 encrypted_types = sync_api::GetEncryptedTypes(&trans); | 1251 sync_api::GetEncryptedTypes(&trans); |
| 1252 return encrypted_types.count(SESSIONS) == 0 || | 1252 return !encrypted_types.Has(SESSIONS) || |
| 1253 sync_service_->IsCryptographerReady(&trans); | 1253 sync_service_->IsCryptographerReady(&trans); |
| 1254 } | 1254 } |
| 1255 | 1255 |
| 1256 } // namespace browser_sync | 1256 } // namespace browser_sync |
| OLD | NEW |