| 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 #include "chrome/browser/prerender/prerender_manager.h" | 5 #include "chrome/browser/prerender/prerender_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 tc->DidNavigate(rvh, *p); | 339 tc->DidNavigate(rvh, *p); |
| 340 | 340 |
| 341 string16 title = pc->title(); | 341 string16 title = pc->title(); |
| 342 if (!title.empty()) | 342 if (!title.empty()) |
| 343 tc->UpdateTitle(rvh, pc->page_id(), UTF16ToWideHack(title)); | 343 tc->UpdateTitle(rvh, pc->page_id(), UTF16ToWideHack(title)); |
| 344 | 344 |
| 345 GURL icon_url = pc->icon_url(); | 345 GURL icon_url = pc->icon_url(); |
| 346 if (!icon_url.is_empty()) { | 346 if (!icon_url.is_empty()) { |
| 347 LOG(INFO) << "MaybeUsePreloadedPage"; | 347 LOG(INFO) << "MaybeUsePreloadedPage"; |
| 348 std::vector<FaviconURL> urls; | 348 std::vector<FaviconURL> urls; |
| 349 urls.push_back(FaviconURL(icon_url, FAVICON)); | 349 urls.push_back(FaviconURL(icon_url, FaviconURL::FAVICON)); |
| 350 tc->favicon_helper().OnUpdateFaviconURL(pc->page_id(), urls); | 350 tc->favicon_helper().OnUpdateFaviconURL(pc->page_id(), urls); |
| 351 } | 351 } |
| 352 | 352 |
| 353 if (pc->has_stopped_loading()) | 353 if (pc->has_stopped_loading()) |
| 354 tc->DidStopLoading(); | 354 tc->DidStopLoading(); |
| 355 | 355 |
| 356 return true; | 356 return true; |
| 357 } | 357 } |
| 358 | 358 |
| 359 void PrerenderManager::RemoveEntry(PrerenderContents* entry) { | 359 void PrerenderManager::RemoveEntry(PrerenderContents* entry) { |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 | 584 |
| 585 bool PrerenderManager::IsTabContentsPrerendered(TabContents* tc) const { | 585 bool PrerenderManager::IsTabContentsPrerendered(TabContents* tc) const { |
| 586 return prerendered_tc_set_.count(tc) > 0; | 586 return prerendered_tc_set_.count(tc) > 0; |
| 587 } | 587 } |
| 588 | 588 |
| 589 bool PrerenderManager::WouldTabContentsBePrerendered(TabContents* tc) const { | 589 bool PrerenderManager::WouldTabContentsBePrerendered(TabContents* tc) const { |
| 590 return would_be_prerendered_tc_set_.count(tc) > 0; | 590 return would_be_prerendered_tc_set_.count(tc) > 0; |
| 591 } | 591 } |
| 592 | 592 |
| 593 } // namespace prerender | 593 } // namespace prerender |
| OLD | NEW |