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

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

Issue 1334593002: 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: Rebase and type error. 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
84 DCHECK(io_task_runner_->BelongsToCurrentThread()); 87 DCHECK(io_task_runner_->BelongsToCurrentThread());
85 88
86 if (message.type() != ResourceMsg_DataReceived::ID) 89 if (message.type() != ResourceMsg_DataReceived::ID)
87 return false; 90 return false;
88 91
89 int request_id; 92 int request_id;
90 93
91 base::PickleIterator iter(message); 94 base::PickleIterator iter(message);
92 if (!iter.ReadInt(&request_id)) { 95 if (!iter.ReadInt(&request_id)) {
93 NOTREACHED() << "malformed resource message"; 96 NOTREACHED() << "malformed resource message";
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 DCHECK(threaded_data_receiver_->needsMainthreadDataCopy()); 341 DCHECK(threaded_data_receiver_->needsMainthreadDataCopy());
339 DCHECK_EQ((size_t)data_length, data_copy->size()); 342 DCHECK_EQ((size_t)data_length, data_copy->size());
340 } 343 }
341 344
342 threaded_data_receiver_->acceptMainthreadDataNotification( 345 threaded_data_receiver_->acceptMainthreadDataNotification(
343 (data_copy && !data_copy->empty()) ? &data_copy->front() : NULL, 346 (data_copy && !data_copy->empty()) ? &data_copy->front() : NULL,
344 data_length, encoded_data_length); 347 data_length, encoded_data_length);
345 } 348 }
346 349
347 } // namespace content 350 } // 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