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/sdch/sdch_owner.h" | 5 #include "net/sdch/sdch_owner.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/alias.h" | 8 #include "base/debug/alias.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 WriteablePrefStore* pref_store_; | 247 WriteablePrefStore* pref_store_; |
248 | 248 |
249 DISALLOW_COPY_AND_ASSIGN(ScopedPrefNotifier); | 249 DISALLOW_COPY_AND_ASSIGN(ScopedPrefNotifier); |
250 }; | 250 }; |
251 | 251 |
252 } // namespace | 252 } // namespace |
253 | 253 |
254 // Adjust SDCH limits downwards for mobile. | 254 // Adjust SDCH limits downwards for mobile. |
255 #if defined(OS_ANDROID) || defined(OS_IOS) | 255 #if defined(OS_ANDROID) || defined(OS_IOS) |
256 // static | 256 // static |
257 const size_t SdchOwner::kMaxTotalDictionarySize = 500 * 1000; | 257 const size_t SdchOwner::kMaxTotalDictionarySize = 2 * 500 * 1000; |
258 #else | 258 #else |
259 // static | 259 // static |
260 const size_t SdchOwner::kMaxTotalDictionarySize = 20 * 1000 * 1000; | 260 const size_t SdchOwner::kMaxTotalDictionarySize = 20 * 1000 * 1000; |
261 #endif | 261 #endif |
262 | 262 |
263 // Somewhat arbitrary, but we assume a dictionary smaller than | 263 // Somewhat arbitrary, but we assume a dictionary smaller than |
264 // 50K isn't going to do anyone any good. Note that this still doesn't | 264 // 50K isn't going to do anyone any good. Note that this still doesn't |
265 // prevent download and addition unless there is less than this | 265 // prevent download and addition unless there is less than this |
266 // amount of space available in storage. | 266 // amount of space available in storage. |
267 const size_t SdchOwner::kMinSpaceForDictionaryFetch = 50 * 1000; | 267 const size_t SdchOwner::kMinSpaceForDictionaryFetch = 50 * 1000; |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 } | 756 } |
757 | 757 |
758 return true; | 758 return true; |
759 } | 759 } |
760 | 760 |
761 bool SdchOwner::IsPersistingDictionaries() const { | 761 bool SdchOwner::IsPersistingDictionaries() const { |
762 return in_memory_pref_store_.get() != nullptr; | 762 return in_memory_pref_store_.get() != nullptr; |
763 } | 763 } |
764 | 764 |
765 } // namespace net | 765 } // namespace net |
OLD | NEW |