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

Side by Side Diff: components/sync_preferences/synced_pref_change_registrar.cc

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 years, 8 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/sync_preferences/synced_pref_change_registrar.h" 5 #include "components/sync_preferences/synced_pref_change_registrar.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 8
9 namespace sync_preferences { 9 namespace sync_preferences {
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 observers_.clear(); 53 observers_.clear();
54 } 54 }
55 55
56 bool SyncedPrefChangeRegistrar::IsObserved(const char* path) const { 56 bool SyncedPrefChangeRegistrar::IsObserved(const char* path) const {
57 return observers_.find(path) != observers_.end(); 57 return observers_.find(path) != observers_.end();
58 } 58 }
59 59
60 void SyncedPrefChangeRegistrar::OnSyncedPrefChanged(const std::string& path, 60 void SyncedPrefChangeRegistrar::OnSyncedPrefChanged(const std::string& path,
61 bool from_sync) { 61 bool from_sync) {
62 if (pref_service_->IsManagedPreference(path.c_str())) 62 if (pref_service_->IsManagedPreference(path))
63 return; 63 return;
64 ObserverMap::const_iterator iter = observers_.find(path); 64 ObserverMap::const_iterator iter = observers_.find(path);
65 if (iter == observers_.end()) 65 if (iter == observers_.end())
66 return; 66 return;
67 iter->second.Run(path, from_sync); 67 iter->second.Run(path, from_sync);
68 } 68 }
69 69
70 } // namespace sync_preferences 70 } // namespace sync_preferences
OLDNEW
« no previous file with comments | « components/sync_preferences/pref_model_associator.cc ('k') | components/translate/core/browser/translate_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698