OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/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 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/strings/utf_string_conversions.h" |
15 #include "base/threading/sequenced_worker_pool.h" | 16 #include "base/threading/sequenced_worker_pool.h" |
16 #include "base/utf_string_conversions.h" | |
17 #include "chrome/browser/favicon/favicon_service_factory.h" | 17 #include "chrome/browser/favicon/favicon_service_factory.h" |
18 #include "chrome/browser/history/history_service.h" | 18 #include "chrome/browser/history/history_service.h" |
19 #include "chrome/browser/managed_mode/managed_user_service.h" | 19 #include "chrome/browser/managed_mode/managed_user_service.h" |
20 #include "chrome/browser/prefs/pref_service_syncable.h" | 20 #include "chrome/browser/prefs/pref_service_syncable.h" |
21 #include "chrome/browser/profiles/profile.h" | 21 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/sessions/session_id.h" | 22 #include "chrome/browser/sessions/session_id.h" |
23 #include "chrome/browser/sync/glue/device_info.h" | 23 #include "chrome/browser/sync/glue/device_info.h" |
24 #include "chrome/browser/sync/glue/synced_device_tracker.h" | 24 #include "chrome/browser/sync/glue/synced_device_tracker.h" |
25 #include "chrome/browser/sync/glue/synced_session.h" | 25 #include "chrome/browser/sync/glue/synced_session.h" |
26 #include "chrome/browser/sync/glue/synced_tab_delegate.h" | 26 #include "chrome/browser/sync/glue/synced_tab_delegate.h" |
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1145 | 1145 |
1146 bool SessionModelAssociator::CryptoReadyIfNecessary() { | 1146 bool SessionModelAssociator::CryptoReadyIfNecessary() { |
1147 // We only access the cryptographer while holding a transaction. | 1147 // We only access the cryptographer while holding a transaction. |
1148 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 1148 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
1149 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); | 1149 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); |
1150 return !encrypted_types.Has(SESSIONS) || | 1150 return !encrypted_types.Has(SESSIONS) || |
1151 sync_service_->IsCryptographerReady(&trans); | 1151 sync_service_->IsCryptographerReady(&trans); |
1152 } | 1152 } |
1153 | 1153 |
1154 } // namespace browser_sync | 1154 } // namespace browser_sync |
OLD | NEW |