Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/sys_info.h" 14 #include "base/sys_info.h"
15 #include "base/threading/sequenced_worker_pool.h" 15 #include "base/threading/sequenced_worker_pool.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sessions/session_id.h" 18 #include "chrome/browser/sessions/session_id.h"
19 #include "chrome/browser/sessions/session_service_factory.h" 19 #include "chrome/browser/sessions/session_service_factory.h"
20 #include "chrome/browser/sync/api/sync_error.h" 20 #include "chrome/browser/sync/api/sync_error.h"
21 #include "chrome/browser/sync/glue/synced_session.h" 21 #include "chrome/browser/sync/glue/synced_session.h"
22 #include "chrome/browser/sync/glue/synced_tab_delegate.h" 22 #include "chrome/browser/sync/glue/synced_tab_delegate.h"
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/internal_api/read_node.h" 24 #include "chrome/browser/sync/internal_api/read_node.h"
25 #include "chrome/browser/sync/internal_api/read_transaction.h" 25 #include "chrome/browser/sync/internal_api/read_transaction.h"
26 #include "chrome/browser/sync/internal_api/write_node.h" 26 #include "chrome/browser/sync/internal_api/write_node.h"
27 #include "chrome/browser/sync/internal_api/write_transaction.h" 27 #include "chrome/browser/sync/internal_api/write_transaction.h"
28 #include "chrome/browser/sync/profile_sync_service.h" 28 #include "chrome/browser/sync/profile_sync_service.h"
29 #include "chrome/browser/sync/syncable/syncable.h"
30 #include "chrome/browser/sync/util/get_session_name.h"
31 #include "chrome/common/chrome_notification_types.h" 29 #include "chrome/common/chrome_notification_types.h"
32 #include "chrome/common/url_constants.h" 30 #include "chrome/common/url_constants.h"
33 #include "content/public/browser/navigation_entry.h" 31 #include "content/public/browser/navigation_entry.h"
34 #include "content/public/browser/notification_details.h" 32 #include "content/public/browser/notification_details.h"
35 #include "content/public/browser/notification_service.h" 33 #include "content/public/browser/notification_service.h"
36 #include "sync/protocol/session_specifics.pb.h" 34 #include "sync/protocol/session_specifics.pb.h"
35 #include "sync/syncable/syncable.h"
36 #include "sync/util/get_session_name.h"
37 #if defined(OS_LINUX) 37 #if defined(OS_LINUX)
38 #include "base/linux_util.h" 38 #include "base/linux_util.h"
39 #elif defined(OS_WIN) 39 #elif defined(OS_WIN)
40 #include <windows.h> 40 #include <windows.h>
41 #endif 41 #endif
42 42
43 using content::BrowserThread; 43 using content::BrowserThread;
44 using content::NavigationEntry; 44 using content::NavigationEntry;
45 using syncable::SESSIONS; 45 using syncable::SESSIONS;
46 46
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 bool SessionModelAssociator::CryptoReadyIfNecessary() { 1130 bool SessionModelAssociator::CryptoReadyIfNecessary() {
1131 // We only access the cryptographer while holding a transaction. 1131 // We only access the cryptographer while holding a transaction.
1132 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare()); 1132 sync_api::ReadTransaction trans(FROM_HERE, sync_service_->GetUserShare());
1133 const syncable::ModelTypeSet encrypted_types = 1133 const syncable::ModelTypeSet encrypted_types =
1134 sync_api::GetEncryptedTypes(&trans); 1134 sync_api::GetEncryptedTypes(&trans);
1135 return !encrypted_types.Has(SESSIONS) || 1135 return !encrypted_types.Has(SESSIONS) ||
1136 sync_service_->IsCryptographerReady(&trans); 1136 sync_service_->IsCryptographerReady(&trans);
1137 } 1137 }
1138 1138
1139 } // namespace browser_sync 1139 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/session_model_associator.h ('k') | chrome/browser/sync/glue/shared_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698