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

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

Issue 2449933003: Use Associated interfaces for mojo-loading (Closed)
Patch Set: fix Created 4 years, 1 month 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/loader/mojo_async_resource_handler.h" 5 #include "content/browser/loader/mojo_async_resource_handler.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // This member is for keeping the writer alive. 97 // This member is for keeping the writer alive.
98 scoped_refptr<SharedWriter> writer_; 98 scoped_refptr<SharedWriter> writer_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(WriterIOBuffer); 100 DISALLOW_COPY_AND_ASSIGN(WriterIOBuffer);
101 }; 101 };
102 102
103 MojoAsyncResourceHandler::MojoAsyncResourceHandler( 103 MojoAsyncResourceHandler::MojoAsyncResourceHandler(
104 net::URLRequest* request, 104 net::URLRequest* request,
105 ResourceDispatcherHostImpl* rdh, 105 ResourceDispatcherHostImpl* rdh,
106 mojo::InterfaceRequest<mojom::URLLoader> mojo_request, 106 mojom::URLLoaderAssociatedRequest mojo_request,
107 mojom::URLLoaderClientPtr url_loader_client) 107 mojom::URLLoaderClientAssociatedPtr url_loader_client)
108 : ResourceHandler(request), 108 : ResourceHandler(request),
109 rdh_(rdh), 109 rdh_(rdh),
110 binding_(this, std::move(mojo_request)), 110 binding_(this, std::move(mojo_request)),
111 url_loader_client_(std::move(url_loader_client)) { 111 url_loader_client_(std::move(url_loader_client)) {
112 DCHECK(url_loader_client_); 112 DCHECK(url_loader_client_);
113 InitializeResourceBufferConstants(); 113 InitializeResourceBufferConstants();
114 } 114 }
115 115
116 MojoAsyncResourceHandler::~MojoAsyncResourceHandler() { 116 MojoAsyncResourceHandler::~MojoAsyncResourceHandler() {
117 if (has_checked_for_sufficient_resources_) 117 if (has_checked_for_sufficient_resources_)
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 388
389 controller()->CancelWithError(net::ERR_INSUFFICIENT_RESOURCES); 389 controller()->CancelWithError(net::ERR_INSUFFICIENT_RESOURCES);
390 return false; 390 return false;
391 } 391 }
392 392
393 void MojoAsyncResourceHandler::OnWritable(MojoResult unused) { 393 void MojoAsyncResourceHandler::OnWritable(MojoResult unused) {
394 Resume(); 394 Resume();
395 } 395 }
396 396
397 } // namespace content 397 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/mojo_async_resource_handler.h ('k') | content/browser/loader/mojo_async_resource_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698