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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_impl.cc

Issue 663563002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" 7 #include "content/browser/loader/resource_dispatcher_host_impl.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 scoped_ptr<StreamInfo> stream_info(new StreamInfo); 741 scoped_ptr<StreamInfo> stream_info(new StreamInfo);
742 stream_info->handle = handler->stream()->CreateHandle(); 742 stream_info->handle = handler->stream()->CreateHandle();
743 stream_info->original_url = request->url(); 743 stream_info->original_url = request->url();
744 stream_info->mime_type = mime_type; 744 stream_info->mime_type = mime_type;
745 // Make a copy of the response headers so it is safe to pass across threads; 745 // Make a copy of the response headers so it is safe to pass across threads;
746 // the old handler (AsyncResourceHandler) may modify it in parallel via the 746 // the old handler (AsyncResourceHandler) may modify it in parallel via the
747 // ResourceDispatcherHostDelegate. 747 // ResourceDispatcherHostDelegate.
748 stream_info->response_headers = 748 stream_info->response_headers =
749 new net::HttpResponseHeaders(response->head.headers->raw_headers()); 749 new net::HttpResponseHeaders(response->head.headers->raw_headers());
750 delegate_->OnStreamCreated(request, stream_info.Pass()); 750 delegate_->OnStreamCreated(request, stream_info.Pass());
751 return handler.PassAs<ResourceHandler>(); 751 return handler.Pass();
752 } 752 }
753 753
754 ResourceDispatcherHostLoginDelegate* 754 ResourceDispatcherHostLoginDelegate*
755 ResourceDispatcherHostImpl::CreateLoginDelegate( 755 ResourceDispatcherHostImpl::CreateLoginDelegate(
756 ResourceLoader* loader, 756 ResourceLoader* loader,
757 net::AuthChallengeInfo* auth_info) { 757 net::AuthChallengeInfo* auth_info) {
758 if (!delegate_) 758 if (!delegate_)
759 return NULL; 759 return NULL;
760 760
761 return delegate_->CreateLoginDelegate(auth_info, loader->request()); 761 return delegate_->CreateLoginDelegate(auth_info, loader->request());
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 2164
2165 // Add a flag to selectively bypass the data reduction proxy if the resource 2165 // Add a flag to selectively bypass the data reduction proxy if the resource
2166 // type is not an image. 2166 // type is not an image.
2167 if (request_data.resource_type != RESOURCE_TYPE_IMAGE) 2167 if (request_data.resource_type != RESOURCE_TYPE_IMAGE)
2168 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY; 2168 load_flags |= net::LOAD_BYPASS_DATA_REDUCTION_PROXY;
2169 2169
2170 return load_flags; 2170 return load_flags;
2171 } 2171 }
2172 2172
2173 } // namespace content 2173 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_browsertest.cc ('k') | content/browser/loader/resource_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698