OLD | NEW |
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 Loading... |
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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 void PrerenderContents::AddResourceThrottle( | 747 void PrerenderContents::AddResourceThrottle( |
748 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { | 748 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { |
749 resource_throttles_.push_back(throttle); | 749 resource_throttles_.push_back(throttle); |
750 } | 750 } |
751 | 751 |
752 void PrerenderContents::AddNetworkBytes(int64_t bytes) { | 752 void PrerenderContents::AddNetworkBytes(int64_t bytes) { |
753 network_bytes_ += bytes; | 753 network_bytes_ += bytes; |
754 } | 754 } |
755 | 755 |
756 } // namespace prerender | 756 } // namespace prerender |
OLD | NEW |