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

Side by Side Diff: chrome/browser/net/connection_tester_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/net/connection_tester.h" 5 #include "chrome/browser/net/connection_tester.h"
6 6
7 #include "chrome/test/base/testing_pref_service.h" 7 #include "chrome/test/base/testing_pref_service.h"
8 #include "content/test/test_browser_thread.h" 8 #include "content/test/test_browser_thread.h"
9 #include "net/base/cert_verifier.h" 9 #include "net/base/cert_verifier.h"
10 #include "net/base/cookie_monster.h" 10 #include "net/base/cookie_monster.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 tester.reset(); 187 tester.reset();
188 188
189 // Drain the tasks on the message loop. 189 // Drain the tasks on the message loop.
190 // 190 //
191 // Note that we cannot simply stop the message loop, since that will delete 191 // Note that we cannot simply stop the message loop, since that will delete
192 // any pending tasks instead of running them. This causes a problem with 192 // any pending tasks instead of running them. This causes a problem with
193 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer 193 // net::ClientSocketPoolBaseHelper, since the "Group" holds a pointer
194 // |backup_task| that it will try to deref during the destructor, but 194 // |backup_task| that it will try to deref during the destructor, but
195 // depending on the order that pending tasks were deleted in, it might 195 // depending on the order that pending tasks were deleted in, it might
196 // already be invalid! See http://crbug.com/43291. 196 // already be invalid! See http://crbug.com/43291.
197 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 197 MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
198 MessageLoop::current()->Run(); 198 MessageLoop::current()->Run();
199 } 199 }
200 200
201 } // namespace 201 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/intents/web_intents_registry_unittest.cc ('k') | chrome/browser/net/gaia/token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698