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

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

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 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_IMPL_H_ 5 #ifndef COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_IMPL_H_
6 #define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_IMPL_H_ 6 #define COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 17 matching lines...) Expand all
28 void ExecutePendingClearCache(); 28 void ExecutePendingClearCache();
29 29
30 private: 30 private:
31 enum State { 31 enum State {
32 kInit, 32 kInit,
33 kNavigate_Pending, 33 kNavigate_Pending,
34 kClearCache_Pending, 34 kClearCache_Pending,
35 }; 35 };
36 36
37 // mojom::WebCache methods: 37 // mojom::WebCache methods:
38 void SetCacheCapacities(uint64_t min_dead_capacity, 38 void SetCacheCapacity(uint64_t capacity) override;
39 uint64_t max_dead_capacity,
40 uint64_t capacity) override;
41 // If |on_navigation| is true, the clearing is delayed until the next 39 // If |on_navigation| is true, the clearing is delayed until the next
42 // navigation event. 40 // navigation event.
43 void ClearCache(bool on_navigation) override; 41 void ClearCache(bool on_navigation) override;
44 42
45 // Records status regarding the sequence of navigation event and 43 // Records status regarding the sequence of navigation event and
46 // ClearCache(true) call, to ensure delayed 'clear cache' command always 44 // ClearCache(true) call, to ensure delayed 'clear cache' command always
47 // get executed on navigation. 45 // get executed on navigation.
48 State clear_cache_state_; 46 State clear_cache_state_;
49 47
50 mojo::BindingSet<mojom::WebCache> bindings_; 48 mojo::BindingSet<mojom::WebCache> bindings_;
51 49
52 DISALLOW_COPY_AND_ASSIGN(WebCacheImpl); 50 DISALLOW_COPY_AND_ASSIGN(WebCacheImpl);
53 }; 51 };
54 52
55 } // namespace web_cache 53 } // namespace web_cache
56 54
57 #endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_IMPL_H_ 55 #endif // COMPONENTS_WEB_CACHE_RENDERER_WEB_CACHE_IMPL_H_
OLDNEW
« no previous file with comments | « components/web_cache/public/interfaces/web_cache.mojom ('k') | components/web_cache/renderer/web_cache_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698