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

Side by Side Diff: components/sync/syncable/syncable_id.h

Issue 2382443006: Sync MDP: implement MemoryDumpProvider
Patch Set: Created 4 years, 2 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
« no previous file with comments | « components/sync/syncable/entry_kernel.cc ('k') | sql/connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_SYNCABLE_SYNCABLE_ID_H_ 5 #ifndef COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_
6 #define COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_ 6 #define COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
11 #include <sstream> 11 #include <sstream>
12 #include <string> 12 #include <string>
13 13
14 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
15 #include "base/trace_event/memory_usage_estimators.h"
15 16
16 namespace base { 17 namespace base {
17 class StringValue; 18 class StringValue;
18 } 19 }
19 20
20 namespace sql { 21 namespace sql {
21 class Statement; 22 class Statement;
22 } 23 }
23 24
24 namespace syncer { 25 namespace syncer {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 private: 90 private:
90 friend std::unique_ptr<EntryKernel> UnpackEntry(sql::Statement* statement, 91 friend std::unique_ptr<EntryKernel> UnpackEntry(sql::Statement* statement,
91 int* total_created_entries); 92 int* total_created_entries);
92 friend void BindFields(const EntryKernel& entry, sql::Statement* statement); 93 friend void BindFields(const EntryKernel& entry, sql::Statement* statement);
93 friend std::ostream& operator<<(std::ostream& out, const Id& id); 94 friend std::ostream& operator<<(std::ostream& out, const Id& id);
94 friend class SyncableIdTest; 95 friend class SyncableIdTest;
95 96
96 std::string s_; 97 std::string s_;
97 }; 98 };
98 99
100 inline size_t EstimateMemoryUsage(const Id& id) {
101 return base::trace_event::EstimateMemoryUsage(id.value());
102 }
103
99 } // namespace syncable 104 } // namespace syncable
100 } // namespace syncer 105 } // namespace syncer
101 106
102 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_ 107 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/entry_kernel.cc ('k') | sql/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698