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

Side by Side Diff: base/message_loop.h

Issue 9903003: base: Remove should_leak_tasks_ from MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/message_loop.cc » ('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 #ifndef BASE_MESSAGE_LOOP_H_ 5 #ifndef BASE_MESSAGE_LOOP_H_
6 #define BASE_MESSAGE_LOOP_H_ 6 #define BASE_MESSAGE_LOOP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 // A null terminated list which creates an incoming_queue of tasks that are 502 // A null terminated list which creates an incoming_queue of tasks that are
503 // acquired under a mutex for processing on this instance's thread. These 503 // acquired under a mutex for processing on this instance's thread. These
504 // tasks have not yet been sorted out into items for our work_queue_ vs items 504 // tasks have not yet been sorted out into items for our work_queue_ vs items
505 // that will be handled by the TimerManager. 505 // that will be handled by the TimerManager.
506 base::TaskQueue incoming_queue_; 506 base::TaskQueue incoming_queue_;
507 // Protect access to incoming_queue_. 507 // Protect access to incoming_queue_.
508 mutable base::Lock incoming_queue_lock_; 508 mutable base::Lock incoming_queue_lock_;
509 509
510 RunState* state_; 510 RunState* state_;
511 511
512 // The need for this variable is subtle. Please see implementation comments
513 // around where it is used.
514 bool should_leak_tasks_;
515
516 #if defined(OS_WIN) 512 #if defined(OS_WIN)
517 base::TimeTicks high_resolution_timer_expiration_; 513 base::TimeTicks high_resolution_timer_expiration_;
518 // Should be set to true before calling Windows APIs like TrackPopupMenu, etc 514 // Should be set to true before calling Windows APIs like TrackPopupMenu, etc
519 // which enter a modal message loop. 515 // which enter a modal message loop.
520 bool os_modal_loop_; 516 bool os_modal_loop_;
521 #endif 517 #endif
522 518
523 // The next sequence number to use for delayed tasks. 519 // The next sequence number to use for delayed tasks.
524 int next_sequence_num_; 520 int next_sequence_num_;
525 521
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 #endif // defined(OS_POSIX) 660 #endif // defined(OS_POSIX)
665 }; 661 };
666 662
667 // Do not add any member variables to MessageLoopForIO! This is important b/c 663 // Do not add any member variables to MessageLoopForIO! This is important b/c
668 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra 664 // MessageLoopForIO is often allocated via MessageLoop(TYPE_IO). Any extra
669 // data that you need should be stored on the MessageLoop's pump_ instance. 665 // data that you need should be stored on the MessageLoop's pump_ instance.
670 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO), 666 COMPILE_ASSERT(sizeof(MessageLoop) == sizeof(MessageLoopForIO),
671 MessageLoopForIO_should_not_have_extra_member_variables); 667 MessageLoopForIO_should_not_have_extra_member_variables);
672 668
673 #endif // BASE_MESSAGE_LOOP_H_ 669 #endif // BASE_MESSAGE_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698