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

Side by Side Diff: sync/sessions/sync_session.h

Issue 1866243002: Convert //sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
1 // Copyright 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 // A class representing an attempt to synchronize the local syncable data 5 // A class representing an attempt to synchronize the local syncable data
6 // store with a sync server. A SyncSession instance is passed as a stateful 6 // store with a sync server. A SyncSession instance is passed as a stateful
7 // bundle throughout the sync cycle. The SyncSession is not reused across 7 // bundle throughout the sync cycle. The SyncSession is not reused across
8 // sync cycles; each cycle starts with a new one. 8 // sync cycles; each cycle starts with a new one.
9 9
10 #ifndef SYNC_SESSIONS_SYNC_SESSION_H_ 10 #ifndef SYNC_SESSIONS_SYNC_SESSION_H_
11 #define SYNC_SESSIONS_SYNC_SESSION_H_ 11 #define SYNC_SESSIONS_SYNC_SESSION_H_
12 12
13 #include <map> 13 #include <map>
14 #include <memory>
14 #include <set> 15 #include <set>
15 #include <string> 16 #include <string>
16 #include <utility> 17 #include <utility>
17 #include <vector> 18 #include <vector>
18 19
19 #include "base/macros.h" 20 #include "base/macros.h"
20 #include "base/memory/scoped_ptr.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "sync/base/sync_export.h" 22 #include "sync/base/sync_export.h"
23 #include "sync/engine/sync_cycle_event.h" 23 #include "sync/engine/sync_cycle_event.h"
24 #include "sync/internal_api/public/base/model_type.h" 24 #include "sync/internal_api/public/base/model_type.h"
25 #include "sync/internal_api/public/engine/model_safe_worker.h" 25 #include "sync/internal_api/public/engine/model_safe_worker.h"
26 #include "sync/internal_api/public/sessions/sync_session_snapshot.h" 26 #include "sync/internal_api/public/sessions/sync_session_snapshot.h"
27 #include "sync/protocol/sync_protocol_error.h" 27 #include "sync/protocol/sync_protocol_error.h"
28 #include "sync/sessions/status_controller.h" 28 #include "sync/sessions/status_controller.h"
29 #include "sync/sessions/sync_session_context.h" 29 #include "sync/sessions/sync_session_context.h"
30 30
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 private: 125 private:
126 SyncSession(SyncSessionContext* context, Delegate* delegate); 126 SyncSession(SyncSessionContext* context, Delegate* delegate);
127 127
128 // The context for this session, guaranteed to outlive |this|. 128 // The context for this session, guaranteed to outlive |this|.
129 SyncSessionContext* const context_; 129 SyncSessionContext* const context_;
130 130
131 // The delegate for this session, must never be NULL. 131 // The delegate for this session, must never be NULL.
132 Delegate* const delegate_; 132 Delegate* const delegate_;
133 133
134 // Our controller for various status and error counters. 134 // Our controller for various status and error counters.
135 scoped_ptr<StatusController> status_controller_; 135 std::unique_ptr<StatusController> status_controller_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(SyncSession); 137 DISALLOW_COPY_AND_ASSIGN(SyncSession);
138 }; 138 };
139 139
140 } // namespace sessions 140 } // namespace sessions
141 } // namespace syncer 141 } // namespace syncer
142 142
143 #endif // SYNC_SESSIONS_SYNC_SESSION_H_ 143 #endif // SYNC_SESSIONS_SYNC_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698