| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 void SdchOwner::SetMinSpaceForDictionaryFetch( | 358 void SdchOwner::SetMinSpaceForDictionaryFetch( |
| 359 size_t min_space_for_dictionary_fetch) { | 359 size_t min_space_for_dictionary_fetch) { |
| 360 min_space_for_dictionary_fetch_ = min_space_for_dictionary_fetch; | 360 min_space_for_dictionary_fetch_ = min_space_for_dictionary_fetch; |
| 361 } | 361 } |
| 362 | 362 |
| 363 void SdchOwner::OnDictionaryFetched(base::Time last_used, | 363 void SdchOwner::OnDictionaryFetched(base::Time last_used, |
| 364 base::Time created_time, | 364 base::Time created_time, |
| 365 int use_count, | 365 int use_count, |
| 366 const std::string& dictionary_text, | 366 const std::string& dictionary_text, |
| 367 const GURL& dictionary_url, | 367 const GURL& dictionary_url, |
| 368 const BoundNetLog& net_log, | 368 const NetLogWithSource& net_log, |
| 369 bool was_from_cache) { | 369 bool was_from_cache) { |
| 370 struct DictionaryItem { | 370 struct DictionaryItem { |
| 371 base::Time last_used; | 371 base::Time last_used; |
| 372 std::string server_hash; | 372 std::string server_hash; |
| 373 int use_count; | 373 int use_count; |
| 374 size_t dictionary_size; | 374 size_t dictionary_size; |
| 375 | 375 |
| 376 DictionaryItem() : use_count(0), dictionary_size(0) {} | 376 DictionaryItem() : use_count(0), dictionary_size(0) {} |
| 377 DictionaryItem(const base::Time& last_used, | 377 DictionaryItem(const base::Time& last_used, |
| 378 const std::string& server_hash, | 378 const std::string& server_hash, |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 } | 739 } |
| 740 | 740 |
| 741 return true; | 741 return true; |
| 742 } | 742 } |
| 743 | 743 |
| 744 bool SdchOwner::IsPersistingDictionaries() const { | 744 bool SdchOwner::IsPersistingDictionaries() const { |
| 745 return in_memory_pref_store_.get() != nullptr; | 745 return in_memory_pref_store_.get() != nullptr; |
| 746 } | 746 } |
| 747 | 747 |
| 748 } // namespace net | 748 } // namespace net |
| OLD | NEW |