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

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

Issue 109983006: Remove calls of PrerenderTracker::TryCancel on UI thread and instead have them call PrerenderConten… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 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 | « chrome/browser/chrome_content_browser_client.cc ('k') | no next file » | 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 #include "chrome/browser/prerender/prerender_manager.h" 5 #include "chrome/browser/prerender/prerender_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 CookieChanged(content::Details<ChromeCookieDetails>(details).ptr()); 1747 CookieChanged(content::Details<ChromeCookieDetails>(details).ptr());
1748 } 1748 }
1749 1749
1750 void PrerenderManager::OnCreatingAudioStream(int render_process_id, 1750 void PrerenderManager::OnCreatingAudioStream(int render_process_id,
1751 int render_view_id) { 1751 int render_view_id) {
1752 WebContents* tab = tab_util::GetWebContentsByID( 1752 WebContents* tab = tab_util::GetWebContentsByID(
1753 render_process_id, render_view_id); 1753 render_process_id, render_view_id);
1754 if (!tab) 1754 if (!tab)
1755 return; 1755 return;
1756 1756
1757 if (!IsWebContentsPrerendering(tab, NULL)) 1757 PrerenderContents* prerender_contents = GetPrerenderContents(tab);
1758 if (!prerender_contents)
1758 return; 1759 return;
1759 1760
1760 prerender_tracker()->TryCancel( 1761 prerender_contents->Destroy(prerender::FINAL_STATUS_CREATING_AUDIO_STREAM);
1761 render_process_id, render_view_id,
1762 prerender::FINAL_STATUS_CREATING_AUDIO_STREAM);
1763 } 1762 }
1764 1763
1765 void PrerenderManager::RecordLikelyLoginOnURL(const GURL& url) { 1764 void PrerenderManager::RecordLikelyLoginOnURL(const GURL& url) {
1766 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1765 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1767 if (!url.SchemeIsHTTPOrHTTPS()) 1766 if (!url.SchemeIsHTTPOrHTTPS())
1768 return; 1767 return;
1769 if (logged_in_predictor_table_.get()) { 1768 if (logged_in_predictor_table_.get()) {
1770 BrowserThread::PostTask( 1769 BrowserThread::PostTask(
1771 BrowserThread::DB, 1770 BrowserThread::DB,
1772 FROM_HERE, 1771 FROM_HERE,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 void PrerenderManager::RecordEvent(PrerenderContents* contents, 1867 void PrerenderManager::RecordEvent(PrerenderContents* contents,
1869 PrerenderEvent event) const { 1868 PrerenderEvent event) const {
1870 if (!contents) 1869 if (!contents)
1871 histograms_->RecordEvent(ORIGIN_NONE, kNoExperiment, event); 1870 histograms_->RecordEvent(ORIGIN_NONE, kNoExperiment, event);
1872 else 1871 else
1873 histograms_->RecordEvent(contents->origin(), contents->experiment_id(), 1872 histograms_->RecordEvent(contents->origin(), contents->experiment_id(),
1874 event); 1873 event);
1875 } 1874 }
1876 1875
1877 } // namespace prerender 1876 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698