| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "content/public/browser/web_contents.h" | 42 #include "content/public/browser/web_contents.h" |
| 43 #include "content/public/browser/web_contents_delegate.h" | 43 #include "content/public/browser/web_contents_delegate.h" |
| 44 #include "content/public/common/frame_navigate_params.h" | 44 #include "content/public/common/frame_navigate_params.h" |
| 45 #include "ui/base/page_transition_types.h" | 45 #include "ui/base/page_transition_types.h" |
| 46 #include "ui/gfx/geometry/size.h" | 46 #include "ui/gfx/geometry/size.h" |
| 47 | 47 |
| 48 using content::BrowserThread; | 48 using content::BrowserThread; |
| 49 using content::OpenURLParams; | 49 using content::OpenURLParams; |
| 50 using content::RenderViewHost; | 50 using content::RenderViewHost; |
| 51 using content::ResourceRedirectDetails; | 51 using content::ResourceRedirectDetails; |
| 52 using content::ResourceType; | |
| 53 using content::SessionStorageNamespace; | 52 using content::SessionStorageNamespace; |
| 54 using content::WebContents; | 53 using content::WebContents; |
| 55 | 54 |
| 56 namespace prerender { | 55 namespace prerender { |
| 57 | 56 |
| 58 namespace { | 57 namespace { |
| 59 | 58 |
| 60 // Valid HTTP methods for both prefetch and prerendering. | 59 // Valid HTTP methods for both prefetch and prerendering. |
| 61 const char* const kValidHttpMethods[] = { | 60 const char* const kValidHttpMethods[] = { |
| 62 "GET", "HEAD", | 61 "GET", "HEAD", |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 752 void PrerenderContents::AddResourceThrottle( | 751 void PrerenderContents::AddResourceThrottle( |
| 753 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { | 752 const base::WeakPtr<PrerenderResourceThrottle>& throttle) { |
| 754 resource_throttles_.push_back(throttle); | 753 resource_throttles_.push_back(throttle); |
| 755 } | 754 } |
| 756 | 755 |
| 757 void PrerenderContents::AddNetworkBytes(int64_t bytes) { | 756 void PrerenderContents::AddNetworkBytes(int64_t bytes) { |
| 758 network_bytes_ += bytes; | 757 network_bytes_ += bytes; |
| 759 } | 758 } |
| 760 | 759 |
| 761 } // namespace prerender | 760 } // namespace prerender |
| OLD | NEW |