OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016 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 CONTENT_PUBLIC_COMMON_PREFETCH_ARGUMENT_WIN_H_ | |
jam
2016/01/20 23:17:36
this is is in content/public but it's not called f
fdoray
2016/01/21 01:39:51
This will be used outside of content [1]. I wanted
gab
2016/01/21 20:22:59
As much as I like smaller CLs I think it's better
| |
6 #define CONTENT_PUBLIC_COMMON_PREFETCH_ARGUMENT_WIN_H_ | |
7 | |
8 #include "content/common/content_export.h" | |
9 | |
10 namespace base { | |
11 class CommandLine; | |
12 } // namespace base | |
13 | |
14 namespace content { | |
15 | |
16 enum PrefetchId { | |
17 PREFETCH_ID_BROWSER = 0, | |
18 PREFETCH_ID_RENDERER, | |
19 PREFETCH_ID_GPU, | |
20 PREFETCH_ID_PPAPI, | |
21 | |
22 // Prefetch ids used by the embedder should start here. | |
23 PREFETCH_ID_CONTENT_END, | |
24 | |
25 // Default prefetch id, shared by all process types that don't have their own. | |
26 // It is likely that the prefetcher won't work for these process types as it | |
27 // won't be able to observe consistent disk reads across launches. However, | |
28 // having a valid prefetch argument for these process types prevents them to | |
29 // prevent from interfering with the prefetch profile of the browser process. | |
30 PREFETCH_ID_DEFAULT = 8, | |
31 }; | |
32 | |
33 // Adds to |command_line| a /prefetch argument with id |prefetch_id|. It has | |
34 // been observed that when reads are consistent for 3 process launches with the | |
35 // same prefetch argument, the prefetcher starts issuing reads in batch at | |
36 // process launch. This is more efficient than reading a few pages at a time on- | |
37 // demand. Because reads depend on the process type, the prefetcher can't | |
38 // observe consistent reads if no /prefetch argument is used. | |
39 void CONTENT_EXPORT AddWindowsPrefetchArgument(int prefetch_id, | |
40 base::CommandLine* command_line); | |
41 | |
42 } // namespace content | |
43 | |
44 #endif // CONTENT_PUBLIC_COMMON_PREFETCH_ARGUMENT_WIN_H_ | |
OLD | NEW |