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

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

Issue 286433002: Add to the prerender history when no PrerenderContents is created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 // well as any swapped out WebContents queued for destruction. 642 // well as any swapped out WebContents queued for destruction.
643 // Used both on destruction, and when clearing the browsing history. 643 // Used both on destruction, and when clearing the browsing history.
644 void DestroyAllContents(FinalStatus final_status); 644 void DestroyAllContents(FinalStatus final_status);
645 645
646 // Helper function to destroy a PrerenderContents with the specified 646 // Helper function to destroy a PrerenderContents with the specified
647 // final_status, while at the same time recording that for the MatchComplete 647 // final_status, while at the same time recording that for the MatchComplete
648 // case, that this prerender would have been used. 648 // case, that this prerender would have been used.
649 void DestroyAndMarkMatchCompleteAsUsed(PrerenderContents* prerender_contents, 649 void DestroyAndMarkMatchCompleteAsUsed(PrerenderContents* prerender_contents,
650 FinalStatus final_status); 650 FinalStatus final_status);
651 651
652 // Record a final status of a prerendered page in a histogram. 652 // Records the final status a prerender in the case that a PrerenderContents
653 // was never created, and also adds a PrerenderHistory entry.
653 // This is a helper function which will ultimately call 654 // This is a helper function which will ultimately call
654 // RecordFinalStatusWthMatchCompleteStatus, using MATCH_COMPLETE_DEFAULT. 655 // RecordFinalStatusWthMatchCompleteStatus, using MATCH_COMPLETE_DEFAULT.
655 void RecordFinalStatus(Origin origin, 656 void RecordFinalStatusWithoutCreatingPrerenderContents(
mmenke 2014/05/12 19:23:47 Open to ideas for shorter method names, but I thin
656 uint8 experiment_id, 657 const GURL& url, Origin origin, uint8 experiment_id,
657 FinalStatus final_status) const; 658 FinalStatus final_status) const;
658 659
659 // Returns whether prerendering is currently enabled for this manager. 660 // Returns whether prerendering is currently enabled for this manager.
660 // Must be called on the UI thread. 661 // Must be called on the UI thread.
661 bool IsEnabled() const; 662 bool IsEnabled() const;
662 663
663 void CookieChanged(ChromeCookieDetails* details); 664 void CookieChanged(ChromeCookieDetails* details);
664 void CookieChangedAnyCookiesLeftLookupResult(const std::string& domain_key, 665 void CookieChangedAnyCookiesLeftLookupResult(const std::string& domain_key,
665 bool cookies_exist); 666 bool cookies_exist);
666 void LoggedInPredictorDataReceived(scoped_ptr<LoggedInStateMap> new_map); 667 void LoggedInPredictorDataReceived(scoped_ptr<LoggedInStateMap> new_map);
667 668
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 bool cookie_store_loaded_; 756 bool cookie_store_loaded_;
756 757
757 base::Closure on_cookie_store_loaded_cb_for_testing_; 758 base::Closure on_cookie_store_loaded_cb_for_testing_;
758 759
759 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 760 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
760 }; 761 };
761 762
762 } // namespace prerender 763 } // namespace prerender
763 764
764 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 765 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698