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

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

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 years, 4 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 #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 <functional> 8 #include <functional>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 } 677 }
678 } 678 }
679 679
680 void PrerenderContents::DidGetRedirectForResourceRequest( 680 void PrerenderContents::DidGetRedirectForResourceRequest(
681 RenderViewHost* render_view_host, 681 RenderViewHost* render_view_host,
682 const content::ResourceRedirectDetails& details) { 682 const content::ResourceRedirectDetails& details) {
683 // DidGetRedirectForResourceRequest can come for any resource on a page. If 683 // DidGetRedirectForResourceRequest can come for any resource on a page. If
684 // it's a redirect on the top-level resource, the name needs to be remembered 684 // it's a redirect on the top-level resource, the name needs to be remembered
685 // for future matching, and if it redirects to an https resource, it needs to 685 // for future matching, and if it redirects to an https resource, it needs to
686 // be canceled. If a subresource is redirected, nothing changes. 686 // be canceled. If a subresource is redirected, nothing changes.
687 if (details.resource_type != ResourceType::MAIN_FRAME) 687 if (details.resource_type != content::RESOURCE_TYPE_MAIN_FRAME)
688 return; 688 return;
689 CheckURL(details.new_url); 689 CheckURL(details.new_url);
690 } 690 }
691 691
692 void PrerenderContents::Destroy(FinalStatus final_status) { 692 void PrerenderContents::Destroy(FinalStatus final_status) {
693 DCHECK_NE(final_status, FINAL_STATUS_USED); 693 DCHECK_NE(final_status, FINAL_STATUS_USED);
694 694
695 if (prerendering_has_been_cancelled_) 695 if (prerendering_has_been_cancelled_)
696 return; 696 return;
697 697
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 void PrerenderContents::AddResourceThrottle( 886 void PrerenderContents::AddResourceThrottle(
887 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 887 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
888 resource_throttles_.push_back(throttle); 888 resource_throttles_.push_back(throttle);
889 } 889 }
890 890
891 void PrerenderContents::AddNetworkBytes(int64 bytes) { 891 void PrerenderContents::AddNetworkBytes(int64 bytes) {
892 network_bytes_ += bytes; 892 network_bytes_ += bytes;
893 } 893 }
894 894
895 } // namespace prerender 895 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/prerender/prerender_pending_swap_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698