OLD | NEW |
---|---|
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/chromeos/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 // unit_tests, but does the full thing when | 313 // unit_tests, but does the full thing when |
314 // g_browser_process->profile_manager() is valid during initialization. | 314 // g_browser_process->profile_manager() is valid during initialization. |
315 // That includes a WaitableEvent on UI waiting for a task on IO, so that | 315 // That includes a WaitableEvent on UI waiting for a task on IO, so that |
316 // task must execute. Do it directly from here now. | 316 // task must execute. Do it directly from here now. |
317 std::vector<Profile*> profiles = | 317 std::vector<Profile*> profiles = |
318 browser_process_->profile_manager()->GetLoadedProfiles(); | 318 browser_process_->profile_manager()->GetLoadedProfiles(); |
319 for (size_t i = 0; i < profiles.size(); ++i) { | 319 for (size_t i = 0; i < profiles.size(); ++i) { |
320 chrome_browser_net::Predictor* predictor = | 320 chrome_browser_net::Predictor* predictor = |
321 profiles[i]->GetNetworkPredictor(); | 321 profiles[i]->GetNetworkPredictor(); |
322 if (predictor) { | 322 if (predictor) { |
323 predictor->EnablePredictorOnIOThread(false); | |
324 predictor->Shutdown(); | 323 predictor->Shutdown(); |
325 } | 324 } |
battre
2014/07/01 08:27:48
nit: remove curlys?
Bence
2014/07/01 17:39:27
Done.
| |
326 } | 325 } |
327 } | 326 } |
328 | 327 |
329 void RunUntilIdle() { | 328 void RunUntilIdle() { |
330 loop_.RunUntilIdle(); | 329 loop_.RunUntilIdle(); |
331 BrowserThread::GetBlockingPool()->FlushForTesting(); | 330 BrowserThread::GetBlockingPool()->FlushForTesting(); |
332 loop_.RunUntilIdle(); | 331 loop_.RunUntilIdle(); |
333 } | 332 } |
334 | 333 |
335 // Invokes |task| on the IO loop and returns after it has executed. | 334 // Invokes |task| on the IO loop and returns after it has executed. |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
704 } | 703 } |
705 | 704 |
706 INSTANTIATE_TEST_CASE_P( | 705 INSTANTIATE_TEST_CASE_P( |
707 LoginUtilsBlockingLoginTestInstance, | 706 LoginUtilsBlockingLoginTestInstance, |
708 LoginUtilsBlockingLoginTest, | 707 LoginUtilsBlockingLoginTest, |
709 testing::Values(0, 1, 2, 3, 4, 5)); | 708 testing::Values(0, 1, 2, 3, 4, 5)); |
710 | 709 |
711 } // namespace | 710 } // namespace |
712 | 711 |
713 } // namespace chromeos | 712 } // namespace chromeos |
OLD | NEW |