OLD | NEW |
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 "net/base/sdch_manager.h" | 5 #include "net/base/sdch_manager.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #if defined(OS_ANDROID) || defined(OS_IOS) | 43 #if defined(OS_ANDROID) || defined(OS_IOS) |
44 // static | 44 // static |
45 const size_t SdchManager::kMaxDictionaryCount = 1; | 45 const size_t SdchManager::kMaxDictionaryCount = 1; |
46 const size_t SdchManager::kMaxDictionarySize = 500 * 1000; | 46 const size_t SdchManager::kMaxDictionarySize = 500 * 1000; |
47 #else | 47 #else |
48 // static | 48 // static |
49 const size_t SdchManager::kMaxDictionaryCount = 20; | 49 const size_t SdchManager::kMaxDictionaryCount = 20; |
50 const size_t SdchManager::kMaxDictionarySize = 1000 * 1000; | 50 const size_t SdchManager::kMaxDictionarySize = 1000 * 1000; |
51 #endif | 51 #endif |
52 | 52 |
| 53 // Workaround for http://crbug.com/437794; remove when fixed. |
| 54 #if defined(OS_IOS) |
| 55 // static |
| 56 bool SdchManager::g_sdch_enabled_ = false; |
| 57 #else |
53 // static | 58 // static |
54 bool SdchManager::g_sdch_enabled_ = true; | 59 bool SdchManager::g_sdch_enabled_ = true; |
| 60 #endif |
55 | 61 |
56 // static | 62 // static |
57 bool SdchManager::g_secure_scheme_supported_ = true; | 63 bool SdchManager::g_secure_scheme_supported_ = true; |
58 | 64 |
59 SdchManager::Dictionary::Dictionary(const std::string& dictionary_text, | 65 SdchManager::Dictionary::Dictionary(const std::string& dictionary_text, |
60 size_t offset, | 66 size_t offset, |
61 const std::string& client_hash, | 67 const std::string& client_hash, |
62 const GURL& gurl, | 68 const GURL& gurl, |
63 const std::string& domain, | 69 const std::string& domain, |
64 const std::string& path, | 70 const std::string& path, |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 entry_dict->SetInteger("tries", it->second.count); | 672 entry_dict->SetInteger("tries", it->second.count); |
667 entry_dict->SetInteger("reason", it->second.reason); | 673 entry_dict->SetInteger("reason", it->second.reason); |
668 entry_list->Append(entry_dict); | 674 entry_list->Append(entry_dict); |
669 } | 675 } |
670 value->Set("blacklisted", entry_list); | 676 value->Set("blacklisted", entry_list); |
671 | 677 |
672 return value; | 678 return value; |
673 } | 679 } |
674 | 680 |
675 } // namespace net | 681 } // namespace net |
OLD | NEW |