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: mojo/services/network/url_loader_impl.cc

Issue 1725353003: Eliminate mojo::Shell client lib class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@15connector
Patch Set: . Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/services/network/url_loader_impl.h" 5 #include "mojo/services/network/url_loader_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 uint32_t num_bytes_; 134 uint32_t num_bytes_;
135 uint32_t offset_; 135 uint32_t offset_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(UploadDataPipeElementReader); 137 DISALLOW_COPY_AND_ASSIGN(UploadDataPipeElementReader);
138 }; 138 };
139 139
140 } // namespace 140 } // namespace
141 141
142 URLLoaderImpl::URLLoaderImpl(NetworkContext* context, 142 URLLoaderImpl::URLLoaderImpl(NetworkContext* context,
143 InterfaceRequest<URLLoader> request, 143 InterfaceRequest<URLLoader> request,
144 scoped_ptr<mojo::AppRefCount> app_refcount) 144 scoped_ptr<mojo::MessageLoopRef> app_refcount)
145 : context_(context), 145 : context_(context),
146 response_body_buffer_size_(0), 146 response_body_buffer_size_(0),
147 response_body_bytes_read_(0), 147 response_body_bytes_read_(0),
148 auto_follow_redirects_(true), 148 auto_follow_redirects_(true),
149 connected_(true), 149 connected_(true),
150 binding_(this, std::move(request)), 150 binding_(this, std::move(request)),
151 app_refcount_(std::move(app_refcount)), 151 app_refcount_(std::move(app_refcount)),
152 weak_ptr_factory_(this) { 152 weak_ptr_factory_(this) {
153 binding_.set_connection_error_handler([this]() { OnConnectionError(); }); 153 binding_.set_connection_error_handler([this]() { OnConnectionError(); });
154 context_->RegisterURLLoader(this); 154 context_->RegisterURLLoader(this);
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 void URLLoaderImpl::ListenForPeerClosed() { 418 void URLLoaderImpl::ListenForPeerClosed() {
419 handle_watcher_.Start(response_body_stream_.get(), 419 handle_watcher_.Start(response_body_stream_.get(),
420 MOJO_HANDLE_SIGNAL_PEER_CLOSED, 420 MOJO_HANDLE_SIGNAL_PEER_CLOSED,
421 MOJO_DEADLINE_INDEFINITE, 421 MOJO_DEADLINE_INDEFINITE,
422 base::Bind(&URLLoaderImpl::OnResponseBodyStreamClosed, 422 base::Bind(&URLLoaderImpl::OnResponseBodyStreamClosed,
423 base::Unretained(this))); 423 base::Unretained(this)));
424 } 424 }
425 425
426 } // namespace mojo 426 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/url_loader_impl.h ('k') | mojo/services/network/url_loader_impl_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698