| Index: chrome/renderer/chrome_render_thread_observer.cc
|
| diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
|
| index ebfe32922014601f2eccd7fcbbbba5167ab55c3e..a20fad9a010667dfb872282b4144df8276eae505 100644
|
| --- a/chrome/renderer/chrome_render_thread_observer.cc
|
| +++ b/chrome/renderer/chrome_render_thread_observer.cc
|
| @@ -28,6 +28,7 @@
|
| #include "base/threading/platform_thread.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "build/build_config.h"
|
| +#include "chrome/common/cache_stats_recorder.mojom.h"
|
| #include "chrome/common/child_process_logging.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/field_trial_recorder.mojom.h"
|
| @@ -47,6 +48,7 @@
|
| #include "content/public/renderer/render_view.h"
|
| #include "content/public/renderer/render_view_visitor.h"
|
| #include "extensions/features/features.h"
|
| +#include "ipc/ipc_sync_channel.h"
|
| #include "media/base/localized_strings.h"
|
| #include "mojo/public/cpp/bindings/strong_binding.h"
|
| #include "net/base/net_errors.h"
|
| @@ -117,11 +119,14 @@ class RendererResourceDelegate : public content::ResourceDispatcherDelegate {
|
| void InformHostOfCacheStats() {
|
| WebCache::UsageStats stats;
|
| WebCache::getUsageStats(&stats);
|
| - RenderThread::Get()->Send(new ChromeViewHostMsg_UpdatedCacheStats(
|
| - static_cast<uint64_t>(stats.capacity),
|
| - static_cast<uint64_t>(stats.size)));
|
| + if (!cache_stats_recorder_)
|
| + RenderThread::Get()->GetChannel()->GetRemoteAssociatedInterface(
|
| + &cache_stats_recorder_);
|
| + cache_stats_recorder_->RecordCacheStats(stats.capacity, stats.size);
|
| }
|
|
|
| + chrome::mojom::CacheStatsRecorderAssociatedPtr cache_stats_recorder_;
|
| +
|
| base::WeakPtrFactory<RendererResourceDelegate> weak_factory_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate);
|
|
|