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

Unified Diff: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc

Issue 1852513003: Convert //android_webview to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git is hard Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
diff --git a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
index 558819351c51df2e1621d5aee0ff03e9004b39aa..76befbcf51d64d4fc4ff6144259042ded34c0f48 100644
--- a/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
+++ b/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc
@@ -4,13 +4,13 @@
#include "android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.h"
+#include <memory>
#include <string>
#include "android_webview/browser/aw_contents_io_thread_client.h"
#include "android_webview/browser/aw_login_delegate.h"
#include "android_webview/browser/aw_resource_context.h"
#include "android_webview/common/url_constants.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/scoped_vector.h"
#include "components/auto_login_parser/auto_login_parser.h"
#include "components/navigation_interception/intercept_navigation_delegate.h"
@@ -80,7 +80,7 @@ class IoThreadClientThrottle : public content::ResourceThrottle {
int render_frame_id() const { return render_frame_id_; }
private:
- scoped_ptr<AwContentsIoThreadClient> GetIoThreadClient() const;
+ std::unique_ptr<AwContentsIoThreadClient> GetIoThreadClient() const;
int render_process_id_;
int render_frame_id_;
@@ -104,7 +104,7 @@ const char* IoThreadClientThrottle::GetNameForLogging() const {
return "IoThreadClientThrottle";
}
-scoped_ptr<AwContentsIoThreadClient>
+std::unique_ptr<AwContentsIoThreadClient>
IoThreadClientThrottle::GetIoThreadClient() const {
if (content::ResourceRequestInfo::OriginatedFromServiceWorker(request_))
return AwContentsIoThreadClient::GetServiceWorkerIoThreadClient();
@@ -120,7 +120,7 @@ void IoThreadClientThrottle::WillStartRequest(bool* defer) {
// Defer all requests of a pop up that is still not associated with Java
// client so that the client will get a chance to override requests.
- scoped_ptr<AwContentsIoThreadClient> io_client = GetIoThreadClient();
+ std::unique_ptr<AwContentsIoThreadClient> io_client = GetIoThreadClient();
if (io_client && io_client->PendingAssociation()) {
*defer = true;
AwResourceDispatcherHostDelegate::AddPendingThrottle(
@@ -154,7 +154,7 @@ bool IoThreadClientThrottle::MaybeBlockRequest() {
}
bool IoThreadClientThrottle::ShouldBlockRequest() {
- scoped_ptr<AwContentsIoThreadClient> io_client = GetIoThreadClient();
+ std::unique_ptr<AwContentsIoThreadClient> io_client = GetIoThreadClient();
if (!io_client)
return false;
@@ -245,7 +245,7 @@ void AwResourceDispatcherHostDelegate::RequestComplete(
if (request && !request->status().is_success()) {
const content::ResourceRequestInfo* request_info =
content::ResourceRequestInfo::ForRequest(request);
- scoped_ptr<AwContentsIoThreadClient> io_client =
+ std::unique_ptr<AwContentsIoThreadClient> io_client =
AwContentsIoThreadClient::FromID(request_info->GetChildID(),
request_info->GetRenderFrameID());
if (io_client) {
@@ -289,9 +289,9 @@ void AwResourceDispatcherHostDelegate::DownloadStarting(
const content::ResourceRequestInfo* request_info =
content::ResourceRequestInfo::ForRequest(request);
- scoped_ptr<AwContentsIoThreadClient> io_client =
- AwContentsIoThreadClient::FromID(
- child_id, request_info->GetRenderFrameID());
+ std::unique_ptr<AwContentsIoThreadClient> io_client =
+ AwContentsIoThreadClient::FromID(child_id,
+ request_info->GetRenderFrameID());
// POST request cannot be repeated in general, so prevent client from
// retrying the same request, even if it is with a GET.
@@ -342,7 +342,7 @@ void AwResourceDispatcherHostDelegate::OnResponseStarted(
auto_login_parser::HeaderData header_data;
if (auto_login_parser::ParserHeaderInResponse(
request, auto_login_parser::ALLOW_ANY_REALM, &header_data)) {
- scoped_ptr<AwContentsIoThreadClient> io_client =
+ std::unique_ptr<AwContentsIoThreadClient> io_client =
AwContentsIoThreadClient::FromID(request_info->GetChildID(),
request_info->GetRenderFrameID());
if (io_client) {
« no previous file with comments | « android_webview/browser/net/token_binding_manager.cc ('k') | android_webview/browser/scoped_app_gl_state_restore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698