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

Side by Side Diff: android_webview/browser/net/aw_request_interceptor.cc

Issue 2851673002: Switch SupportsUserData uses to use unique_ptr. (Closed)
Patch Set: 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 "android_webview/browser/net/aw_request_interceptor.h" 5 #include "android_webview/browser/net/aw_request_interceptor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/aw_contents_io_thread_client.h" 9 #include "android_webview/browser/aw_contents_io_thread_client.h"
10 #include "android_webview/browser/input_stream.h" 10 #include "android_webview/browser/input_stream.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 if (!io_thread_client) 167 if (!io_thread_client)
168 return nullptr; 168 return nullptr;
169 169
170 GURL referrer(request->referrer()); 170 GURL referrer(request->referrer());
171 if (referrer.is_valid() && 171 if (referrer.is_valid() &&
172 (!request->is_pending() || request->is_redirecting())) { 172 (!request->is_pending() || request->is_redirecting())) {
173 request->SetExtraRequestHeaderByName(net::HttpRequestHeaders::kReferer, 173 request->SetExtraRequestHeaderByName(net::HttpRequestHeaders::kReferer,
174 referrer.spec(), true); 174 referrer.spec(), true);
175 } 175 }
176 request->SetUserData(kRequestAlreadyHasJobDataKey, 176 request->SetUserData(kRequestAlreadyHasJobDataKey,
177 new base::SupportsUserData::Data()); 177 base::MakeUnique<base::SupportsUserData::Data>());
178 return new AndroidStreamReaderURLRequestJob( 178 return new AndroidStreamReaderURLRequestJob(
179 request, network_delegate, 179 request, network_delegate,
180 base::MakeUnique<ShouldInterceptRequestAdaptor>( 180 base::MakeUnique<ShouldInterceptRequestAdaptor>(
181 std::move(io_thread_client)), 181 std::move(io_thread_client)),
182 true); 182 true);
183 } 183 }
184 184
185 } // namespace android_webview 185 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/browser_view_renderer.cc ('k') | android_webview/native/android_protocol_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698