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

Side by Side Diff: content/child/url_response_body_consumer.cc

Issue 2814013004: Avoid IPC message creation between URLLoaderClientImpl and ResourceDispatcher (Closed)
Patch Set: fix Created 3 years, 8 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
« no previous file with comments | « content/child/url_loader_client_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/child/url_response_body_consumer.h" 5 #include "content/child/url_response_body_consumer.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 159 }
160 160
161 void URLResponseBodyConsumer::NotifyCompletionIfAppropriate() { 161 void URLResponseBodyConsumer::NotifyCompletionIfAppropriate() {
162 if (has_been_cancelled_) 162 if (has_been_cancelled_)
163 return; 163 return;
164 if (!has_received_completion_ || !has_seen_end_of_data_) 164 if (!has_received_completion_ || !has_seen_end_of_data_)
165 return; 165 return;
166 // Cancel this instance in order not to notify twice. 166 // Cancel this instance in order not to notify twice.
167 Cancel(); 167 Cancel();
168 168
169 resource_dispatcher_->DispatchMessage( 169 resource_dispatcher_->OnRequestComplete(request_id_, completion_status_);
170 ResourceMsg_RequestComplete(request_id_, completion_status_));
171 // |this| may be deleted. 170 // |this| may be deleted.
172 } 171 }
173 172
174 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « content/child/url_loader_client_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698