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

Side by Side Diff: chrome/browser/net/predictor.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Rebase issue Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | chromeos/dbus/services/proxy_resolution_service_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 info->SetNoSuchNameState(); 1009 info->SetNoSuchNameState();
1010 } 1010 }
1011 } 1011 }
1012 1012
1013 bool Predictor::WouldLikelyProxyURL(const GURL& url) { 1013 bool Predictor::WouldLikelyProxyURL(const GURL& url) {
1014 if (!proxy_service_) 1014 if (!proxy_service_)
1015 return false; 1015 return false;
1016 1016
1017 net::ProxyInfo info; 1017 net::ProxyInfo info;
1018 bool synchronous_success = proxy_service_->TryResolveProxySynchronously( 1018 bool synchronous_success = proxy_service_->TryResolveProxySynchronously(
1019 url, net::LOAD_NORMAL, &info, NULL, net::BoundNetLog()); 1019 url, std::string(), net::LOAD_NORMAL, &info, NULL, net::BoundNetLog());
1020 1020
1021 return synchronous_success && !info.is_direct(); 1021 return synchronous_success && !info.is_direct();
1022 } 1022 }
1023 1023
1024 UrlInfo* Predictor::AppendToResolutionQueue( 1024 UrlInfo* Predictor::AppendToResolutionQueue(
1025 const GURL& url, 1025 const GURL& url,
1026 UrlInfo::ResolutionMotivation motivation) { 1026 UrlInfo::ResolutionMotivation motivation) {
1027 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1027 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1028 DCHECK(url.has_host()); 1028 DCHECK(url.has_host());
1029 1029
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 } 1305 }
1306 1306
1307 void SimplePredictor::ShutdownOnUIThread() { 1307 void SimplePredictor::ShutdownOnUIThread() {
1308 SetShutdown(true); 1308 SetShutdown(true);
1309 } 1309 }
1310 1310
1311 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; } 1311 bool SimplePredictor::CanPrefetchAndPrerender() const { return true; }
1312 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; } 1312 bool SimplePredictor::CanPreresolveAndPreconnect() const { return true; }
1313 1313
1314 } // namespace chrome_browser_net 1314 } // namespace chrome_browser_net
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/services/proxy_resolution_service_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698