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

Unified Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 360733005: Poll CanPredictNetworkActions in Predictor class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix LoginUtilsTest. Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
- }
}
}
« no previous file with comments | « no previous file | chrome/browser/net/net_pref_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698