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 <iterator> | 9 #include <iterator> |
10 #include <set> | 10 #include <set> |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 info->SetNoSuchNameState(); | 925 info->SetNoSuchNameState(); |
926 } | 926 } |
927 } | 927 } |
928 | 928 |
929 bool Predictor::WouldLikelyProxyURL(const GURL& url) { | 929 bool Predictor::WouldLikelyProxyURL(const GURL& url) { |
930 if (!proxy_service_) | 930 if (!proxy_service_) |
931 return false; | 931 return false; |
932 | 932 |
933 net::ProxyInfo info; | 933 net::ProxyInfo info; |
934 bool synchronous_success = proxy_service_->TryResolveProxySynchronously( | 934 bool synchronous_success = proxy_service_->TryResolveProxySynchronously( |
935 url, std::string(), &info, nullptr, net::BoundNetLog()); | 935 url, std::string(), &info, nullptr, net::NetLogWithSource()); |
936 | 936 |
937 return synchronous_success && !info.is_direct(); | 937 return synchronous_success && !info.is_direct(); |
938 } | 938 } |
939 | 939 |
940 UrlInfo* Predictor::AppendToResolutionQueue( | 940 UrlInfo* Predictor::AppendToResolutionQueue( |
941 const GURL& url, | 941 const GURL& url, |
942 UrlInfo::ResolutionMotivation motivation) { | 942 UrlInfo::ResolutionMotivation motivation) { |
943 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 943 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
944 DCHECK(url.has_host()); | 944 DCHECK(url.has_host()); |
945 | 945 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 } | 1196 } |
1197 | 1197 |
1198 void SimplePredictor::ShutdownOnUIThread() { | 1198 void SimplePredictor::ShutdownOnUIThread() { |
1199 SetShutdown(true); | 1199 SetShutdown(true); |
1200 } | 1200 } |
1201 | 1201 |
1202 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } | 1202 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } |
1203 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } | 1203 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } |
1204 | 1204 |
1205 } // namespace chrome_browser_net | 1205 } // namespace chrome_browser_net |
OLD | NEW |