| OLD | NEW |
| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 std::move(current_peer), RenderThread::Get(), mime_type, url); | 110 std::move(current_peer), RenderThread::Get(), mime_type, url); |
| 111 #else | 111 #else |
| 112 return current_peer; | 112 return current_peer; |
| 113 #endif | 113 #endif |
| 114 } | 114 } |
| 115 | 115 |
| 116 private: | 116 private: |
| 117 void InformHostOfCacheStats() { | 117 void InformHostOfCacheStats() { |
| 118 WebCache::UsageStats stats; | 118 WebCache::UsageStats stats; |
| 119 WebCache::getUsageStats(&stats); | 119 WebCache::getUsageStats(&stats); |
| 120 /* |
| 120 RenderThread::Get()->Send(new ChromeViewHostMsg_UpdatedCacheStats( | 121 RenderThread::Get()->Send(new ChromeViewHostMsg_UpdatedCacheStats( |
| 121 static_cast<uint64_t>(stats.capacity), | 122 static_cast<uint64_t>(stats.capacity), |
| 122 static_cast<uint64_t>(stats.size))); | 123 static_cast<uint64_t>(stats.size))); |
| 124 */ |
| 123 } | 125 } |
| 124 | 126 |
| 125 base::WeakPtrFactory<RendererResourceDelegate> weak_factory_; | 127 base::WeakPtrFactory<RendererResourceDelegate> weak_factory_; |
| 126 | 128 |
| 127 DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate); | 129 DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate); |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 static const int kWaitForWorkersStatsTimeoutMS = 20; | 132 static const int kWaitForWorkersStatsTimeoutMS = 20; |
| 131 | 133 |
| 132 class ResourceUsageReporterImpl : public chrome::mojom::ResourceUsageReporter { | 134 class ResourceUsageReporterImpl : public chrome::mojom::ResourceUsageReporter { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 | 324 |
| 323 void ChromeRenderThreadObserver::OnRendererConfigurationAssociatedRequest( | 325 void ChromeRenderThreadObserver::OnRendererConfigurationAssociatedRequest( |
| 324 chrome::mojom::RendererConfigurationAssociatedRequest request) { | 326 chrome::mojom::RendererConfigurationAssociatedRequest request) { |
| 325 renderer_configuration_bindings_.AddBinding(this, std::move(request)); | 327 renderer_configuration_bindings_.AddBinding(this, std::move(request)); |
| 326 } | 328 } |
| 327 | 329 |
| 328 const RendererContentSettingRules* | 330 const RendererContentSettingRules* |
| 329 ChromeRenderThreadObserver::content_setting_rules() const { | 331 ChromeRenderThreadObserver::content_setting_rules() const { |
| 330 return &content_setting_rules_; | 332 return &content_setting_rules_; |
| 331 } | 333 } |
| OLD | NEW |