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

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

Issue 11420013: POSTs to HSTS domains are no longer converted to GETs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix breakage Created 8 years 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 | Annotate | Revision Log
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/double_get_experiment_interceptor.h" 5 #include "chrome/browser/net/double_get_experiment_interceptor.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 // Cacheable GET requests are recorded in the metrics, but not repeated. 134 // Cacheable GET requests are recorded in the metrics, but not repeated.
135 bool is_cacheable = RequestIsCacheable(request); 135 bool is_cacheable = RequestIsCacheable(request);
136 metrics_recorder_->RecordGet(is_cacheable); 136 metrics_recorder_->RecordGet(is_cacheable);
137 if (is_cacheable) 137 if (is_cacheable)
138 return NULL; 138 return NULL;
139 139
140 // Repeat the GET requests as it has non cacheable response with the right 140 // Repeat the GET requests as it has non cacheable response with the right
141 // MIME type. 141 // MIME type.
142 intercepted_requests_.insert(request->identifier()); 142 intercepted_requests_.insert(request->identifier());
143 return new net::URLRequestRedirectJob(request, network_delegate, 143 return new net::URLRequestRedirectJob(
144 request->url()); 144 request, network_delegate, request->url(),
145 net::URLRequestRedirectJob::REDIRECT_302_FOUND);
145 } 146 }
146 147
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698