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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 528363002: Move webCacheManager to //components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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
Index: chrome/renderer/chrome_render_process_observer.cc
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc
index ed483c95978115585d1a19b512cfdaaffd6aae78..b9a4763f46abed9d1a831c6971f5ddfd320b0919 100644
--- a/chrome/renderer/chrome_render_process_observer.cc
+++ b/chrome/renderer/chrome_render_process_observer.cc
@@ -57,7 +57,6 @@ using content::RenderThread;
namespace {
const int kCacheStatsDelayMS = 2000;
-const size_t kUnitializedCacheCapacity = UINT_MAX;
class RendererResourceDelegate : public content::ResourceDispatcherDelegate {
public:
@@ -248,11 +247,7 @@ bool ChromeRenderProcessObserver::is_incognito_process_ = false;
ChromeRenderProcessObserver::ChromeRenderProcessObserver(
ChromeContentRendererClient* client)
: client_(client),
- clear_cache_pending_(false),
- webkit_initialized_(false),
- pending_cache_min_dead_capacity_(0),
- pending_cache_max_dead_capacity_(0),
- pending_cache_capacity_(kUnitializedCacheCapacity) {
+ webkit_initialized_(false) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
#if defined(ENABLE_AUTOFILL_DIALOG)
@@ -305,8 +300,6 @@ bool ChromeRenderProcessObserver::OnControlMessageReceived(
IPC_BEGIN_MESSAGE_MAP(ChromeRenderProcessObserver, message)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsIncognitoProcess,
OnSetIsIncognitoProcess)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_SetCacheCapacities, OnSetCacheCapacities)
- IPC_MESSAGE_HANDLER(ChromeViewMsg_ClearCache, OnClearCache)
IPC_MESSAGE_HANDLER(ChromeViewMsg_SetFieldTrialGroup, OnSetFieldTrialGroup)
IPC_MESSAGE_HANDLER(ChromeViewMsg_GetV8HeapStats, OnGetV8HeapStats)
IPC_MESSAGE_HANDLER(ChromeViewMsg_GetCacheResourceStats,
@@ -320,12 +313,6 @@ bool ChromeRenderProcessObserver::OnControlMessageReceived(
void ChromeRenderProcessObserver::WebKitInitialized() {
webkit_initialized_ = true;
- if (pending_cache_capacity_ != kUnitializedCacheCapacity) {
- WebCache::setCapacities(pending_cache_min_dead_capacity_,
- pending_cache_max_dead_capacity_,
- pending_cache_capacity_);
- }
-
// chrome-native: is a scheme used for placeholder navigations that allow
// UIs to be drawn with platform native widgets instead of HTML. These pages
// should not be accessible, and should also be treated as empty documents
@@ -354,28 +341,6 @@ void ChromeRenderProcessObserver::OnSetContentSettingRules(
content_setting_rules_ = rules;
}
-void ChromeRenderProcessObserver::OnSetCacheCapacities(size_t min_dead_capacity,
- size_t max_dead_capacity,
- size_t capacity) {
- if (!webkit_initialized_) {
- pending_cache_min_dead_capacity_ = min_dead_capacity;
- pending_cache_max_dead_capacity_ = max_dead_capacity;
- pending_cache_capacity_ = capacity;
- return;
- }
-
- WebCache::setCapacities(
- min_dead_capacity, max_dead_capacity, capacity);
-}
-
-void ChromeRenderProcessObserver::OnClearCache(bool on_navigation) {
- if (on_navigation || !webkit_initialized_) {
- clear_cache_pending_ = true;
- } else {
- WebCache::clear();
- }
-}
-
void ChromeRenderProcessObserver::OnGetCacheResourceStats() {
WebCache::ResourceTypeStats stats;
if (webkit_initialized_)
@@ -400,13 +365,6 @@ void ChromeRenderProcessObserver::OnGetV8HeapStats() {
HeapStatisticsCollector::Instance()->InitiateCollection();
}
-void ChromeRenderProcessObserver::ExecutePendingClearCache() {
- if (clear_cache_pending_ && webkit_initialized_) {
- clear_cache_pending_ = false;
- WebCache::clear();
- }
-}
-
const RendererContentSettingRules*
ChromeRenderProcessObserver::content_setting_rules() const {
return &content_setting_rules_;

Powered by Google App Engine
This is Rietveld 408576698