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

Side by Side Diff: chrome/browser/search_engines/template_url_service_test_util.cc

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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) 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 #include "chrome/browser/search_engines/template_url_service_test_util.h" 5 #include "chrome/browser/search_engines/template_url_service_test_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 179
180 void TemplateURLServiceTestUtil::TearDown() { 180 void TemplateURLServiceTestUtil::TearDown() {
181 if (profile_.get()) { 181 if (profile_.get()) {
182 profile_->TearDown(); 182 profile_->TearDown();
183 profile_.reset(); 183 profile_.reset();
184 } 184 }
185 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); 185 UIThreadSearchTermsData::SetGoogleBaseURL(std::string());
186 186
187 // Flush the message loop to make application verifiers happy. 187 // Flush the message loop to make application verifiers happy.
188 message_loop_.RunAllPending(); 188 message_loop_.RunUntilIdle();
189 } 189 }
190 190
191 void TemplateURLServiceTestUtil::OnTemplateURLServiceChanged() { 191 void TemplateURLServiceTestUtil::OnTemplateURLServiceChanged() {
192 changed_count_++; 192 changed_count_++;
193 } 193 }
194 194
195 int TemplateURLServiceTestUtil::GetObserverCount() { 195 int TemplateURLServiceTestUtil::GetObserverCount() {
196 return changed_count_; 196 return changed_count_;
197 } 197 }
198 198
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 TestingProfile* TemplateURLServiceTestUtil::profile() const { 306 TestingProfile* TemplateURLServiceTestUtil::profile() const {
307 return profile_.get(); 307 return profile_.get();
308 } 308 }
309 309
310 void TemplateURLServiceTestUtil::StartIOThread() { 310 void TemplateURLServiceTestUtil::StartIOThread() {
311 profile_->StartIOThread(); 311 profile_->StartIOThread();
312 } 312 }
313 313
314 void TemplateURLServiceTestUtil::PumpLoop() { 314 void TemplateURLServiceTestUtil::PumpLoop() {
315 message_loop_.RunAllPending(); 315 message_loop_.RunUntilIdle();
316 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_database_unittest.cc ('k') | chrome/browser/signin/token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698