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

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

Issue 2452713003: [Sync] Implement MemoryDumpProvider. (Closed)
Patch Set: Fix presumit; fix Windows; git cl format Created 4 years, 1 month 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/parent_child_index.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_estimator.h"
15 16
16 namespace base { 17 namespace base {
17 class StringValue; 18 class StringValue;
18 } // namespace base 19 } // namespace base
19 20
20 namespace sql { 21 namespace sql {
21 class Statement; 22 class Statement;
22 } // namespace sql 23 } // namespace sql
23 24
24 namespace syncer { 25 namespace syncer {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 private: 91 private:
91 friend std::unique_ptr<EntryKernel> UnpackEntry(sql::Statement* statement, 92 friend std::unique_ptr<EntryKernel> UnpackEntry(sql::Statement* statement,
92 int* total_created_entries); 93 int* total_created_entries);
93 friend void BindFields(const EntryKernel& entry, sql::Statement* statement); 94 friend void BindFields(const EntryKernel& entry, sql::Statement* statement);
94 friend std::ostream& operator<<(std::ostream& out, const Id& id); 95 friend std::ostream& operator<<(std::ostream& out, const Id& id);
95 friend class SyncableIdTest; 96 friend class SyncableIdTest;
96 97
97 std::string s_; 98 std::string s_;
98 }; 99 };
99 100
101 inline size_t EstimateMemoryUsage(const Id& id) {
102 return base::trace_event::EstimateMemoryUsage(id.value());
103 }
104
100 } // namespace syncable 105 } // namespace syncable
101 } // namespace syncer 106 } // namespace syncer
102 107
103 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_ 108 #endif // COMPONENTS_SYNC_SYNCABLE_SYNCABLE_ID_H_
OLDNEW
« no previous file with comments | « components/sync/syncable/parent_child_index.cc ('k') | sql/connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698