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

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

Issue 809133002: ResourceDispatcher: put WeakPtrFactory last (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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') | 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 (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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 // ResourceDispatcher --------------------------------------------------------- 289 // ResourceDispatcher ---------------------------------------------------------
290 290
291 ResourceDispatcher::ResourceDispatcher( 291 ResourceDispatcher::ResourceDispatcher(
292 IPC::Sender* sender, 292 IPC::Sender* sender,
293 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner) 293 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner)
294 : message_sender_(sender), 294 : message_sender_(sender),
295 delegate_(NULL), 295 delegate_(NULL),
296 io_timestamp_(base::TimeTicks()), 296 io_timestamp_(base::TimeTicks()),
297 weak_factory_(this), 297 main_thread_task_runner_(main_thread_task_runner),
298 main_thread_task_runner_(main_thread_task_runner) { 298 weak_factory_(this) {
299 } 299 }
300 300
301 ResourceDispatcher::~ResourceDispatcher() { 301 ResourceDispatcher::~ResourceDispatcher() {
302 } 302 }
303 303
304 // ResourceDispatcher implementation ------------------------------------------ 304 // ResourceDispatcher implementation ------------------------------------------
305 305
306 bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) { 306 bool ResourceDispatcher::OnMessageReceived(const IPC::Message& message) {
307 if (!IsResourceDispatcherMessage(message)) { 307 if (!IsResourceDispatcherMessage(message)) {
308 return false; 308 return false;
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { 896 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) {
897 while (!queue->empty()) { 897 while (!queue->empty()) {
898 IPC::Message* message = queue->front(); 898 IPC::Message* message = queue->front();
899 ReleaseResourcesInDataMessage(*message); 899 ReleaseResourcesInDataMessage(*message);
900 queue->pop_front(); 900 queue->pop_front();
901 delete message; 901 delete message;
902 } 902 }
903 } 903 }
904 904
905 } // namespace content 905 } // namespace content
OLDNEW
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698