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

Side by Side Diff: sync/engine/sync_scheduler_impl.h

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase (no code changes) Created 7 years, 11 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
« no previous file with comments | « sync/engine/sync_scheduler.h ('k') | sync/engine/sync_session_job.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ 5 #ifndef SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_
6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ 6 #define SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/observer_list.h" 17 #include "base/observer_list.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "base/timer.h" 19 #include "base/timer.h"
20 #include "sync/base/sync_export.h"
20 #include "sync/engine/net/server_connection_manager.h" 21 #include "sync/engine/net/server_connection_manager.h"
21 #include "sync/engine/nudge_source.h" 22 #include "sync/engine/nudge_source.h"
22 #include "sync/engine/sync_scheduler.h" 23 #include "sync/engine/sync_scheduler.h"
23 #include "sync/engine/sync_session_job.h" 24 #include "sync/engine/sync_session_job.h"
24 #include "sync/engine/syncer.h" 25 #include "sync/engine/syncer.h"
25 #include "sync/internal_api/public/base/model_type_invalidation_map.h" 26 #include "sync/internal_api/public/base/model_type_invalidation_map.h"
26 #include "sync/internal_api/public/engine/polling_constants.h" 27 #include "sync/internal_api/public/engine/polling_constants.h"
27 #include "sync/internal_api/public/util/weak_handle.h" 28 #include "sync/internal_api/public/util/weak_handle.h"
28 #include "sync/sessions/sync_session.h" 29 #include "sync/sessions/sync_session.h"
29 #include "sync/sessions/sync_session_context.h" 30 #include "sync/sessions/sync_session_context.h"
30 31
31 namespace syncer { 32 namespace syncer {
32 33
33 class BackoffDelayProvider; 34 class BackoffDelayProvider;
34 35
35 class SyncSchedulerImpl : public SyncScheduler { 36 class SYNC_EXPORT_PRIVATE SyncSchedulerImpl : public SyncScheduler {
36 public: 37 public:
37 // |name| is a display string to identify the syncer thread. Takes 38 // |name| is a display string to identify the syncer thread. Takes
38 // |ownership of |syncer| and |delay_provider|. 39 // |ownership of |syncer| and |delay_provider|.
39 SyncSchedulerImpl(const std::string& name, 40 SyncSchedulerImpl(const std::string& name,
40 BackoffDelayProvider* delay_provider, 41 BackoffDelayProvider* delay_provider,
41 sessions::SyncSessionContext* context, 42 sessions::SyncSessionContext* context,
42 Syncer* syncer); 43 Syncer* syncer);
43 44
44 // Calls Stop(). 45 // Calls Stop().
45 virtual ~SyncSchedulerImpl(); 46 virtual ~SyncSchedulerImpl();
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 ContinueCanaryJobConfig); 110 ContinueCanaryJobConfig);
110 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest, 111 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerWhiteboxTest,
111 ContinueNudgeWhileExponentialBackOff); 112 ContinueNudgeWhileExponentialBackOff);
112 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, TransientPollFailure); 113 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, TransientPollFailure);
113 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, GetInitialBackoffDelay); 114 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, GetInitialBackoffDelay);
114 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, 115 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest,
115 ServerConnectionChangeDuringBackoff); 116 ServerConnectionChangeDuringBackoff);
116 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest, 117 FRIEND_TEST_ALL_PREFIXES(SyncSchedulerTest,
117 ConnectionChangeCanaryPreemptedByNudge); 118 ConnectionChangeCanaryPreemptedByNudge);
118 119
119 struct WaitInterval { 120 struct SYNC_EXPORT_PRIVATE WaitInterval {
120 enum Mode { 121 enum Mode {
121 // Uninitialized state, should not be set in practice. 122 // Uninitialized state, should not be set in practice.
122 UNKNOWN = -1, 123 UNKNOWN = -1,
123 // A wait interval whose duration has been affected by exponential 124 // A wait interval whose duration has been affected by exponential
124 // backoff. 125 // backoff.
125 // EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval. 126 // EXPONENTIAL_BACKOFF intervals are nudge-rate limited to 1 per interval.
126 EXPONENTIAL_BACKOFF, 127 EXPONENTIAL_BACKOFF,
127 // A server-initiated throttled interval. We do not allow any syncing 128 // A server-initiated throttled interval. We do not allow any syncing
128 // during such an interval. 129 // during such an interval.
129 THROTTLED, 130 THROTTLED,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 // take place during a sync cycle. We call this out because such violations 329 // take place during a sync cycle. We call this out because such violations
329 // could result in tight sync loops hitting sync servers. 330 // could result in tight sync loops hitting sync servers.
330 bool no_scheduling_allowed_; 331 bool no_scheduling_allowed_;
331 332
332 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); 333 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl);
333 }; 334 };
334 335
335 } // namespace syncer 336 } // namespace syncer
336 337
337 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_ 338 #endif // SYNC_ENGINE_SYNC_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « sync/engine/sync_scheduler.h ('k') | sync/engine/sync_session_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698