| 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/net/predictor.h" | 5 #include "chrome/browser/net/predictor.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // Data. | 330 // Data. |
| 331 user_prefs->ClearPref(prefs::kDnsPrefetchingStartupList); | 331 user_prefs->ClearPref(prefs::kDnsPrefetchingStartupList); |
| 332 user_prefs->ClearPref(prefs::kDnsPrefetchingHostReferralList); | 332 user_prefs->ClearPref(prefs::kDnsPrefetchingHostReferralList); |
| 333 | 333 |
| 334 #if defined(OS_ANDROID) || defined(OS_IOS) | 334 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 335 // TODO(marq): Once https://codereview.chromium.org/30883003/ lands, also | 335 // TODO(marq): Once https://codereview.chromium.org/30883003/ lands, also |
| 336 // condition this on DataReductionProxySettings::IsDataReductionProxyAllowed() | 336 // condition this on DataReductionProxySettings::IsDataReductionProxyAllowed() |
| 337 // Until then, we may create a proxy advisor when the proxy feature itself | 337 // Until then, we may create a proxy advisor when the proxy feature itself |
| 338 // isn't available, and the advisor instance will never send advisory | 338 // isn't available, and the advisor instance will never send advisory |
| 339 // requests, which is slightly wasteful but not harmful. | 339 // requests, which is slightly wasteful but not harmful. |
| 340 if (data_reduction_proxy::DataReductionProxyParams:: | 340 if (data_reduction_proxy::DataReductionProxySettings:: |
| 341 IsIncludedInPreconnectHintingFieldTrial()) { | 341 IsPreconnectHintingAllowed()) { |
| 342 proxy_advisor_.reset(new ProxyAdvisor(user_prefs, getter)); | 342 proxy_advisor_.reset(new ProxyAdvisor(user_prefs, getter)); |
| 343 } | 343 } |
| 344 #endif | 344 #endif |
| 345 | 345 |
| 346 BrowserThread::PostTask( | 346 BrowserThread::PostTask( |
| 347 BrowserThread::IO, | 347 BrowserThread::IO, |
| 348 FROM_HERE, | 348 FROM_HERE, |
| 349 base::Bind( | 349 base::Bind( |
| 350 &Predictor::FinalizeInitializationOnIOThread, | 350 &Predictor::FinalizeInitializationOnIOThread, |
| 351 base::Unretained(this), | 351 base::Unretained(this), |
| (...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1463 IOThread* io_thread, | 1463 IOThread* io_thread, |
| 1464 net::URLRequestContextGetter* getter) { | 1464 net::URLRequestContextGetter* getter) { |
| 1465 // Empty function for unittests. | 1465 // Empty function for unittests. |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 void SimplePredictor::ShutdownOnUIThread() { | 1468 void SimplePredictor::ShutdownOnUIThread() { |
| 1469 SetShutdown(true); | 1469 SetShutdown(true); |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 } // namespace chrome_browser_net | 1472 } // namespace chrome_browser_net |
| OLD | NEW |