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

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

Issue 1350823002: Revert of Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/resource_scheduling_filter.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "content/child/threaded_data_provider.h" 5 #include "content/child/threaded_data_provider.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" 9 #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h"
10 #include "content/child/child_process.h" 10 #include "content/child/child_process.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 DCHECK(io_task_runner_->BelongsToCurrentThread()); 74 DCHECK(io_task_runner_->BelongsToCurrentThread());
75 75
76 main_thread_task_runner_->PostTask( 76 main_thread_task_runner_->PostTask(
77 FROM_HERE, 77 FROM_HERE,
78 base::Bind(&ThreadedDataProvider::OnResourceMessageFilterAddedMainThread, 78 base::Bind(&ThreadedDataProvider::OnResourceMessageFilterAddedMainThread,
79 main_thread_resource_provider_)); 79 main_thread_resource_provider_));
80 } 80 }
81 81
82 bool DataProviderMessageFilter::OnMessageReceived( 82 bool DataProviderMessageFilter::OnMessageReceived(
83 const IPC::Message& message) { 83 const IPC::Message& message) {
84 // TODO(erikchen): Temporary code to help track http://crbug.com/527588.
85 content::CheckContentsOfDataReceivedMessage(&message);
86
87 DCHECK(io_task_runner_->BelongsToCurrentThread()); 84 DCHECK(io_task_runner_->BelongsToCurrentThread());
88 85
89 if (message.type() != ResourceMsg_DataReceived::ID) 86 if (message.type() != ResourceMsg_DataReceived::ID)
90 return false; 87 return false;
91 88
92 int request_id; 89 int request_id;
93 90
94 base::PickleIterator iter(message); 91 base::PickleIterator iter(message);
95 if (!iter.ReadInt(&request_id)) { 92 if (!iter.ReadInt(&request_id)) {
96 NOTREACHED() << "malformed resource message"; 93 NOTREACHED() << "malformed resource message";
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 DCHECK(threaded_data_receiver_->needsMainthreadDataCopy()); 338 DCHECK(threaded_data_receiver_->needsMainthreadDataCopy());
342 DCHECK_EQ((size_t)data_length, data_copy->size()); 339 DCHECK_EQ((size_t)data_length, data_copy->size());
343 } 340 }
344 341
345 threaded_data_receiver_->acceptMainthreadDataNotification( 342 threaded_data_receiver_->acceptMainthreadDataNotification(
346 (data_copy && !data_copy->empty()) ? &data_copy->front() : NULL, 343 (data_copy && !data_copy->empty()) ? &data_copy->front() : NULL,
347 data_length, encoded_data_length); 344 data_length, encoded_data_length);
348 } 345 }
349 346
350 } // namespace content 347 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_scheduling_filter.cc ('k') | content/common/resource_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698