Index: chrome/browser/chromeos/login/login_utils_browsertest.cc |
diff --git a/chrome/browser/chromeos/login/login_utils_browsertest.cc b/chrome/browser/chromeos/login/login_utils_browsertest.cc |
index 62b4be1a4a539b87c0af48691c99df66ae4b9530..48dde882c575183bce718fa8ad7ab8869ec23dbe 100644 |
--- a/chrome/browser/chromeos/login/login_utils_browsertest.cc |
+++ b/chrome/browser/chromeos/login/login_utils_browsertest.cc |
@@ -38,6 +38,7 @@ |
#include "chrome/browser/rlz/rlz.h" |
#include "chrome/common/chrome_content_client.h" |
#include "chrome/common/chrome_paths.h" |
+#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/test/base/chrome_unit_test_suite.h" |
#include "chrome/test/base/scoped_testing_local_state.h" |
@@ -210,6 +211,10 @@ class LoginUtilsTest : public testing::Test, |
command_line->AppendSwitchASCII( |
policy::switches::kDeviceManagementUrl, kDMServer); |
+ // Disable prefetch so that Predictor can peacefully shut down without a |
+ // running IO thread. |
+ command_line->AppendSwitch(::switches::kDnsPrefetchDisable); |
+ |
// DBusThreadManager should be initialized before io_thread_state_, as |
// DBusThreadManager is used from chromeos::ProxyConfigServiceImpl, |
// which is part of io_thread_state_. |
@@ -319,10 +324,8 @@ class LoginUtilsTest : public testing::Test, |
for (size_t i = 0; i < profiles.size(); ++i) { |
chrome_browser_net::Predictor* predictor = |
profiles[i]->GetNetworkPredictor(); |
- if (predictor) { |
- predictor->EnablePredictorOnIOThread(false); |
+ if (predictor) |
predictor->Shutdown(); |
- } |
} |
} |