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

Side by Side Diff: components/sync/engine_impl/sync_scheduler_impl.h

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 NudgeTracker nudge_tracker_; 259 NudgeTracker nudge_tracker_;
260 260
261 // Invoked to run through the sync cycle. 261 // Invoked to run through the sync cycle.
262 std::unique_ptr<Syncer> syncer_; 262 std::unique_ptr<Syncer> syncer_;
263 263
264 SyncCycleContext* cycle_context_; 264 SyncCycleContext* cycle_context_;
265 265
266 // A map tracking LOCAL NudgeSource invocations of ScheduleNudge* APIs, 266 // A map tracking LOCAL NudgeSource invocations of ScheduleNudge* APIs,
267 // organized by datatype. Each datatype that was part of the types requested 267 // organized by datatype. Each datatype that was part of the types requested
268 // in the call will have its TimeTicks value updated. 268 // in the call will have its TimeTicks value updated.
269 typedef std::map<ModelType, base::TimeTicks> ModelTypeTimeMap; 269 using ModelTypeTimeMap = std::map<ModelType, base::TimeTicks>;
270 ModelTypeTimeMap last_local_nudges_by_model_type_; 270 ModelTypeTimeMap last_local_nudges_by_model_type_;
271 271
272 // Used as an "anti-reentrancy defensive assertion". 272 // Used as an "anti-reentrancy defensive assertion".
273 // While true, it is illegal for any new scheduling activity to take place. 273 // While true, it is illegal for any new scheduling activity to take place.
274 // Ensures that higher layers don't break this law in response to events that 274 // Ensures that higher layers don't break this law in response to events that
275 // take place during a sync cycle. We call this out because such violations 275 // take place during a sync cycle. We call this out because such violations
276 // could result in tight sync loops hitting sync servers. 276 // could result in tight sync loops hitting sync servers.
277 bool no_scheduling_allowed_; 277 bool no_scheduling_allowed_;
278 278
279 // TryJob might get called for multiple reasons. It should only call 279 // TryJob might get called for multiple reasons. It should only call
(...skipping 20 matching lines...) Expand all
300 // A second factory specially for weak_handle_this_, to allow the handle 300 // A second factory specially for weak_handle_this_, to allow the handle
301 // to be const and alleviate threading concerns. 301 // to be const and alleviate threading concerns.
302 base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_for_weak_handle_; 302 base::WeakPtrFactory<SyncSchedulerImpl> weak_ptr_factory_for_weak_handle_;
303 303
304 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl); 304 DISALLOW_COPY_AND_ASSIGN(SyncSchedulerImpl);
305 }; 305 };
306 306
307 } // namespace syncer 307 } // namespace syncer
308 308
309 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_ 309 #endif // COMPONENTS_SYNC_ENGINE_IMPL_SYNC_SCHEDULER_IMPL_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/sync_manager_impl.h ('k') | components/sync/engine_impl/sync_scheduler_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698