OLD | NEW |
1 // Copyright (c) 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" |
(...skipping 22 matching lines...) Expand all Loading... |
34 #include "sync/api/sync_error.h" | 34 #include "sync/api/sync_error.h" |
35 #include "sync/api/time.h" | 35 #include "sync/api/time.h" |
36 #include "sync/internal_api/public/base/model_type.h" | 36 #include "sync/internal_api/public/base/model_type.h" |
37 #include "sync/internal_api/public/base/model_type_invalidation_map.h" | 37 #include "sync/internal_api/public/base/model_type_invalidation_map.h" |
38 #include "sync/internal_api/public/read_node.h" | 38 #include "sync/internal_api/public/read_node.h" |
39 #include "sync/internal_api/public/read_transaction.h" | 39 #include "sync/internal_api/public/read_transaction.h" |
40 #include "sync/internal_api/public/write_node.h" | 40 #include "sync/internal_api/public/write_node.h" |
41 #include "sync/internal_api/public/write_transaction.h" | 41 #include "sync/internal_api/public/write_transaction.h" |
42 #include "sync/protocol/session_specifics.pb.h" | 42 #include "sync/protocol/session_specifics.pb.h" |
43 #include "sync/syncable/directory.h" | 43 #include "sync/syncable/directory.h" |
44 #include "sync/syncable/read_transaction.h" | 44 #include "sync/syncable/syncable_read_transaction.h" |
45 #include "sync/syncable/write_transaction.h" | 45 #include "sync/syncable/syncable_write_transaction.h" |
46 #include "ui/gfx/favicon_size.h" | 46 #include "ui/gfx/favicon_size.h" |
47 #if defined(OS_LINUX) | 47 #if defined(OS_LINUX) |
48 #include "base/linux_util.h" | 48 #include "base/linux_util.h" |
49 #elif defined(OS_WIN) | 49 #elif defined(OS_WIN) |
50 #include <windows.h> | 50 #include <windows.h> |
51 #endif | 51 #endif |
52 | 52 |
53 using content::BrowserThread; | 53 using content::BrowserThread; |
54 using content::NavigationEntry; | 54 using content::NavigationEntry; |
55 using prefs::kSyncSessionsGUID; | 55 using prefs::kSyncSessionsGUID; |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1298 | 1298 |
1299 bool SessionModelAssociator::CryptoReadyIfNecessary() { | 1299 bool SessionModelAssociator::CryptoReadyIfNecessary() { |
1300 // We only access the cryptographer while holding a transaction. | 1300 // We only access the cryptographer while holding a transaction. |
1301 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); | 1301 syncer::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); |
1302 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); | 1302 const syncer::ModelTypeSet encrypted_types = trans.GetEncryptedTypes(); |
1303 return !encrypted_types.Has(SESSIONS) || | 1303 return !encrypted_types.Has(SESSIONS) || |
1304 sync_service_->IsCryptographerReady(&trans); | 1304 sync_service_->IsCryptographerReady(&trans); |
1305 } | 1305 } |
1306 | 1306 |
1307 } // namespace browser_sync | 1307 } // namespace browser_sync |
OLD | NEW |