| OLD | NEW |
| 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 // Provides global database of differential decompression dictionaries for the | 5 // Provides global database of differential decompression dictionaries for the |
| 6 // SDCH filter (processes sdch enconded content). | 6 // SDCH filter (processes sdch enconded content). |
| 7 | 7 |
| 8 // Exactly one instance of SdchManager is built, and all references are made | 8 // Exactly one instance of SdchManager is built, and all references are made |
| 9 // into that collection. | 9 // into that collection. |
| 10 // | 10 // |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // Content Decode problems. | 59 // Content Decode problems. |
| 60 ADDED_CONTENT_ENCODING, | 60 ADDED_CONTENT_ENCODING, |
| 61 FIXED_CONTENT_ENCODING, | 61 FIXED_CONTENT_ENCODING, |
| 62 FIXED_CONTENT_ENCODINGS, | 62 FIXED_CONTENT_ENCODINGS, |
| 63 | 63 |
| 64 // Content decoding errors. | 64 // Content decoding errors. |
| 65 DECODE_HEADER_ERROR, | 65 DECODE_HEADER_ERROR, |
| 66 DECODE_BODY_ERROR, | 66 DECODE_BODY_ERROR, |
| 67 | 67 |
| 68 // Dictionary selection for use problems. | 68 // Dictionary selection for use problems. |
| 69 DICTIONARY_NOT_FOUND_FOR_HASH = 10, | 69 DICTIONARY_FOUND_HAS_WRONG_DOMAIN = 10, |
| 70 DICTIONARY_FOUND_HAS_WRONG_DOMAIN, | |
| 71 DICTIONARY_FOUND_HAS_WRONG_PORT_LIST, | 70 DICTIONARY_FOUND_HAS_WRONG_PORT_LIST, |
| 72 DICTIONARY_FOUND_HAS_WRONG_PATH, | 71 DICTIONARY_FOUND_HAS_WRONG_PATH, |
| 73 DICTIONARY_FOUND_HAS_WRONG_SCHEME, | 72 DICTIONARY_FOUND_HAS_WRONG_SCHEME, |
| 74 DICTIONARY_HASH_NOT_FOUND, | 73 DICTIONARY_HASH_NOT_FOUND, |
| 75 DICTIONARY_HASH_MALFORMED, | 74 DICTIONARY_HASH_MALFORMED, |
| 76 | 75 |
| 77 // Decode recovery methods. | 76 // Decode recovery methods. |
| 78 META_REFRESH_RECOVERY, | 77 META_REFRESH_RECOVERY, |
| 79 PASSING_THROUGH_NON_SDCH, | 78 PASSING_THROUGH_NON_SDCH, |
| 80 UNRECOVERABLE_ERROR, | 79 UNRECOVERABLE_ERROR, |
| 81 | 80 |
| 82 // Dictionary saving problems. | 81 // Dictionary saving problems. |
| 83 DICTIONARY_HAS_NO_HEADER = 20, | 82 DICTIONARY_HAS_NO_HEADER = 20, |
| 84 DICTIONARY_HEADER_LINE_MISSING_COLON, | 83 DICTIONARY_HEADER_LINE_MISSING_COLON, |
| 85 DICTIONARY_MISSING_DOMAIN_SPECIFIER, | 84 DICTIONARY_MISSING_DOMAIN_SPECIFIER, |
| 86 DICTIONARY_SPECIFIES_TOP_LEVEL_DOMAIN, | 85 DICTIONARY_SPECIFIES_TOP_LEVEL_DOMAIN, |
| 87 DICTIONARY_DOMAIN_NOT_MATCHING_SOURCE_URL, | 86 DICTIONARY_DOMAIN_NOT_MATCHING_SOURCE_URL, |
| 88 DICTIONARY_PORT_NOT_MATCHING_SOURCE_URL, | 87 DICTIONARY_PORT_NOT_MATCHING_SOURCE_URL, |
| 89 | 88 |
| 90 // Dictionary loading problems. | 89 // Dictionary loading problems. |
| 91 DICTIONARY_LOAD_ATTEMPT_FROM_DIFFERENT_HOST = 30, | 90 DICTIONARY_LOAD_ATTEMPT_FROM_DIFFERENT_HOST = 30, |
| 92 DICTIONARY_SELECTED_FOR_SSL, | 91 DICTIONARY_SELECTED_FOR_SSL, |
| 93 DICTIONARY_ALREADY_LOADED, | 92 DICTIONARY_ALREADY_LOADED, |
| 94 | 93 |
| 95 MAX_PROBLEM_CODE // Used to bound histogram | 94 MAX_PROBLEM_CODE // Used to bound histogram. |
| 96 }; | 95 }; |
| 97 | 96 |
| 98 // There is one instance of |Dictionary| for each memory-cached SDCH | 97 // There is one instance of |Dictionary| for each memory-cached SDCH |
| 99 // dictionary. | 98 // dictionary. |
| 100 class Dictionary : public base::RefCounted<Dictionary> { | 99 class Dictionary : public base::RefCounted<Dictionary> { |
| 101 public: | 100 public: |
| 102 // Sdch filters can get our text to use in decoding compressed data. | 101 // Sdch filters can get our text to use in decoding compressed data. |
| 103 const std::string& text() const { return text_; } | 102 const std::string& text() const { return text_; } |
| 104 | 103 |
| 105 private: | 104 private: |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 // domain is supported. | 248 // domain is supported. |
| 250 std::string supported_domain_; | 249 std::string supported_domain_; |
| 251 | 250 |
| 252 // List domains where decode failures have required disabling sdch. | 251 // List domains where decode failures have required disabling sdch. |
| 253 std::set<std::string> blacklisted_domains_; | 252 std::set<std::string> blacklisted_domains_; |
| 254 | 253 |
| 255 DISALLOW_COPY_AND_ASSIGN(SdchManager); | 254 DISALLOW_COPY_AND_ASSIGN(SdchManager); |
| 256 }; | 255 }; |
| 257 | 256 |
| 258 #endif // NET_BASE_SDCH_MANAGER_H_ | 257 #endif // NET_BASE_SDCH_MANAGER_H_ |
| OLD | NEW |