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

Side by Side Diff: chrome/browser/chromeos/net/onc_utils.cc

Issue 623293003: replace OVERRIDE and FINAL with override and final in chrome/browser/chromeos/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: run git cl format on echo_dialog_view.h Created 6 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
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 "chrome/browser/chromeos/net/onc_utils.h" 5 #include "chrome/browser/chromeos/net/onc_utils.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 // This class defines which string placeholders of ONC are replaced by which 151 // This class defines which string placeholders of ONC are replaced by which
152 // user attribute. 152 // user attribute.
153 class UserStringSubstitution : public chromeos::onc::StringSubstitution { 153 class UserStringSubstitution : public chromeos::onc::StringSubstitution {
154 public: 154 public:
155 explicit UserStringSubstitution(const user_manager::User* user) 155 explicit UserStringSubstitution(const user_manager::User* user)
156 : user_(user) {} 156 : user_(user) {}
157 virtual ~UserStringSubstitution() {} 157 virtual ~UserStringSubstitution() {}
158 158
159 virtual bool GetSubstitute(const std::string& placeholder, 159 virtual bool GetSubstitute(const std::string& placeholder,
160 std::string* substitute) const OVERRIDE { 160 std::string* substitute) const override {
161 if (placeholder == ::onc::substitutes::kLoginIDField) 161 if (placeholder == ::onc::substitutes::kLoginIDField)
162 *substitute = user_->GetAccountName(false); 162 *substitute = user_->GetAccountName(false);
163 else if (placeholder == ::onc::substitutes::kEmailField) 163 else if (placeholder == ::onc::substitutes::kEmailField)
164 *substitute = user_->email(); 164 *substitute = user_->email();
165 else 165 else
166 return false; 166 return false;
167 return true; 167 return true;
168 } 168 }
169 169
170 private: 170 private:
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 const PrefService* local_state_prefs, 450 const PrefService* local_state_prefs,
451 const NetworkState& network) { 451 const NetworkState& network) {
452 ::onc::ONCSource ignored_onc_source; 452 ::onc::ONCSource ignored_onc_source;
453 const base::DictionaryValue* policy = onc::GetPolicyForNetwork( 453 const base::DictionaryValue* policy = onc::GetPolicyForNetwork(
454 profile_prefs, local_state_prefs, network, &ignored_onc_source); 454 profile_prefs, local_state_prefs, network, &ignored_onc_source);
455 return policy != NULL; 455 return policy != NULL;
456 } 456 }
457 457
458 } // namespace onc 458 } // namespace onc
459 } // namespace chromeos 459 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698