| OLD | NEW |
| 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 #include "components/sync/syncable/directory.h" | 5 #include "components/sync/syncable/directory.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 base::trace_event::MemoryDumpManager::GetInstance() | 937 base::trace_event::MemoryDumpManager::GetInstance() |
| 938 ->system_allocator_pool_name(); | 938 ->system_allocator_pool_name(); |
| 939 if (system_allocator_name) { | 939 if (system_allocator_name) { |
| 940 pmd->AddSuballocation(dump->guid(), system_allocator_name); | 940 pmd->AddSuballocation(dump->guid(), system_allocator_name); |
| 941 } | 941 } |
| 942 } | 942 } |
| 943 | 943 |
| 944 if (store_) { | 944 if (store_) { |
| 945 std::string dump_name = | 945 std::string dump_name = |
| 946 base::StringPrintf("%s/store", dump_name_base.c_str()); | 946 base::StringPrintf("%s/store", dump_name_base.c_str()); |
| 947 auto* dump = pmd->CreateAllocatorDump(dump_name); | 947 store_->ReportMemoryUsage(pmd, dump_name); |
| 948 store_->ReportMemoryUsage(dump); | |
| 949 } | 948 } |
| 950 } | 949 } |
| 951 | 950 |
| 952 void Directory::SetDownloadProgress( | 951 void Directory::SetDownloadProgress( |
| 953 ModelType model_type, | 952 ModelType model_type, |
| 954 const sync_pb::DataTypeProgressMarker& new_progress) { | 953 const sync_pb::DataTypeProgressMarker& new_progress) { |
| 955 ScopedKernelLock lock(this); | 954 ScopedKernelLock lock(this); |
| 956 kernel_->persisted_info.download_progress[model_type].CopyFrom(new_progress); | 955 kernel_->persisted_info.download_progress[model_type].CopyFrom(new_progress); |
| 957 kernel_->info_status = KERNEL_SHARE_INFO_DIRTY; | 956 kernel_->info_status = KERNEL_SHARE_INFO_DIRTY; |
| 958 } | 957 } |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1593 Directory::Kernel* Directory::kernel() { | 1592 Directory::Kernel* Directory::kernel() { |
| 1594 return kernel_; | 1593 return kernel_; |
| 1595 } | 1594 } |
| 1596 | 1595 |
| 1597 const Directory::Kernel* Directory::kernel() const { | 1596 const Directory::Kernel* Directory::kernel() const { |
| 1598 return kernel_; | 1597 return kernel_; |
| 1599 } | 1598 } |
| 1600 | 1599 |
| 1601 } // namespace syncable | 1600 } // namespace syncable |
| 1602 } // namespace syncer | 1601 } // namespace syncer |
| OLD | NEW |