OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/theme_model_associator.h" | 5 #include "chrome/browser/sync/glue/theme_model_associator.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 // The sync model has user created nodes iff the themes folder has | 103 // The sync model has user created nodes iff the themes folder has |
104 // any children. | 104 // any children. |
105 *has_nodes = root.HasChildren(); | 105 *has_nodes = root.HasChildren(); |
106 return true; | 106 return true; |
107 } | 107 } |
108 | 108 |
109 bool ThemeModelAssociator::CryptoReadyIfNecessary() { | 109 bool ThemeModelAssociator::CryptoReadyIfNecessary() { |
110 // We only access the cryptographer while holding a transaction. | 110 // We only access the cryptographer while holding a transaction. |
111 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 111 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
112 const syncer::ModelTypeSet encrypted_types = | 112 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); |
113 syncer::GetEncryptedTypes(&trans); | |
114 return !encrypted_types.Has(syncer::THEMES) || | 113 return !encrypted_types.Has(syncer::THEMES) || |
115 sync_service_->IsCryptographerReady(&trans); | 114 sync_service_->IsCryptographerReady(&trans); |
116 } | 115 } |
117 | 116 |
118 } // namespace browser_sync | 117 } // namespace browser_sync |
OLD | NEW |