| 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/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 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 22 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
| 23 #include "chrome/browser/sync/profile_sync_service.h" | 23 #include "chrome/browser/sync/profile_sync_service.h" |
| 24 #include "chrome/common/chrome_notification_types.h" | 24 #include "chrome/common/chrome_notification_types.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 27 #include "chrome/common/url_constants.h" | 27 #include "chrome/common/url_constants.h" |
| 28 #include "content/public/browser/navigation_entry.h" | 28 #include "content/public/browser/navigation_entry.h" |
| 29 #include "content/public/browser/notification_details.h" | 29 #include "content/public/browser/notification_details.h" |
| 30 #include "content/public/browser/notification_service.h" | 30 #include "content/public/browser/notification_service.h" |
| 31 #include "sync/api/sync_error.h" | 31 #include "sync/api/sync_error.h" |
| 32 #include "sync/internal_api/public/base/model_type.h" |
| 33 #include "sync/internal_api/public/base/model_type_payload_map.h" |
| 32 #include "sync/internal_api/public/read_node.h" | 34 #include "sync/internal_api/public/read_node.h" |
| 33 #include "sync/internal_api/public/read_transaction.h" | 35 #include "sync/internal_api/public/read_transaction.h" |
| 34 #include "sync/internal_api/public/syncable/model_type.h" | |
| 35 #include "sync/internal_api/public/syncable/model_type_payload_map.h" | |
| 36 #include "sync/internal_api/public/write_node.h" | 36 #include "sync/internal_api/public/write_node.h" |
| 37 #include "sync/internal_api/public/write_transaction.h" | 37 #include "sync/internal_api/public/write_transaction.h" |
| 38 #include "sync/protocol/session_specifics.pb.h" | 38 #include "sync/protocol/session_specifics.pb.h" |
| 39 #include "sync/syncable/directory.h" | 39 #include "sync/syncable/directory.h" |
| 40 #include "sync/syncable/read_transaction.h" | 40 #include "sync/syncable/read_transaction.h" |
| 41 #include "sync/syncable/write_transaction.h" | 41 #include "sync/syncable/write_transaction.h" |
| 42 #include "sync/util/get_session_name.h" | 42 #include "sync/util/get_session_name.h" |
| 43 #include "sync/util/time.h" | 43 #include "sync/util/time.h" |
| 44 #if defined(OS_LINUX) | 44 #if defined(OS_LINUX) |
| 45 #include "base/linux_util.h" | 45 #include "base/linux_util.h" |
| (...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 bool SessionModelAssociator::CryptoReadyIfNecessary() { | 1581 bool SessionModelAssociator::CryptoReadyIfNecessary() { |
| 1582 // We only access the cryptographer while holding a transaction. | 1582 // We only access the cryptographer while holding a transaction. |
| 1583 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 1583 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
| 1584 const syncable::ModelTypeSet encrypted_types = | 1584 const syncable::ModelTypeSet encrypted_types = |
| 1585 syncer::GetEncryptedTypes(&trans); | 1585 syncer::GetEncryptedTypes(&trans); |
| 1586 return !encrypted_types.Has(SESSIONS) || | 1586 return !encrypted_types.Has(SESSIONS) || |
| 1587 sync_service_->IsCryptographerReady(&trans); | 1587 sync_service_->IsCryptographerReady(&trans); |
| 1588 } | 1588 } |
| 1589 | 1589 |
| 1590 } // namespace browser_sync | 1590 } // namespace browser_sync |
| OLD | NEW |