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

Side by Side Diff: chromeos/cert_loader.cc

Issue 2413963002: Replace FOR_EACH_OBSERVER in chromeos/ with range-based for (Closed)
Patch Set: Run the script again with '/mg' Created 4 years, 2 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 | « chromeos/audio/cras_audio_handler.cc ('k') | chromeos/dbus/cras_audio_client.cc » ('j') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chromeos/cert_loader.h" 5 #include "chromeos/cert_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 bool initial_load = !certificates_loaded_; 163 bool initial_load = !certificates_loaded_;
164 certificates_loaded_ = true; 164 certificates_loaded_ = true;
165 NotifyCertificatesLoaded(initial_load); 165 NotifyCertificatesLoaded(initial_load);
166 166
167 certificates_update_running_ = false; 167 certificates_update_running_ = false;
168 if (certificates_update_required_) 168 if (certificates_update_required_)
169 LoadCertificates(); 169 LoadCertificates();
170 } 170 }
171 171
172 void CertLoader::NotifyCertificatesLoaded(bool initial_load) { 172 void CertLoader::NotifyCertificatesLoaded(bool initial_load) {
173 FOR_EACH_OBSERVER(Observer, observers_, 173 for (auto& observer : observers_)
174 OnCertificatesLoaded(*cert_list_, initial_load)); 174 observer.OnCertificatesLoaded(*cert_list_, initial_load);
175 } 175 }
176 176
177 void CertLoader::OnCertDBChanged(const net::X509Certificate* cert) { 177 void CertLoader::OnCertDBChanged(const net::X509Certificate* cert) {
178 VLOG(1) << "OnCertDBChanged"; 178 VLOG(1) << "OnCertDBChanged";
179 LoadCertificates(); 179 LoadCertificates();
180 } 180 }
181 181
182 } // namespace chromeos 182 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/audio/cras_audio_handler.cc ('k') | chromeos/dbus/cras_audio_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698