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

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

Issue 11416179: Move chrome/common/favicon_url.(cc|h) into content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 #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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 // Merge the browsing history. 432 // Merge the browsing history.
433 new_tab_contents->web_contents()->GetController().CopyStateFromAndPrune( 433 new_tab_contents->web_contents()->GetController().CopyStateFromAndPrune(
434 &old_tab_contents->web_contents()->GetController()); 434 &old_tab_contents->web_contents()->GetController());
435 CoreTabHelper::FromWebContents(old_tab_contents->web_contents())->delegate()-> 435 CoreTabHelper::FromWebContents(old_tab_contents->web_contents())->delegate()->
436 SwapTabContents(old_tab_contents->web_contents(), 436 SwapTabContents(old_tab_contents->web_contents(),
437 new_tab_contents->web_contents()); 437 new_tab_contents->web_contents());
438 prerender_contents->CommitHistory(new_tab_contents); 438 prerender_contents->CommitHistory(new_tab_contents);
439 439
440 GURL icon_url = prerender_contents->icon_url(); 440 GURL icon_url = prerender_contents->icon_url();
441 if (!icon_url.is_empty()) { 441 if (!icon_url.is_empty()) {
442 std::vector<FaviconURL> urls; 442 std::vector<content::FaviconURL> urls;
443 urls.push_back(FaviconURL(icon_url, FaviconURL::FAVICON)); 443 urls.push_back(content::FaviconURL(icon_url, content::FaviconURL::FAVICON));
444 FaviconTabHelper::FromWebContents(new_tab_contents->web_contents())-> 444 FaviconTabHelper::FromWebContents(new_tab_contents->web_contents())->
445 OnUpdateFaviconURL(prerender_contents->page_id(), urls); 445 OnUpdateFaviconURL(prerender_contents->page_id(), urls);
446 } 446 }
447 447
448 // Update PPLT metrics: 448 // Update PPLT metrics:
449 // If the tab has finished loading, record a PPLT of 0. 449 // If the tab has finished loading, record a PPLT of 0.
450 // If the tab is still loading, reset its start time to the current time. 450 // If the tab is still loading, reset its start time to the current time.
451 PrerenderTabHelper* prerender_tab_helper = 451 PrerenderTabHelper* prerender_tab_helper =
452 PrerenderTabHelper::FromWebContents(new_tab_contents->web_contents()); 452 PrerenderTabHelper::FromWebContents(new_tab_contents->web_contents());
453 DCHECK(prerender_tab_helper != NULL); 453 DCHECK(prerender_tab_helper != NULL);
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 if (!render_process_host || !render_process_host->GetBrowserContext()) 1351 if (!render_process_host || !render_process_host->GetBrowserContext())
1352 return NULL; 1352 return NULL;
1353 Profile* profile = Profile::FromBrowserContext( 1353 Profile* profile = Profile::FromBrowserContext(
1354 render_process_host->GetBrowserContext()); 1354 render_process_host->GetBrowserContext());
1355 if (!profile) 1355 if (!profile)
1356 return NULL; 1356 return NULL;
1357 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile); 1357 return PrerenderManagerFactory::GetInstance()->GetForProfile(profile);
1358 } 1358 }
1359 1359
1360 } // namespace prerender 1360 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.cc ('k') | chrome/browser/prerender/prerender_render_view_host_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698