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

Side by Side Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2435603002: [WeakMemoryCache] Remove dead/live distinction of Resource outside core/fetch (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/renderer/chrome_render_thread_observer.h" 5 #include "chrome/renderer/chrome_render_thread_observer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #else 107 #else
108 return current_peer; 108 return current_peer;
109 #endif 109 #endif
110 } 110 }
111 111
112 private: 112 private:
113 void InformHostOfCacheStats() { 113 void InformHostOfCacheStats() {
114 WebCache::UsageStats stats; 114 WebCache::UsageStats stats;
115 WebCache::getUsageStats(&stats); 115 WebCache::getUsageStats(&stats);
116 RenderThread::Get()->Send(new ChromeViewHostMsg_UpdatedCacheStats( 116 RenderThread::Get()->Send(new ChromeViewHostMsg_UpdatedCacheStats(
117 static_cast<uint64_t>(stats.minDeadCapacity),
118 static_cast<uint64_t>(stats.maxDeadCapacity),
119 static_cast<uint64_t>(stats.capacity), 117 static_cast<uint64_t>(stats.capacity),
120 static_cast<uint64_t>(stats.liveSize), 118 static_cast<uint64_t>(stats.size)));
121 static_cast<uint64_t>(stats.deadSize)));
122 } 119 }
123 120
124 base::WeakPtrFactory<RendererResourceDelegate> weak_factory_; 121 base::WeakPtrFactory<RendererResourceDelegate> weak_factory_;
125 122
126 DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate); 123 DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate);
127 }; 124 };
128 125
129 static const int kWaitForWorkersStatsTimeoutMS = 20; 126 static const int kWaitForWorkersStatsTimeoutMS = 20;
130 127
131 class ResourceUsageReporterImpl : public chrome::mojom::ResourceUsageReporter { 128 class ResourceUsageReporterImpl : public chrome::mojom::ResourceUsageReporter {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 void ChromeRenderThreadObserver::OnSetFieldTrialGroup( 310 void ChromeRenderThreadObserver::OnSetFieldTrialGroup(
314 const std::string& trial_name, 311 const std::string& trial_name,
315 const std::string& group_name) { 312 const std::string& group_name) {
316 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name); 313 field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name);
317 } 314 }
318 315
319 const RendererContentSettingRules* 316 const RendererContentSettingRules*
320 ChromeRenderThreadObserver::content_setting_rules() const { 317 ChromeRenderThreadObserver::content_setting_rules() const {
321 return &content_setting_rules_; 318 return &content_setting_rules_;
322 } 319 }
OLDNEW
« no previous file with comments | « chrome/common/resource_usage_reporter_type_converters.cc ('k') | components/web_cache/browser/web_cache_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698