Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: net/base/sdch_manager.cc

Issue 471403002: Raise memory limit for SDCH for mobile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "base/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "crypto/sha2.h" 12 #include "crypto/sha2.h"
13 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 13 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
14 #include "net/url_request/url_request_http_job.h" 14 #include "net/url_request/url_request_http_job.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 //------------------------------------------------------------------------------ 18 //------------------------------------------------------------------------------
19 // static 19 // static
20 20
21 // Adjust SDCH limits downwards for mobile. 21 // Adjust SDCH limits downwards for mobile.
22 #if defined(OS_ANDROID) || defined(OS_IOS) 22 #if defined(OS_ANDROID) || defined(OS_IOS)
23 // static 23 // static
24 const size_t SdchManager::kMaxDictionaryCount = 1; 24 const size_t SdchManager::kMaxDictionaryCount = 1;
25 const size_t SdchManager::kMaxDictionarySize = 150 * 1000; 25 const size_t SdchManager::kMaxDictionarySize = 500 * 1000;
26 #else 26 #else
27 // static 27 // static
28 const size_t SdchManager::kMaxDictionaryCount = 20; 28 const size_t SdchManager::kMaxDictionaryCount = 20;
29 const size_t SdchManager::kMaxDictionarySize = 1000 * 1000; 29 const size_t SdchManager::kMaxDictionarySize = 1000 * 1000;
30 #endif 30 #endif
31 31
32 // static 32 // static
33 bool SdchManager::g_sdch_enabled_ = true; 33 bool SdchManager::g_sdch_enabled_ = true;
34 34
35 // static 35 // static
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 case '/': 590 case '/':
591 (*output)[i] = '_'; 591 (*output)[i] = '_';
592 continue; 592 continue;
593 default: 593 default:
594 continue; 594 continue;
595 } 595 }
596 } 596 }
597 } 597 }
598 598
599 } // namespace net 599 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698