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

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

Issue 1619363002: Add compile time checks against longs being used in IPC structs on 32 bit Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more per Dmitry Created 4 years, 10 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_ 5 #ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
6 #define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_ 6 #define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h>
9 10
10 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "content/public/renderer/render_process_observer.h" 13 #include "content/public/renderer/render_process_observer.h"
13 14
14 namespace web_cache { 15 namespace web_cache {
15 16
16 // This class filters the incoming cache related control messages. 17 // This class filters the incoming cache related control messages.
17 class WebCacheRenderProcessObserver : public content::RenderProcessObserver { 18 class WebCacheRenderProcessObserver : public content::RenderProcessObserver {
18 public: 19 public:
19 WebCacheRenderProcessObserver(); 20 WebCacheRenderProcessObserver();
20 ~WebCacheRenderProcessObserver() override; 21 ~WebCacheRenderProcessObserver() override;
21 22
22 // Needs to be called by RenderViews in case of navigations to execute 23 // Needs to be called by RenderViews in case of navigations to execute
23 // any 'clear cache' commands that were delayed until the next navigation. 24 // any 'clear cache' commands that were delayed until the next navigation.
24 void ExecutePendingClearCache(); 25 void ExecutePendingClearCache();
25 26
26 private: 27 private:
27 // RenderProcessObserver implementation. 28 // RenderProcessObserver implementation.
28 bool OnControlMessageReceived(const IPC::Message& message) override; 29 bool OnControlMessageReceived(const IPC::Message& message) override;
29 void WebKitInitialized() override; 30 void WebKitInitialized() override;
30 void OnRenderProcessShutdown() override; 31 void OnRenderProcessShutdown() override;
31 32
32 // Message handlers. 33 // Message handlers.
33 void OnSetCacheCapacities(size_t min_dead_capacity, 34 void OnSetCacheCapacities(uint32_t min_dead_capacity,
34 size_t max_dead_capacity, 35 uint32_t max_dead_capacity,
35 size_t capacity); 36 uint32_t capacity);
36 // If |on_navigation| is true, the clearing is delayed until the next 37 // If |on_navigation| is true, the clearing is delayed until the next
37 // navigation event. 38 // navigation event.
38 void OnClearCache(bool on_navigation); 39 void OnClearCache(bool on_navigation);
39 40
40 // If true, the web cache shall be cleared before the next navigation event. 41 // If true, the web cache shall be cleared before the next navigation event.
41 bool clear_cache_pending_; 42 bool clear_cache_pending_;
42 bool webkit_initialized_; 43 bool webkit_initialized_;
43 size_t pending_cache_min_dead_capacity_; 44 size_t pending_cache_min_dead_capacity_;
44 size_t pending_cache_max_dead_capacity_; 45 size_t pending_cache_max_dead_capacity_;
45 size_t pending_cache_capacity_; 46 size_t pending_cache_capacity_;
46 47
47 DISALLOW_COPY_AND_ASSIGN(WebCacheRenderProcessObserver); 48 DISALLOW_COPY_AND_ASSIGN(WebCacheRenderProcessObserver);
48 }; 49 };
49 50
50 } // namespace web_cache 51 } // namespace web_cache
51 52
52 #endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_ 53 #endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_RENDER_PROCESS_OBSERVER_H_
53 54
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698