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

Side by Side Diff: mojo/services/network/url_loader_impl.cc

Issue 1358163006: Adds some code to help isolate where crash is happening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar Created 5 years, 2 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 "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/common/common_type_converters.h" 9 #include "mojo/common/common_type_converters.h"
10 #include "mojo/common/url_type_converters.h" 10 #include "mojo/common/url_type_converters.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 DISALLOW_COPY_AND_ASSIGN(UploadDataPipeElementReader); 130 DISALLOW_COPY_AND_ASSIGN(UploadDataPipeElementReader);
131 }; 131 };
132 132
133 } // namespace 133 } // namespace
134 134
135 URLLoaderImpl::URLLoaderImpl(NetworkContext* context, 135 URLLoaderImpl::URLLoaderImpl(NetworkContext* context,
136 InterfaceRequest<URLLoader> request, 136 InterfaceRequest<URLLoader> request,
137 scoped_ptr<mojo::AppRefCount> app_refcount) 137 scoped_ptr<mojo::AppRefCount> app_refcount)
138 : context_(context), 138 : context_(context),
139 handle_watcher_(12),
139 response_body_buffer_size_(0), 140 response_body_buffer_size_(0),
140 auto_follow_redirects_(true), 141 auto_follow_redirects_(true),
141 connected_(true), 142 connected_(true),
142 binding_(this, request.Pass()), 143 binding_(this, request.Pass()),
143 app_refcount_(app_refcount.Pass()), 144 app_refcount_(app_refcount.Pass()),
144 weak_ptr_factory_(this) { 145 weak_ptr_factory_(this) {
145 binding_.set_connection_error_handler([this]() { OnConnectionError(); }); 146 binding_.set_connection_error_handler([this]() { OnConnectionError(); });
146 context_->RegisterURLLoader(this); 147 context_->RegisterURLLoader(this);
147 } 148 }
148 149
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 404
404 void URLLoaderImpl::ListenForPeerClosed() { 405 void URLLoaderImpl::ListenForPeerClosed() {
405 handle_watcher_.Start(response_body_stream_.get(), 406 handle_watcher_.Start(response_body_stream_.get(),
406 MOJO_HANDLE_SIGNAL_PEER_CLOSED, 407 MOJO_HANDLE_SIGNAL_PEER_CLOSED,
407 MOJO_DEADLINE_INDEFINITE, 408 MOJO_DEADLINE_INDEFINITE,
408 base::Bind(&URLLoaderImpl::OnResponseBodyStreamClosed, 409 base::Bind(&URLLoaderImpl::OnResponseBodyStreamClosed,
409 base::Unretained(this))); 410 base::Unretained(this)));
410 } 411 }
411 412
412 } // namespace mojo 413 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/tcp_connected_socket_impl.cc ('k') | third_party/mojo/src/mojo/edk/js/drain_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698