| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // response to the CLEAR_PRERENDER_CONTENTS flag. | 198 // response to the CLEAR_PRERENDER_CONTENTS flag. |
| 199 // | 199 // |
| 200 // Intended to be used when clearing the cache or history. | 200 // Intended to be used when clearing the cache or history. |
| 201 void ClearData(int clear_flags); | 201 void ClearData(int clear_flags); |
| 202 | 202 |
| 203 // Record a final status of a prerendered page in a histogram. | 203 // Record a final status of a prerendered page in a histogram. |
| 204 void RecordFinalStatus(Origin origin, | 204 void RecordFinalStatus(Origin origin, |
| 205 uint8 experiment_id, | 205 uint8 experiment_id, |
| 206 FinalStatus final_status) const; | 206 FinalStatus final_status) const; |
| 207 | 207 |
| 208 // Record a final status of a prerendered page in a histogram. |
| 209 // This variation allows specifying whether prerendering had been started |
| 210 // (necessary to flag MatchComplete dummies). |
| 211 void RecordFinalStatusWithMatchCompleteStatus( |
| 212 Origin origin, |
| 213 uint8 experiment_id, |
| 214 PrerenderContents::MatchCompleteStatus mc_status, |
| 215 FinalStatus final_status) const; |
| 216 |
| 208 const Config& config() const { return config_; } | 217 const Config& config() const { return config_; } |
| 209 Config& mutable_config() { return config_; } | 218 Config& mutable_config() { return config_; } |
| 210 | 219 |
| 211 PrerenderTracker* prerender_tracker() { return prerender_tracker_; } | 220 PrerenderTracker* prerender_tracker() { return prerender_tracker_; } |
| 212 | 221 |
| 213 // Adds a condition. This is owned by the PrerenderManager. | 222 // Adds a condition. This is owned by the PrerenderManager. |
| 214 void AddCondition(const PrerenderCondition* condition); | 223 void AddCondition(const PrerenderCondition* condition); |
| 215 | 224 |
| 216 bool IsTopSite(const GURL& url); | 225 bool IsTopSite(const GURL& url); |
| 217 | 226 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 236 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ClearTest); | 245 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ClearTest); |
| 237 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ControlGroup); | 246 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ControlGroup); |
| 238 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, DropOldestRequestTest); | 247 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, DropOldestRequestTest); |
| 239 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, DropSecondRequestTest); | 248 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, DropSecondRequestTest); |
| 240 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExpireTest); | 249 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ExpireTest); |
| 241 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FoundTest); | 250 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FoundTest); |
| 242 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FragmentMatchesFragmentTest); | 251 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FragmentMatchesFragmentTest); |
| 243 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FragmentMatchesPageTest); | 252 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, FragmentMatchesPageTest); |
| 244 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PageMatchesFragmentTest); | 253 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PageMatchesFragmentTest); |
| 245 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PendingPrerenderTest); | 254 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, PendingPrerenderTest); |
| 255 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, ControlGroupVisited); |
| 246 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitInWindowTest); | 256 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitInWindowTest); |
| 247 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitOutsideWindowTest); | 257 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, RateLimitOutsideWindowTest); |
| 248 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, SourceRenderViewClosed); | 258 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, SourceRenderViewClosed); |
| 249 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, TwoElementPrerenderTest); | 259 FRIEND_TEST_ALL_PREFIXES(PrerenderManagerTest, TwoElementPrerenderTest); |
| 250 | 260 |
| 251 struct PrerenderContentsData; | 261 struct PrerenderContentsData; |
| 252 struct NavigationRecord; | 262 struct NavigationRecord; |
| 253 | 263 |
| 254 class OnCloseTabContentsDeleter; | 264 class OnCloseTabContentsDeleter; |
| 255 | 265 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 440 |
| 431 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); | 441 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); |
| 432 }; | 442 }; |
| 433 | 443 |
| 434 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( | 444 PrerenderManager* FindPrerenderManagerUsingRenderProcessId( |
| 435 int render_process_id); | 445 int render_process_id); |
| 436 | 446 |
| 437 } // namespace prerender | 447 } // namespace prerender |
| 438 | 448 |
| 439 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ | 449 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ |
| OLD | NEW |