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

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

Issue 342053002: Add UMA metrics for Android Chrome Google Search. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed dupe check and updated omnibox search accesspoint check. Created 6 years, 6 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
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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 379
380 // To be called once the cookie store for this profile has been loaded. 380 // To be called once the cookie store for this profile has been loaded.
381 void OnCookieStoreLoaded(); 381 void OnCookieStoreLoaded();
382 382
383 // For testing purposes. Issues a callback once the cookie store has been 383 // For testing purposes. Issues a callback once the cookie store has been
384 // loaded. 384 // loaded.
385 void set_on_cookie_store_loaded_cb_for_testing(base::Closure cb) { 385 void set_on_cookie_store_loaded_cb_for_testing(base::Closure cb) {
386 on_cookie_store_loaded_cb_for_testing_ = cb; 386 on_cookie_store_loaded_cb_for_testing_ = cb;
387 } 387 }
388 388
389 // Returns whether prerendering is currently enabled for this manager.
390 bool IsEnabled() const;
Peter Kasting 2014/06/20 01:23:19 Nit: I suggest putting this just above AddProfileN
kmadhusu 2014/06/20 01:40:51 Done.
391
389 protected: 392 protected:
390 class PendingSwap; 393 class PendingSwap;
391 class PrerenderData : public base::SupportsWeakPtr<PrerenderData> { 394 class PrerenderData : public base::SupportsWeakPtr<PrerenderData> {
392 public: 395 public:
393 struct OrderByExpiryTime; 396 struct OrderByExpiryTime;
394 397
395 PrerenderData(PrerenderManager* manager, 398 PrerenderData(PrerenderManager* manager,
396 PrerenderContents* contents, 399 PrerenderContents* contents,
397 base::TimeTicks expiry_time); 400 base::TimeTicks expiry_time);
398 401
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 FinalStatus final_status); 656 FinalStatus final_status);
654 657
655 // Records the final status a prerender in the case that a PrerenderContents 658 // Records the final status a prerender in the case that a PrerenderContents
656 // was never created, and also adds a PrerenderHistory entry. 659 // was never created, and also adds a PrerenderHistory entry.
657 // This is a helper function which will ultimately call 660 // This is a helper function which will ultimately call
658 // RecordFinalStatusWthMatchCompleteStatus, using MATCH_COMPLETE_DEFAULT. 661 // RecordFinalStatusWthMatchCompleteStatus, using MATCH_COMPLETE_DEFAULT.
659 void RecordFinalStatusWithoutCreatingPrerenderContents( 662 void RecordFinalStatusWithoutCreatingPrerenderContents(
660 const GURL& url, Origin origin, uint8 experiment_id, 663 const GURL& url, Origin origin, uint8 experiment_id,
661 FinalStatus final_status) const; 664 FinalStatus final_status) const;
662 665
663 // Returns whether prerendering is currently enabled for this manager.
664 // Must be called on the UI thread.
665 bool IsEnabled() const;
666 666
667 void CookieChanged(ChromeCookieDetails* details); 667 void CookieChanged(ChromeCookieDetails* details);
668 void CookieChangedAnyCookiesLeftLookupResult(const std::string& domain_key, 668 void CookieChangedAnyCookiesLeftLookupResult(const std::string& domain_key,
669 bool cookies_exist); 669 bool cookies_exist);
670 void LoggedInPredictorDataReceived(scoped_ptr<LoggedInStateMap> new_map); 670 void LoggedInPredictorDataReceived(scoped_ptr<LoggedInStateMap> new_map);
671 671
672 void RecordEvent(PrerenderContents* contents, PrerenderEvent event) const; 672 void RecordEvent(PrerenderContents* contents, PrerenderEvent event) const;
673 673
674 // Swaps a prerender |prerender_data| for |url| into the tab, replacing 674 // Swaps a prerender |prerender_data| for |url| into the tab, replacing
675 // |web_contents|. Returns the new WebContents that was swapped in, or NULL 675 // |web_contents|. Returns the new WebContents that was swapped in, or NULL
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 bool cookie_store_loaded_; 759 bool cookie_store_loaded_;
760 760
761 base::Closure on_cookie_store_loaded_cb_for_testing_; 761 base::Closure on_cookie_store_loaded_cb_for_testing_;
762 762
763 DISALLOW_COPY_AND_ASSIGN(PrerenderManager); 763 DISALLOW_COPY_AND_ASSIGN(PrerenderManager);
764 }; 764 };
765 765
766 } // namespace prerender 766 } // namespace prerender
767 767
768 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_ 768 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698