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

Side by Side Diff: webkit/glue/weburlloader_impl.cc

Issue 3050016: Implement prefetching in chrome (Closed)
Patch Set: merge to trunk Created 10 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
« no previous file with comments | « webkit/glue/resource_type.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge.
6 6
7 #include "webkit/glue/weburlloader_impl.h" 7 #include "webkit/glue/weburlloader_impl.h"
8 8
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 case WebURLRequest::TargetIsImage: 125 case WebURLRequest::TargetIsImage:
126 return ResourceType::IMAGE; 126 return ResourceType::IMAGE;
127 case WebURLRequest::TargetIsObject: 127 case WebURLRequest::TargetIsObject:
128 return ResourceType::OBJECT; 128 return ResourceType::OBJECT;
129 case WebURLRequest::TargetIsMedia: 129 case WebURLRequest::TargetIsMedia:
130 return ResourceType::MEDIA; 130 return ResourceType::MEDIA;
131 case WebURLRequest::TargetIsWorker: 131 case WebURLRequest::TargetIsWorker:
132 return ResourceType::WORKER; 132 return ResourceType::WORKER;
133 case WebURLRequest::TargetIsSharedWorker: 133 case WebURLRequest::TargetIsSharedWorker:
134 return ResourceType::SHARED_WORKER; 134 return ResourceType::SHARED_WORKER;
135 case WebURLRequest::TargetIsPrefetch:
136 return ResourceType::PREFETCH;
135 default: 137 default:
136 NOTREACHED(); 138 NOTREACHED();
137 return ResourceType::SUB_RESOURCE; 139 return ResourceType::SUB_RESOURCE;
138 } 140 }
139 } 141 }
140 142
141 // Extracts the information from a data: url. 143 // Extracts the information from a data: url.
142 bool GetInfoFromDataURL(const GURL& url, 144 bool GetInfoFromDataURL(const GURL& url,
143 ResourceLoaderBridge::ResponseInfo* info, 145 ResourceLoaderBridge::ResponseInfo* info,
144 std::string* data, URLRequestStatus* status) { 146 std::string* data, URLRequestStatus* status) {
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 689
688 void WebURLLoaderImpl::cancel() { 690 void WebURLLoaderImpl::cancel() {
689 context_->Cancel(); 691 context_->Cancel();
690 } 692 }
691 693
692 void WebURLLoaderImpl::setDefersLoading(bool value) { 694 void WebURLLoaderImpl::setDefersLoading(bool value) {
693 context_->SetDefersLoading(value); 695 context_->SetDefersLoading(value);
694 } 696 }
695 697
696 } // namespace webkit_glue 698 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/resource_type.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698