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

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

Issue 2535723005: Stop using ResourceController in ResourceThrottle (Closed)
Patch Set: Addressed #62 Created 4 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Additional valid HTTP methods for prerendering. 64 // Additional valid HTTP methods for prerendering.
65 const char* const kValidHttpMethodsForPrerendering[] = { 65 const char* const kValidHttpMethodsForPrerendering[] = {
66 "OPTIONS", "POST", "TRACE", 66 "OPTIONS", "POST", "TRACE",
67 }; 67 };
68 68
69 void ResumeThrottles( 69 void ResumeThrottles(
70 std::vector<base::WeakPtr<PrerenderResourceThrottle> > throttles) { 70 std::vector<base::WeakPtr<PrerenderResourceThrottle> > throttles) {
71 for (size_t i = 0; i < throttles.size(); i++) { 71 for (size_t i = 0; i < throttles.size(); i++) {
72 if (throttles[i]) 72 if (throttles[i])
73 throttles[i]->Resume(); 73 throttles[i]->ResumeHandler();
74 } 74 }
75 } 75 }
76 76
77 } // namespace 77 } // namespace
78 78
79 class PrerenderContentsFactoryImpl : public PrerenderContents::Factory { 79 class PrerenderContentsFactoryImpl : public PrerenderContents::Factory {
80 public: 80 public:
81 PrerenderContents* CreatePrerenderContents( 81 PrerenderContents* CreatePrerenderContents(
82 PrerenderManager* prerender_manager, 82 PrerenderManager* prerender_manager,
83 Profile* profile, 83 Profile* profile,
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 void PrerenderContents::AddResourceThrottle( 746 void PrerenderContents::AddResourceThrottle(
747 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { 747 const base::WeakPtr<PrerenderResourceThrottle>& throttle) {
748 resource_throttles_.push_back(throttle); 748 resource_throttles_.push_back(throttle);
749 } 749 }
750 750
751 void PrerenderContents::AddNetworkBytes(int64_t bytes) { 751 void PrerenderContents::AddNetworkBytes(int64_t bytes) {
752 network_bytes_ += bytes; 752 network_bytes_ += bytes;
753 } 753 }
754 754
755 } // namespace prerender 755 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/loader/safe_browsing_resource_throttle.cc ('k') | chrome/browser/prerender/prerender_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698