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_contents.h" | 5 #include "chrome/browser/prerender/prerender_contents.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 it != urls.end(); ++it) { | 656 it != urls.end(); ++it) { |
657 if (it->icon_type == FaviconURL::FAVICON) { | 657 if (it->icon_type == FaviconURL::FAVICON) { |
658 icon_url_ = it->icon_url; | 658 icon_url_ = it->icon_url; |
659 VLOG(1) << icon_url_; | 659 VLOG(1) << icon_url_; |
660 return; | 660 return; |
661 } | 661 } |
662 } | 662 } |
663 } | 663 } |
664 | 664 |
665 bool PrerenderContents::AddAliasURL(const GURL& url) { | 665 bool PrerenderContents::AddAliasURL(const GURL& url) { |
666 if (!url.SchemeIs("http")) { | 666 if (!url.SchemeIs(chrome::kHttpScheme)) { |
667 if (url.SchemeIs("https")) | 667 if (url.SchemeIs(chrome::kHttpsScheme)) |
668 Destroy(FINAL_STATUS_HTTPS); | 668 Destroy(FINAL_STATUS_HTTPS); |
669 else | 669 else |
670 Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); | 670 Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); |
671 return false; | 671 return false; |
672 } | 672 } |
673 if (prerender_manager_->HasRecentlyBeenNavigatedTo(url)) { | 673 if (prerender_manager_->HasRecentlyBeenNavigatedTo(url)) { |
674 Destroy(FINAL_STATUS_RECENTLY_VISITED); | 674 Destroy(FINAL_STATUS_RECENTLY_VISITED); |
675 return false; | 675 return false; |
676 } | 676 } |
677 alias_urls_.push_back(url); | 677 alias_urls_.push_back(url); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 } | 825 } |
826 return render_view_host_; | 826 return render_view_host_; |
827 } | 827 } |
828 | 828 |
829 void PrerenderContents::CommitHistory(TabContents* tc) { | 829 void PrerenderContents::CommitHistory(TabContents* tc) { |
830 if (tab_contents_delegate_.get()) | 830 if (tab_contents_delegate_.get()) |
831 tab_contents_delegate_->CommitHistory(tc); | 831 tab_contents_delegate_->CommitHistory(tc); |
832 } | 832 } |
833 | 833 |
834 } // namespace prerender | 834 } // namespace prerender |
OLD | NEW |