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

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

Issue 567873003: Refactoring the weak_ptr_factory order in src/content/child (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patch as per comments Created 6 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_dispatcher.h ('k') | content/child/threaded_data_provider.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
6 6
7 #include "content/child/resource_dispatcher.h" 7 #include "content/child/resource_dispatcher.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 response->load_timing = result.load_timing; 262 response->load_timing = result.load_timing;
263 response->devtools_info = result.devtools_info; 263 response->devtools_info = result.devtools_info;
264 response->data.swap(result.data); 264 response->data.swap(result.data);
265 response->download_file_path = result.download_file_path; 265 response->download_file_path = result.download_file_path;
266 } 266 }
267 267
268 // ResourceDispatcher --------------------------------------------------------- 268 // ResourceDispatcher ---------------------------------------------------------
269 269
270 ResourceDispatcher::ResourceDispatcher(IPC::Sender* sender) 270 ResourceDispatcher::ResourceDispatcher(IPC::Sender* sender)
271 : message_sender_(sender), 271 : message_sender_(sender),
272 weak_factory_(this),
273 delegate_(NULL), 272 delegate_(NULL),
274 io_timestamp_(base::TimeTicks()) { 273 io_timestamp_(base::TimeTicks()),
274 weak_factory_(this) {
275 } 275 }
276 276
277 ResourceDispatcher::~ResourceDispatcher() { 277 ResourceDispatcher::~ResourceDispatcher() {
278 } 278 }
279 279
280 // ResourceDispatcher implementation ------------------------------------------ 280 // ResourceDispatcher implementation ------------------------------------------
281 281
282 bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) { 282 bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
283 if (!IsResourceDispatcherMessage(message)) { 283 if (!IsResourceDispatcherMessage(message)) {
284 return false; 284 return false;
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 875 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
876 while (!queue->empty()) { 876 while (!queue->empty()) {
877 IPC::Message* message = queue->front(); 877 IPC::Message* message = queue->front();
878 ReleaseResourcesInDataMessage(*message); 878 ReleaseResourcesInDataMessage(*message);
879 queue->pop_front(); 879 queue->pop_front();
880 delete message; 880 delete message;
881 } 881 }
882 } 882 }
883 883
884 } // namespace content 884 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/threaded_data_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698