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 "sync/sessions/sync_session_context.h" | 5 #include "sync/sessions/sync_session_context.h" |
6 | 6 |
7 #include "sync/sessions/debug_info_getter.h" | 7 #include "sync/sessions/debug_info_getter.h" |
8 #include "sync/util/extensions_activity_monitor.h" | 8 #include "sync/util/extensions_activity_monitor.h" |
9 | 9 |
10 namespace browser_sync { | 10 namespace browser_sync { |
11 namespace sessions { | 11 namespace sessions { |
12 | 12 |
13 const unsigned int kMaxMessagesToRecord = 10; | 13 const unsigned int kMaxMessagesToRecord = 10; |
14 const unsigned int kMaxMessageSizeToRecord = 5 * 1024; | 14 const unsigned int kMaxMessageSizeToRecord = 5 * 1024; |
15 | 15 |
16 SyncSessionContext::SyncSessionContext( | 16 SyncSessionContext::SyncSessionContext( |
17 ServerConnectionManager* connection_manager, | 17 ServerConnectionManager* connection_manager, |
18 syncable::Directory* directory, | 18 syncable::Directory* directory, |
19 const ModelSafeRoutingInfo& model_safe_routing_info, | |
20 const std::vector<ModelSafeWorker*>& workers, | 19 const std::vector<ModelSafeWorker*>& workers, |
21 ExtensionsActivityMonitor* extensions_activity_monitor, | 20 ExtensionsActivityMonitor* extensions_activity_monitor, |
22 const std::vector<SyncEngineEventListener*>& listeners, | 21 const std::vector<SyncEngineEventListener*>& listeners, |
23 DebugInfoGetter* debug_info_getter, | 22 DebugInfoGetter* debug_info_getter, |
24 browser_sync::TrafficRecorder* traffic_recorder) | 23 browser_sync::TrafficRecorder* traffic_recorder) |
25 : resolver_(NULL), | 24 : resolver_(NULL), |
26 connection_manager_(connection_manager), | 25 connection_manager_(connection_manager), |
27 directory_(directory), | 26 directory_(directory), |
28 routing_info_(model_safe_routing_info), | |
29 workers_(workers), | 27 workers_(workers), |
30 extensions_activity_monitor_(extensions_activity_monitor), | 28 extensions_activity_monitor_(extensions_activity_monitor), |
31 notifications_enabled_(false), | 29 notifications_enabled_(false), |
32 max_commit_batch_size_(kDefaultMaxCommitBatchSize), | 30 max_commit_batch_size_(kDefaultMaxCommitBatchSize), |
33 debug_info_getter_(debug_info_getter), | 31 debug_info_getter_(debug_info_getter), |
34 traffic_recorder_(traffic_recorder) { | 32 traffic_recorder_(traffic_recorder) { |
35 std::vector<SyncEngineEventListener*>::const_iterator it; | 33 std::vector<SyncEngineEventListener*>::const_iterator it; |
36 for (it = listeners.begin(); it != listeners.end(); ++it) | 34 for (it = listeners.begin(); it != listeners.end(); ++it) |
37 listeners_.AddObserver(*it); | 35 listeners_.AddObserver(*it); |
38 } | 36 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 for (UnthrottleTimes::const_iterator it = unthrottle_times_.begin(); | 76 for (UnthrottleTimes::const_iterator it = unthrottle_times_.begin(); |
79 it != unthrottle_times_.end(); | 77 it != unthrottle_times_.end(); |
80 ++it) { | 78 ++it) { |
81 types.Put(it->first); | 79 types.Put(it->first); |
82 } | 80 } |
83 return types; | 81 return types; |
84 } | 82 } |
85 | 83 |
86 } // namespace sessions | 84 } // namespace sessions |
87 } // namespace browser_sync | 85 } // namespace browser_sync |
OLD | NEW |