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

Unified Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2643183002: Convert ChromeViewHostMsg_UpdatedCacheStats to use mojo. (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« chrome/browser/cache_stats_recorder.h ('K') | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 996518506ab0188bad786eda5dea084785c04030..7da3f1933d543974b693e727c699195cfc6125c0 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"
@@ -117,9 +118,10 @@ 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)));
+ chrome::mojom::CacheStatsRecorderPtr cache_stats_recorder;
Sam McNally 2017/01/24 04:06:15 This one feels like the connection should be reuse
nigeltao1 2017/02/02 05:20:59 Done.
+ RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
+ &cache_stats_recorder);
+ cache_stats_recorder->RecordCacheStats(stats.capacity, stats.size);
}
base::WeakPtrFactory<RendererResourceDelegate> weak_factory_;
« chrome/browser/cache_stats_recorder.h ('K') | « chrome/common/render_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698