| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/filter/sdch_filter.h" | 5 #include "net/filter/sdch_filter.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 #include <limits.h> | 8 #include <limits.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 case RESPONSE_MAX: | 84 case RESPONSE_MAX: |
| 85 cause_string = "<Error: max enum value>"; | 85 cause_string = "<Error: max enum value>"; |
| 86 break; | 86 break; |
| 87 } | 87 } |
| 88 return cause_string; | 88 return cause_string; |
| 89 } | 89 } |
| 90 | 90 |
| 91 base::Value* NetLogSdchResponseCorruptionDetectionCallback( | 91 base::Value* NetLogSdchResponseCorruptionDetectionCallback( |
| 92 ResponseCorruptionDetectionCause cause, | 92 ResponseCorruptionDetectionCause cause, |
| 93 bool cached, | 93 bool cached, |
| 94 NetLog::LogLevel log_level) { | 94 NetLogCaptureMode capture_mode) { |
| 95 base::DictionaryValue* dict = new base::DictionaryValue(); | 95 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 96 dict->SetString("cause", ResponseCorruptionDetectionCauseToString(cause)); | 96 dict->SetString("cause", ResponseCorruptionDetectionCauseToString(cause)); |
| 97 dict->SetBoolean("cached", cached); | 97 dict->SetBoolean("cached", cached); |
| 98 return dict; | 98 return dict; |
| 99 } | 99 } |
| 100 | 100 |
| 101 } // namespace | 101 } // namespace |
| 102 | 102 |
| 103 SdchFilter::SdchFilter(FilterType type, const FilterContext& filter_context) | 103 SdchFilter::SdchFilter(FilterType type, const FilterContext& filter_context) |
| 104 : Filter(type), | 104 : Filter(type), |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 } | 547 } |
| 548 | 548 |
| 549 void SdchFilter::LogSdchProblem(SdchProblemCode problem) { | 549 void SdchFilter::LogSdchProblem(SdchProblemCode problem) { |
| 550 SdchManager::SdchErrorRecovery(problem); | 550 SdchManager::SdchErrorRecovery(problem); |
| 551 filter_context_.GetNetLog().AddEvent( | 551 filter_context_.GetNetLog().AddEvent( |
| 552 NetLog::TYPE_SDCH_DECODING_ERROR, | 552 NetLog::TYPE_SDCH_DECODING_ERROR, |
| 553 base::Bind(&NetLogSdchResourceProblemCallback, problem)); | 553 base::Bind(&NetLogSdchResourceProblemCallback, problem)); |
| 554 } | 554 } |
| 555 | 555 |
| 556 } // namespace net | 556 } // namespace net |
| OLD | NEW |