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

Unified Diff: components/sync/syncable/directory.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sync/protocol/proto_visitors.h ('k') | components/sync/syncable/directory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/directory.h
diff --git a/components/sync/syncable/directory.h b/components/sync/syncable/directory.h
index 4fb0240922be4b47e3facb77e9d51bde9653371f..461892b9d2af02b65106e9d261a08925b912433e 100644
--- a/components/sync/syncable/directory.h
+++ b/components/sync/syncable/directory.h
@@ -30,6 +30,12 @@
#include "components/sync/syncable/parent_child_index.h"
#include "components/sync/syncable/syncable_delete_journal.h"
+namespace base {
+namespace trace_event {
+class ProcessMemoryDump;
+}
+}
+
namespace syncer {
class Cryptographer;
@@ -95,6 +101,8 @@ class Directory {
// Whether a valid progress marker exists for |model_type|.
bool HasEmptyDownloadProgress(ModelType model_type);
+ size_t EstimateMemoryUsage() const;
+
// Last sync timestamp fetched from the server.
sync_pb::DataTypeProgressMarker download_progress[MODEL_TYPE_COUNT];
// Sync-side transaction version per data type. Monotonically incremented
@@ -281,6 +289,9 @@ class Directory {
// Gets the total number of entries in the directory.
size_t GetEntriesCount() const;
+ // Adds memory statistics to |pmd| for chrome://tracing.
+ void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd);
+
// Gets/Increments transaction version of a model type. Must be called when
// holding kernel mutex.
int64_t GetTransactionVersion(ModelType type) const;
« no previous file with comments | « components/sync/protocol/proto_visitors.h ('k') | components/sync/syncable/directory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698