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

Side by Side Diff: net/base/filter.cc

Issue 18780: Adjust SDCH problem code histogram.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/filter_unittest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "net/base/filter.h" 5 #include "net/base/filter.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "net/base/gzip_filter.h" 8 #include "net/base/gzip_filter.h"
9 #include "net/base/bzip2_filter.h" 9 #include "net/base/bzip2_filter.h"
10 #include "net/base/sdch_filter.h" 10 #include "net/base/sdch_filter.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (LowerCaseEqualsASCII(mime_type, kTextHtml)) { 139 if (LowerCaseEqualsASCII(mime_type, kTextHtml)) {
140 // Suspicious case: Advertised dictionary, but server didn't use sdch, even 140 // Suspicious case: Advertised dictionary, but server didn't use sdch, even
141 // though it is text_html content. 141 // though it is text_html content.
142 if (encoding_types->empty()) 142 if (encoding_types->empty())
143 SdchManager::SdchErrorRecovery(SdchManager::ADDED_CONTENT_ENCODING); 143 SdchManager::SdchErrorRecovery(SdchManager::ADDED_CONTENT_ENCODING);
144 else if (1 == encoding_types->size()) 144 else if (1 == encoding_types->size())
145 SdchManager::SdchErrorRecovery(SdchManager::FIXED_CONTENT_ENCODING); 145 SdchManager::SdchErrorRecovery(SdchManager::FIXED_CONTENT_ENCODING);
146 else 146 else
147 SdchManager::SdchErrorRecovery(SdchManager::FIXED_CONTENT_ENCODINGS); 147 SdchManager::SdchErrorRecovery(SdchManager::FIXED_CONTENT_ENCODINGS);
148 encoding_types->clear(); 148 encoding_types->clear();
149 encoding_types->push_back(FILTER_TYPE_SDCH); 149 encoding_types->push_back(FILTER_TYPE_SDCH_POSSIBLE);
150 encoding_types->push_back(FILTER_TYPE_GZIP_HELPING_SDCH); 150 encoding_types->push_back(FILTER_TYPE_GZIP_HELPING_SDCH);
151 return; 151 return;
152 } 152 }
153 153
154 // It didn't have SDCH encoding... but it wasn't HTML... so maybe it really 154 // It didn't have SDCH encoding... but it wasn't HTML... so maybe it really
155 // wasn't SDCH encoded. It would be nice if we knew this, and didn't bother 155 // wasn't SDCH encoded. It would be nice if we knew this, and didn't bother
156 // to propose a dictionary etc., but current SDCH spec does not provide a nice 156 // to propose a dictionary etc., but current SDCH spec does not provide a nice
157 // way for us to conclude that. Perhaps in the future, this case will be much 157 // way for us to conclude that. Perhaps in the future, this case will be much
158 // more rare. 158 // more rare.
159 return; 159 return;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 if (next_filter_.get()) 322 if (next_filter_.get())
323 next_filter_->SetMimeType(mime_type); 323 next_filter_->SetMimeType(mime_type);
324 } 324 }
325 325
326 void Filter::SetConnectTime(const base::Time& time, bool was_cached) { 326 void Filter::SetConnectTime(const base::Time& time, bool was_cached) {
327 connect_time_ = time; 327 connect_time_ = time;
328 was_cached_ = was_cached; 328 was_cached_ = was_cached;
329 if (next_filter_.get()) 329 if (next_filter_.get())
330 next_filter_->SetConnectTime(time, was_cached_); 330 next_filter_->SetConnectTime(time, was_cached_);
331 } 331 }
OLDNEW
« no previous file with comments | « no previous file | net/base/filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698