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

Side by Side Diff: net/sdch/sdch_owner.cc

Issue 1303213002: Returning const ref instead of const value in DictionaryPreferenceIterator::url (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« 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 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
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
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
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