| 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 // This file contains the SdchManager class and the DictionarySet | 5 // This file contains the SdchManager class and the DictionarySet |
| 6 // nested class. The manager is responsible for storing all | 6 // nested class. The manager is responsible for storing all |
| 7 // SdchDictionarys, and provides access to them through DictionarySet | 7 // SdchDictionarys, and provides access to them through DictionarySet |
| 8 // objects. A DictionarySet is an object whose lifetime is under the | 8 // objects. A DictionarySet is an object whose lifetime is under the |
| 9 // control of the consumer. It is a reference to a set of | 9 // control of the consumer. It is a reference to a set of |
| 10 // dictionaries, and guarantees that none of those dictionaries will | 10 // dictionaries, and guarantees that none of those dictionaries will |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 std::string* client_hash, std::string* server_hash); | 177 std::string* client_hash, std::string* server_hash); |
| 178 | 178 |
| 179 // For Latency testing only, we need to know if we've succeeded in doing a | 179 // For Latency testing only, we need to know if we've succeeded in doing a |
| 180 // round trip before starting our comparative tests. If ever we encounter | 180 // round trip before starting our comparative tests. If ever we encounter |
| 181 // problems with SDCH, we opt-out of the test unless/until we perform a | 181 // problems with SDCH, we opt-out of the test unless/until we perform a |
| 182 // complete SDCH decoding. | 182 // complete SDCH decoding. |
| 183 bool AllowLatencyExperiment(const GURL& url) const; | 183 bool AllowLatencyExperiment(const GURL& url) const; |
| 184 | 184 |
| 185 void SetAllowLatencyExperiment(const GURL& url, bool enable); | 185 void SetAllowLatencyExperiment(const GURL& url, bool enable); |
| 186 | 186 |
| 187 base::Value* SdchInfoToValue() const; | 187 scoped_ptr<base::Value> SdchInfoToValue() const; |
| 188 | 188 |
| 189 // Add an SDCH dictionary to our list of availible | 189 // Add an SDCH dictionary to our list of availible |
| 190 // dictionaries. This addition will fail if addition is illegal | 190 // dictionaries. This addition will fail if addition is illegal |
| 191 // (data in the dictionary is not acceptable from the | 191 // (data in the dictionary is not acceptable from the |
| 192 // dictionary_url; dictionary already added, etc.). | 192 // dictionary_url; dictionary already added, etc.). |
| 193 // If |server_hash| is non-null, returns the server hash that may be | 193 // If |server_hash| is non-null, returns the server hash that may be |
| 194 // used as an argument to GetDictionarySetByHash. | 194 // used as an argument to GetDictionarySetByHash. |
| 195 // Returns SDCH_OK if the addition was successfull, and corresponding error | 195 // Returns SDCH_OK if the addition was successfull, and corresponding error |
| 196 // code otherwise. | 196 // code otherwise. |
| 197 SdchProblemCode AddSdchDictionary(const std::string& dictionary_text, | 197 SdchProblemCode AddSdchDictionary(const std::string& dictionary_text, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 base::ThreadChecker thread_checker_; | 257 base::ThreadChecker thread_checker_; |
| 258 | 258 |
| 259 base::WeakPtrFactory<SdchManager> factory_; | 259 base::WeakPtrFactory<SdchManager> factory_; |
| 260 | 260 |
| 261 DISALLOW_COPY_AND_ASSIGN(SdchManager); | 261 DISALLOW_COPY_AND_ASSIGN(SdchManager); |
| 262 }; | 262 }; |
| 263 | 263 |
| 264 } // namespace net | 264 } // namespace net |
| 265 | 265 |
| 266 #endif // NET_BASE_SDCH_MANAGER_H_ | 266 #endif // NET_BASE_SDCH_MANAGER_H_ |
| OLD | NEW |