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

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

Issue 2964503003: Move NetworkService mojom files to content/public/common. (Closed)
Patch Set: Merge Created 3 years, 5 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 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"
11 #include "content/child/resource_dispatcher.h" 11 #include "content/child/resource_dispatcher.h"
12 #include "content/child/site_isolation_stats_gatherer.h" 12 #include "content/child/site_isolation_stats_gatherer.h"
13 #include "content/common/resource_messages.h" 13 #include "content/common/resource_messages.h"
14 #include "content/common/resource_request_completion_status.h"
15 #include "content/public/child/request_peer.h" 14 #include "content/public/child/request_peer.h"
15 #include "content/public/common/resource_request_completion_status.h"
16 16
17 namespace content { 17 namespace content {
18 18
19 constexpr uint32_t URLResponseBodyConsumer::kMaxNumConsumedBytesInTask; 19 constexpr uint32_t URLResponseBodyConsumer::kMaxNumConsumedBytesInTask;
20 20
21 class URLResponseBodyConsumer::ReceivedData final 21 class URLResponseBodyConsumer::ReceivedData final
22 : public RequestPeer::ReceivedData { 22 : public RequestPeer::ReceivedData {
23 public: 23 public:
24 ReceivedData(const char* payload, 24 ReceivedData(const char* payload,
25 int length, 25 int length,
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 if (!has_received_completion_ || !has_seen_end_of_data_) 169 if (!has_received_completion_ || !has_seen_end_of_data_)
170 return; 170 return;
171 // Cancel this instance in order not to notify twice. 171 // Cancel this instance in order not to notify twice.
172 Cancel(); 172 Cancel();
173 173
174 resource_dispatcher_->OnRequestComplete(request_id_, completion_status_); 174 resource_dispatcher_->OnRequestComplete(request_id_, completion_status_);
175 // |this| may be deleted. 175 // |this| may be deleted.
176 } 176 }
177 177
178 } // namespace content 178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698