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

Side by Side Diff: components/sync/engine_impl/commit.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 (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 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_ 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_
6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_ 6 #define COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 18 matching lines...) Expand all
29 // This class wraps the actions related to building and executing a single 29 // This class wraps the actions related to building and executing a single
30 // commit operation. 30 // commit operation.
31 // 31 //
32 // This class' most important responsibility is to manage the ContributionsMap. 32 // This class' most important responsibility is to manage the ContributionsMap.
33 // This class serves as a container for those objects. Although it would have 33 // This class serves as a container for those objects. Although it would have
34 // been acceptable to let this class be a dumb container object, it turns out 34 // been acceptable to let this class be a dumb container object, it turns out
35 // that there was no other convenient place to put the Init() and 35 // that there was no other convenient place to put the Init() and
36 // PostAndProcessCommitResponse() functions. So they ended up here. 36 // PostAndProcessCommitResponse() functions. So they ended up here.
37 class Commit { 37 class Commit {
38 public: 38 public:
39 typedef std::map<ModelType, std::unique_ptr<CommitContribution>> 39 using ContributionMap =
40 ContributionMap; 40 std::map<ModelType, std::unique_ptr<CommitContribution>>;
41 41
42 Commit(ContributionMap contributions, 42 Commit(ContributionMap contributions,
43 const sync_pb::ClientToServerMessage& message, 43 const sync_pb::ClientToServerMessage& message,
44 ExtensionsActivity::Records extensions_activity_buffer); 44 ExtensionsActivity::Records extensions_activity_buffer);
45 45
46 // This destructor will DCHECK if CleanUp() has not been called. 46 // This destructor will DCHECK if CleanUp() has not been called.
47 ~Commit(); 47 ~Commit();
48 48
49 // |extensions_activity| may be null. 49 // |extensions_activity| may be null.
50 static Commit* Init(ModelTypeSet requested_types, 50 static Commit* Init(ModelTypeSet requested_types,
(...skipping 25 matching lines...) Expand all
76 76
77 // Debug only flag used to indicate if it's safe to destruct the object. 77 // Debug only flag used to indicate if it's safe to destruct the object.
78 bool cleaned_up_; 78 bool cleaned_up_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(Commit); 80 DISALLOW_COPY_AND_ASSIGN(Commit);
81 }; 81 };
82 82
83 } // namespace syncer 83 } // namespace syncer
84 84
85 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_ 85 #endif // COMPONENTS_SYNC_ENGINE_IMPL_COMMIT_H_
OLDNEW
« no previous file with comments | « components/sync/engine_impl/attachments/attachment_uploader_impl.cc ('k') | components/sync/engine_impl/commit_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698