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 #ifndef SYNC_ENGINE_SYNC_SESSION_JOB_H_ | 5 #ifndef SYNC_ENGINE_SYNC_SESSION_JOB_H_ |
6 #define SYNC_ENGINE_SYNC_SESSION_JOB_H_ | 6 #define SYNC_ENGINE_SYNC_SESSION_JOB_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/tracked_objects.h" | 10 #include "base/tracked_objects.h" |
| 11 #include "sync/base/sync_export.h" |
11 #include "sync/engine/sync_scheduler.h" | 12 #include "sync/engine/sync_scheduler.h" |
12 #include "sync/engine/syncer.h" | 13 #include "sync/engine/syncer.h" |
13 #include "sync/sessions/sync_session.h" | 14 #include "sync/sessions/sync_session.h" |
14 | 15 |
15 namespace syncer { | 16 namespace syncer { |
16 | 17 |
17 class SyncSessionJob { | 18 class SYNC_EXPORT_PRIVATE SyncSessionJob { |
18 public: | 19 public: |
19 enum Purpose { | 20 enum Purpose { |
20 // Uninitialized state, should never be hit in practice. | 21 // Uninitialized state, should never be hit in practice. |
21 UNKNOWN = -1, | 22 UNKNOWN = -1, |
22 // Our poll timer schedules POLL jobs periodically based on a server | 23 // Our poll timer schedules POLL jobs periodically based on a server |
23 // assigned poll interval. | 24 // assigned poll interval. |
24 POLL, | 25 POLL, |
25 // A nudge task can come from a variety of components needing to force | 26 // A nudge task can come from a variety of components needing to force |
26 // a sync. The source is inferable from |session.source()|. | 27 // a sync. The source is inferable from |session.source()|. |
27 NUDGE, | 28 NUDGE, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // In case of multiple nudges getting coalesced this stores the | 116 // In case of multiple nudges getting coalesced this stores the |
116 // first location that came in. | 117 // first location that came in. |
117 tracked_objects::Location from_location_; | 118 tracked_objects::Location from_location_; |
118 | 119 |
119 DISALLOW_COPY_AND_ASSIGN(SyncSessionJob); | 120 DISALLOW_COPY_AND_ASSIGN(SyncSessionJob); |
120 }; | 121 }; |
121 | 122 |
122 } // namespace syncer | 123 } // namespace syncer |
123 | 124 |
124 #endif // SYNC_ENGINE_SYNC_SESSION_JOB_H_ | 125 #endif // SYNC_ENGINE_SYNC_SESSION_JOB_H_ |
OLD | NEW |