OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 return fetches_count_for_testing_; | 349 return fetches_count_for_testing_; |
350 } | 350 } |
351 | 351 |
352 // Implementation of SdchFetcher::Delegate. | 352 // Implementation of SdchFetcher::Delegate. |
353 | 353 |
354 // Add an SDCH dictionary to our list of availible | 354 // Add an SDCH dictionary to our list of availible |
355 // dictionaries. This addition will fail if addition is illegal | 355 // dictionaries. This addition will fail if addition is illegal |
356 // (data in the dictionary is not acceptable from the | 356 // (data in the dictionary is not acceptable from the |
357 // dictionary_url; dictionary already added, etc.). | 357 // dictionary_url; dictionary already added, etc.). |
358 virtual void AddSdchDictionary(const std::string& dictionary_text, | 358 virtual void AddSdchDictionary(const std::string& dictionary_text, |
359 const GURL& dictionary_url) OVERRIDE; | 359 const GURL& dictionary_url) override; |
360 | 360 |
361 private: | 361 private: |
362 struct BlacklistInfo { | 362 struct BlacklistInfo { |
363 BlacklistInfo() | 363 BlacklistInfo() |
364 : count(0), | 364 : count(0), |
365 exponential_count(0), | 365 exponential_count(0), |
366 reason(MIN_PROBLEM_CODE) {} | 366 reason(MIN_PROBLEM_CODE) {} |
367 | 367 |
368 int count; // # of times to refuse SDCH advertisement. | 368 int count; // # of times to refuse SDCH advertisement. |
369 int exponential_count; // Current exponential backoff ratchet. | 369 int exponential_count; // Current exponential backoff ratchet. |
(...skipping 29 matching lines...) Expand all Loading... |
399 ExperimentSet allow_latency_experiment_; | 399 ExperimentSet allow_latency_experiment_; |
400 | 400 |
401 int fetches_count_for_testing_; | 401 int fetches_count_for_testing_; |
402 | 402 |
403 DISALLOW_COPY_AND_ASSIGN(SdchManager); | 403 DISALLOW_COPY_AND_ASSIGN(SdchManager); |
404 }; | 404 }; |
405 | 405 |
406 } // namespace net | 406 } // namespace net |
407 | 407 |
408 #endif // NET_BASE_SDCH_MANAGER_H_ | 408 #endif // NET_BASE_SDCH_MANAGER_H_ |
OLD | NEW |