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

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

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 // ResourceDispatcherHostDelegate implementation: 744 // ResourceDispatcherHostDelegate implementation:
745 745
746 void RequestBeginning( 746 void RequestBeginning(
747 net::URLRequest* request, 747 net::URLRequest* request,
748 ResourceContext* resource_context, 748 ResourceContext* resource_context,
749 AppCacheService* appcache_service, 749 AppCacheService* appcache_service,
750 ResourceType resource_type, 750 ResourceType resource_type,
751 std::vector<std::unique_ptr<ResourceThrottle>>* throttles) override { 751 std::vector<std::unique_ptr<ResourceThrottle>>* throttles) override {
752 if (user_data_) { 752 if (user_data_) {
753 const void* key = user_data_.get(); 753 const void* key = user_data_.get();
754 request->SetUserData(key, user_data_.release()); 754 request->SetUserData(key, std::move(user_data_));
755 } 755 }
756 756
757 if (flags_ != NONE) { 757 if (flags_ != NONE) {
758 throttles->push_back(base::MakeUnique<GenericResourceThrottle>( 758 throttles->push_back(base::MakeUnique<GenericResourceThrottle>(
759 flags_, error_code_for_cancellation_)); 759 flags_, error_code_for_cancellation_));
760 if (create_two_throttles_) 760 if (create_two_throttles_)
761 throttles->push_back(base::MakeUnique<GenericResourceThrottle>( 761 throttles->push_back(base::MakeUnique<GenericResourceThrottle>(
762 flags_, error_code_for_cancellation_)); 762 flags_, error_code_for_cancellation_));
763 } 763 }
764 } 764 }
(...skipping 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3928 return nullptr; 3928 return nullptr;
3929 } 3929 }
3930 3930
3931 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( 3931 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse(
3932 net::URLRequest* request, 3932 net::URLRequest* request,
3933 net::NetworkDelegate* network_delegate) const { 3933 net::NetworkDelegate* network_delegate) const {
3934 return nullptr; 3934 return nullptr;
3935 } 3935 }
3936 3936
3937 } // namespace content 3937 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/browser/media/session/media_session_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698