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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // only be safely used on sanitized pref stores that are known to conform to the | 116 // only be safely used on sanitized pref stores that are known to conform to the |
117 // pref store schema. | 117 // pref store schema. |
118 class DictionaryPreferenceIterator { | 118 class DictionaryPreferenceIterator { |
119 public: | 119 public: |
120 explicit DictionaryPreferenceIterator(WriteablePrefStore* pref_store); | 120 explicit DictionaryPreferenceIterator(WriteablePrefStore* pref_store); |
121 | 121 |
122 bool IsAtEnd() const; | 122 bool IsAtEnd() const; |
123 void Advance(); | 123 void Advance(); |
124 | 124 |
125 const std::string& server_hash() const { return server_hash_; } | 125 const std::string& server_hash() const { return server_hash_; } |
126 const GURL url() const { return url_; } | 126 const GURL& url() const { return url_; } |
127 base::Time last_used() const { return last_used_; } | 127 base::Time last_used() const { return last_used_; } |
128 int use_count() const { return use_count_; } | 128 int use_count() const { return use_count_; } |
129 int size() const { return size_; } | 129 int size() const { return size_; } |
130 | 130 |
131 private: | 131 private: |
132 void LoadDictionaryOrDie(); | 132 void LoadDictionaryOrDie(); |
133 | 133 |
134 std::string server_hash_; | 134 std::string server_hash_; |
135 GURL url_; | 135 GURL url_; |
136 base::Time last_used_; | 136 base::Time last_used_; |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 } | 712 } |
713 | 713 |
714 return true; | 714 return true; |
715 } | 715 } |
716 | 716 |
717 bool SdchOwner::IsPersistingDictionaries() const { | 717 bool SdchOwner::IsPersistingDictionaries() const { |
718 return in_memory_pref_store_.get() != nullptr; | 718 return in_memory_pref_store_.get() != nullptr; |
719 } | 719 } |
720 | 720 |
721 } // namespace net | 721 } // namespace net |
OLD | NEW |