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

Side by Side Diff: components/sync/syncable/directory.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_SYNCABLE_DIRECTORY_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_
6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 FULL_DB_VERIFICATION = 2 // Check every entry. This can be expensive. 60 FULL_DB_VERIFICATION = 2 // Check every entry. This can be expensive.
61 }; 61 };
62 62
63 // Directory stores and manages EntryKernels. 63 // Directory stores and manages EntryKernels.
64 // 64 //
65 // This class is tightly coupled to several other classes via Directory::Kernel. 65 // This class is tightly coupled to several other classes via Directory::Kernel.
66 // Although Directory's kernel_ is exposed via public accessor it should be 66 // Although Directory's kernel_ is exposed via public accessor it should be
67 // treated as pseudo-private. 67 // treated as pseudo-private.
68 class Directory { 68 class Directory {
69 public: 69 public:
70 typedef std::vector<int64_t> Metahandles; 70 using Metahandles = std::vector<int64_t>;
71 71
72 typedef std::unordered_map<int64_t, std::unique_ptr<EntryKernel>> 72 using MetahandlesMap =
73 MetahandlesMap; 73 std::unordered_map<int64_t, std::unique_ptr<EntryKernel>>;
74 typedef std::unordered_map<std::string, EntryKernel*> IdsMap; 74 using IdsMap = std::unordered_map<std::string, EntryKernel*>;
75 typedef std::unordered_map<std::string, EntryKernel*> TagsMap; 75 using TagsMap = std::unordered_map<std::string, EntryKernel*>;
76 typedef std::string AttachmentIdUniqueId; 76 using AttachmentIdUniqueId = std::string;
77 typedef std::unordered_map<AttachmentIdUniqueId, MetahandleSet> 77 using IndexByAttachmentId =
78 IndexByAttachmentId; 78 std::unordered_map<AttachmentIdUniqueId, MetahandleSet>;
79 79
80 static const base::FilePath::CharType kSyncDatabaseFilename[]; 80 static const base::FilePath::CharType kSyncDatabaseFilename[];
81 81
82 // The dirty/clean state of kernel fields backed by the share_info table. 82 // The dirty/clean state of kernel fields backed by the share_info table.
83 // This is public so it can be used in SaveChangesSnapshot for persistence. 83 // This is public so it can be used in SaveChangesSnapshot for persistence.
84 enum KernelShareInfoStatus { 84 enum KernelShareInfoStatus {
85 KERNEL_SHARE_INFO_INVALID, 85 KERNEL_SHARE_INFO_INVALID,
86 KERNEL_SHARE_INFO_VALID, 86 KERNEL_SHARE_INFO_VALID,
87 KERNEL_SHARE_INFO_DIRTY 87 KERNEL_SHARE_INFO_DIRTY
88 }; 88 };
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 667
668 base::WeakPtrFactory<Directory> weak_ptr_factory_; 668 base::WeakPtrFactory<Directory> weak_ptr_factory_;
669 669
670 DISALLOW_COPY_AND_ASSIGN(Directory); 670 DISALLOW_COPY_AND_ASSIGN(Directory);
671 }; 671 };
672 672
673 } // namespace syncable 673 } // namespace syncable
674 } // namespace syncer 674 } // namespace syncer
675 675
676 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_ 676 #endif // COMPONENTS_SYNC_SYNCABLE_DIRECTORY_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/delete_journal.h ('k') | components/sync/syncable/directory_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698