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

Side by Side Diff: components/policy/core/common/cloud/cloud_policy_core.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
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/prefs/pref_service.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy/core/common/cloud/cloud_policy_core.h" 5 #include "components/policy/core/common/cloud/cloud_policy_core.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 UpdateRefreshDelayFromPref(); 85 UpdateRefreshDelayFromPref();
86 for (auto& observer : observers_) 86 for (auto& observer : observers_)
87 observer.OnRefreshSchedulerStarted(this); 87 observer.OnRefreshSchedulerStarted(this);
88 } 88 }
89 } 89 }
90 90
91 void CloudPolicyCore::TrackRefreshDelayPref( 91 void CloudPolicyCore::TrackRefreshDelayPref(
92 PrefService* pref_service, 92 PrefService* pref_service,
93 const std::string& refresh_pref_name) { 93 const std::string& refresh_pref_name) {
94 refresh_delay_.reset(new IntegerPrefMember()); 94 refresh_delay_.reset(new IntegerPrefMember());
95 refresh_delay_->Init( 95 refresh_delay_->Init(refresh_pref_name, pref_service,
96 refresh_pref_name.c_str(), pref_service, 96 base::Bind(&CloudPolicyCore::UpdateRefreshDelayFromPref,
97 base::Bind(&CloudPolicyCore::UpdateRefreshDelayFromPref, 97 base::Unretained(this)));
98 base::Unretained(this)));
99 UpdateRefreshDelayFromPref(); 98 UpdateRefreshDelayFromPref();
100 } 99 }
101 100
102 void CloudPolicyCore::AddObserver(CloudPolicyCore::Observer* observer) { 101 void CloudPolicyCore::AddObserver(CloudPolicyCore::Observer* observer) {
103 observers_.AddObserver(observer); 102 observers_.AddObserver(observer);
104 } 103 }
105 104
106 void CloudPolicyCore::RemoveObserver(CloudPolicyCore::Observer* observer) { 105 void CloudPolicyCore::RemoveObserver(CloudPolicyCore::Observer* observer) {
107 observers_.RemoveObserver(observer); 106 observers_.RemoveObserver(observer);
108 } 107 }
109 108
110 void CloudPolicyCore::UpdateRefreshDelayFromPref() { 109 void CloudPolicyCore::UpdateRefreshDelayFromPref() {
111 if (refresh_scheduler_ && refresh_delay_) 110 if (refresh_scheduler_ && refresh_delay_)
112 refresh_scheduler_->SetDesiredRefreshDelay(refresh_delay_->GetValue()); 111 refresh_scheduler_->SetDesiredRefreshDelay(refresh_delay_->GetValue());
113 } 112 }
114 113
115 } // namespace policy 114 } // namespace policy
OLDNEW
« no previous file with comments | « components/omnibox/browser/omnibox_edit_model.cc ('k') | components/prefs/pref_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698