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 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 23 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
24 #include "chrome/browser/sync/profile_sync_service.h" | 24 #include "chrome/browser/sync/profile_sync_service.h" |
25 #include "chrome/common/chrome_notification_types.h" | 25 #include "chrome/common/chrome_notification_types.h" |
26 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "chrome/common/url_constants.h" | 28 #include "chrome/common/url_constants.h" |
29 #include "content/public/browser/navigation_entry.h" | 29 #include "content/public/browser/navigation_entry.h" |
30 #include "content/public/browser/notification_details.h" | 30 #include "content/public/browser/notification_details.h" |
31 #include "content/public/browser/notification_service.h" | 31 #include "content/public/browser/notification_service.h" |
32 #include "sync/api/sync_error.h" | 32 #include "sync/api/sync_error.h" |
| 33 #include "sync/api/time.h" |
33 #include "sync/internal_api/public/base/model_type.h" | 34 #include "sync/internal_api/public/base/model_type.h" |
34 #include "sync/internal_api/public/base/model_type_state_map.h" | 35 #include "sync/internal_api/public/base/model_type_state_map.h" |
35 #include "sync/internal_api/public/read_node.h" | 36 #include "sync/internal_api/public/read_node.h" |
36 #include "sync/internal_api/public/read_transaction.h" | 37 #include "sync/internal_api/public/read_transaction.h" |
37 #include "sync/internal_api/public/write_node.h" | 38 #include "sync/internal_api/public/write_node.h" |
38 #include "sync/internal_api/public/write_transaction.h" | 39 #include "sync/internal_api/public/write_transaction.h" |
39 #include "sync/protocol/session_specifics.pb.h" | 40 #include "sync/protocol/session_specifics.pb.h" |
40 #include "sync/syncable/directory.h" | 41 #include "sync/syncable/directory.h" |
41 #include "sync/syncable/read_transaction.h" | 42 #include "sync/syncable/read_transaction.h" |
42 #include "sync/syncable/write_transaction.h" | 43 #include "sync/syncable/write_transaction.h" |
43 #include "sync/util/get_session_name.h" | 44 #include "sync/util/get_session_name.h" |
44 #include "sync/util/time.h" | |
45 #include "ui/gfx/favicon_size.h" | 45 #include "ui/gfx/favicon_size.h" |
46 #if defined(OS_LINUX) | 46 #if defined(OS_LINUX) |
47 #include "base/linux_util.h" | 47 #include "base/linux_util.h" |
48 #elif defined(OS_WIN) | 48 #elif defined(OS_WIN) |
49 #include <windows.h> | 49 #include <windows.h> |
50 #elif defined(OS_ANDROID) | 50 #elif defined(OS_ANDROID) |
51 #include "sync/util/session_utils_android.h" | 51 #include "sync/util/session_utils_android.h" |
52 #endif | 52 #endif |
53 | 53 |
54 using content::BrowserThread; | 54 using content::BrowserThread; |
(...skipping 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 | 1597 |
1598 bool SessionModelAssociator::CryptoReadyIfNecessary() { | 1598 bool SessionModelAssociator::CryptoReadyIfNecessary() { |
1599 // We only access the cryptographer while holding a transaction. | 1599 // We only access the cryptographer while holding a transaction. |
1600 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 1600 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
1601 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); | 1601 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); |
1602 return !encrypted_types.Has(SESSIONS) || | 1602 return !encrypted_types.Has(SESSIONS) || |
1603 sync_service_->IsCryptographerReady(&trans); | 1603 sync_service_->IsCryptographerReady(&trans); |
1604 } | 1604 } |
1605 | 1605 |
1606 } // namespace browser_sync | 1606 } // namespace browser_sync |
OLD | NEW |