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

Side by Side Diff: chrome/browser/prerender/prerender_manager.h

Issue 2184963002: Prerender: NoStatePrefetch browser side changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove histogram change as they will all be going away. Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 enum PrerenderManagerMode { 76 enum PrerenderManagerMode {
77 PRERENDER_MODE_DISABLED = 0, 77 PRERENDER_MODE_DISABLED = 0,
78 PRERENDER_MODE_ENABLED = 1, 78 PRERENDER_MODE_ENABLED = 1,
79 PRERENDER_MODE_EXPERIMENT_CONTROL_GROUP = 2, 79 PRERENDER_MODE_EXPERIMENT_CONTROL_GROUP = 2,
80 PRERENDER_MODE_EXPERIMENT_PRERENDER_GROUP = 3, 80 PRERENDER_MODE_EXPERIMENT_PRERENDER_GROUP = 3,
81 // Obsolete: PRERENDER_MODE_EXPERIMENT_5MIN_TTL_GROUP = 4, 81 // Obsolete: PRERENDER_MODE_EXPERIMENT_5MIN_TTL_GROUP = 4,
82 PRERENDER_MODE_EXPERIMENT_NO_USE_GROUP = 5, 82 PRERENDER_MODE_EXPERIMENT_NO_USE_GROUP = 5,
83 PRERENDER_MODE_EXPERIMENT_MULTI_PRERENDER_GROUP = 6, 83 PRERENDER_MODE_EXPERIMENT_MULTI_PRERENDER_GROUP = 6,
84 PRERENDER_MODE_EXPERIMENT_15MIN_TTL_GROUP = 7, 84 PRERENDER_MODE_EXPERIMENT_15MIN_TTL_GROUP = 7,
85 // Obsolete: PRERENDER_MODE_EXPERIMENT_MATCH_COMPLETE_GROUP = 8, 85 // Obsolete: PRERENDER_MODE_EXPERIMENT_MATCH_COMPLETE_GROUP = 8,
86 PRERENDER_MODE_MAX = 9 86 PRERENDER_MODE_NOSTATE_PREFETCH = 9,
87 PRERENDER_MODE_MAX = 10
87 }; 88 };
88 89
89 // One or more of these flags must be passed to ClearData() to specify just 90 // One or more of these flags must be passed to ClearData() to specify just
90 // what data to clear. See function declaration for more information. 91 // what data to clear. See function declaration for more information.
91 enum ClearFlags { 92 enum ClearFlags {
92 CLEAR_PRERENDER_CONTENTS = 0x1 << 0, 93 CLEAR_PRERENDER_CONTENTS = 0x1 << 0,
93 CLEAR_PRERENDER_HISTORY = 0x1 << 1, 94 CLEAR_PRERENDER_HISTORY = 0x1 << 1,
94 CLEAR_MAX = 0x1 << 2 95 CLEAR_MAX = 0x1 << 2
95 }; 96 };
96 97
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 double fraction_plt_elapsed_at_swap_in, 198 double fraction_plt_elapsed_at_swap_in,
198 const GURL& url); 199 const GURL& url);
199 200
200 static PrerenderManagerMode GetMode(); 201 static PrerenderManagerMode GetMode();
201 static void SetMode(PrerenderManagerMode mode); 202 static void SetMode(PrerenderManagerMode mode);
202 static const char* GetModeString(); 203 static const char* GetModeString();
203 static bool IsPrerenderingPossible(); 204 static bool IsPrerenderingPossible();
204 static bool ActuallyPrerendering(); 205 static bool ActuallyPrerendering();
205 static bool IsControlGroup(); 206 static bool IsControlGroup();
206 static bool IsNoUseGroup(); 207 static bool IsNoUseGroup();
208 static bool IsNoStatePrefetch();
207 209
208 // Query the list of current prerender pages to see if the given web contents 210 // Query the list of current prerender pages to see if the given web contents
209 // is prerendering a page. The optional parameter |origin| is an output 211 // is prerendering a page. The optional parameter |origin| is an output
210 // parameter which, if a prerender is found, is set to the Origin of the 212 // parameter which, if a prerender is found, is set to the Origin of the
211 // prerender |web_contents|. 213 // prerender |web_contents|.
212 bool IsWebContentsPrerendering(const content::WebContents* web_contents, 214 bool IsWebContentsPrerendering(const content::WebContents* web_contents,
213 Origin* origin) const; 215 Origin* origin) const;
214 216
215 // Whether the PrerenderManager has an active prerender with the given url and 217 // Whether the PrerenderManager has an active prerender with the given url and
216 // SessionStorageNamespace associated with the given WebContents. 218 // SessionStorageNamespace associated with the given WebContents.
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // Set of process hosts being prerendered. 562 // Set of process hosts being prerendered.
561 using PrerenderProcessSet = std::set<content::RenderProcessHost*>; 563 using PrerenderProcessSet = std::set<content::RenderProcessHost*>;
562 PrerenderProcessSet prerender_process_hosts_; 564 PrerenderProcessSet prerender_process_hosts_;
563 565
564 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 566 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
565 }; 567 };
566 568
567 } // namespace prerender 569 } // namespace prerender
568 570
569 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 571 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_field_trial.cc ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698