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

Side by Side Diff: chrome/browser/chromeos/policy/user_network_configuration_updater.cc

Issue 23526016: Autoconnect policy for CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renamed policy. Created 7 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/policy/user_network_configuration_updater.h" 5 #include "chrome/browser/chromeos/policy/user_network_configuration_updater.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/chromeos/login/user.h" 10 #include "chrome/browser/chromeos/login/user.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 web_trust_certs_.clear(); 69 web_trust_certs_.clear();
70 certificate_importer_->ImportCertificates( 70 certificate_importer_->ImportCertificates(
71 certificates_onc, 71 certificates_onc,
72 onc_source_, 72 onc_source_,
73 allow_trusted_certificates_from_policy_ ? &web_trust_certs_ : NULL); 73 allow_trusted_certificates_from_policy_ ? &web_trust_certs_ : NULL);
74 74
75 SetTrustAnchors(); 75 SetTrustAnchors();
76 } 76 }
77 77
78 void UserNetworkConfigurationUpdater::ApplyNetworkPolicy( 78 void UserNetworkConfigurationUpdater::ApplyNetworkPolicy(
79 base::ListValue* network_configs_onc) { 79 base::ListValue* network_configs_onc,
80 base::DictionaryValue* global_network_config) {
80 DCHECK(user_); 81 DCHECK(user_);
81 chromeos::onc::ExpandStringPlaceholdersInNetworksForUser(user_, 82 chromeos::onc::ExpandStringPlaceholdersInNetworksForUser(user_,
82 network_configs_onc); 83 network_configs_onc);
83 network_config_handler_->SetPolicy( 84 network_config_handler_->SetPolicy(onc_source_,
84 onc_source_, user_->username_hash(), *network_configs_onc); 85 user_->username_hash(),
86 *network_configs_onc,
87 *global_network_config);
85 } 88 }
86 89
87 void UserNetworkConfigurationUpdater::SetTrustAnchors() { 90 void UserNetworkConfigurationUpdater::SetTrustAnchors() {
88 if (!cert_verifier_) 91 if (!cert_verifier_)
89 return; 92 return;
90 content::BrowserThread::PostTask( 93 content::BrowserThread::PostTask(
91 content::BrowserThread::IO, 94 content::BrowserThread::IO,
92 FROM_HERE, 95 FROM_HERE,
93 base::Bind(&PolicyCertVerifier::SetTrustAnchors, 96 base::Bind(&PolicyCertVerifier::SetTrustAnchors,
94 base::Unretained(cert_verifier_), 97 base::Unretained(cert_verifier_),
95 web_trust_certs_)); 98 web_trust_certs_));
96 } 99 }
97 100
98 } // namespace policy 101 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698