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

Side by Side Diff: components/web_cache/renderer/web_cache_render_process_observer.h

Issue 528363002: Move webCacheManager to //components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove an unnecessary dependency in web_cache.gypi. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
6 #define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
7
8 #include "content/public/renderer/render_process_observer.h"
James Cook 2014/09/05 16:53:18 nit: IWYU #include "macros.h" for DISALLOW_COPY_AN
Xi Han 2014/09/05 19:39:25 Done. Also updated web_cache.gypi.
9
10 namespace web_cache {
11
12 class WebCacheRenderProcessObserver: public content::RenderProcessObserver {
James Cook 2014/09/05 16:53:18 nit: small class comment please, space before ":"
Xi Han 2014/09/05 19:39:25 Done.
13 public:
14 WebCacheRenderProcessObserver();
15 virtual ~WebCacheRenderProcessObserver();
16
17 // Needs to be called by RenderViews in case of navigations to execute
18 // any 'clear cache' commands that were delayed until the next navigation.
19 void ExecutePendingClearCache();
20
21 private:
22 // RenderProcessObserver implementation.
23 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
24 virtual void WebKitInitialized() OVERRIDE;
25 virtual void OnRenderProcessShutdown() OVERRIDE;
26
27 // Message handlers.
28 void OnSetCacheCapacities(size_t min_dead_capacity,
29 size_t max_dead_capacity,
30 size_t capacity);
31 // If |on_navigation| is true, the clearing is delayed until the next
32 // navigation event.
33 void OnClearCache(bool on_navigation);
34
35 // If true, the web cache shall be cleared before the next navigation event.
36 bool clear_cache_pending_;
37 bool webkit_initialized_;
38 size_t pending_cache_min_dead_capacity_;
39 size_t pending_cache_max_dead_capacity_;
40 size_t pending_cache_capacity_;
41
42 DISALLOW_COPY_AND_ASSIGN(WebCacheRenderProcessObserver);
43 };
44
45 } // namespace web_cache
46
47 #endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698