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

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

Issue 13957012: Adding a NetworkProfileHandler used by ManagedNetworkConfigurationHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed one comment. Created 7 years, 7 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 (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 "chrome/browser/chromeos/policy/network_configuration_updater_impl.h" 5 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl.h"
6 6
7 #include <string> 7 #include <string>
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } else { 86 } else {
87 VLOG(2) << "The policy is not set."; 87 VLOG(2) << "The policy is not set.";
88 } 88 }
89 VLOG(2) << "The policy contains this ONC: " << onc_blob; 89 VLOG(2) << "The policy contains this ONC: " << onc_blob;
90 90
91 base::ListValue network_configs; 91 base::ListValue network_configs;
92 base::ListValue certificates; 92 base::ListValue certificates;
93 ParseAndValidateOncForImport( 93 ParseAndValidateOncForImport(
94 onc_blob, onc_source, "", &network_configs, &certificates); 94 onc_blob, onc_source, "", &network_configs, &certificates);
95 95
96 network_config_handler_->SetPolicy(onc_source, network_configs); 96 // TODO(pneubeck): fix when rebasing on Joao's commit !!!!!!!!!!!!!!!
97 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
98 std::string userhash = onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY ?
99 "user1" : "";
100 network_config_handler_->SetPolicy(onc_source, userhash, network_configs);
97 101
98 scoped_ptr<net::CertificateList> web_trust_certs(new net::CertificateList); 102 scoped_ptr<net::CertificateList> web_trust_certs(new net::CertificateList);
99 certificate_handler_->ImportCertificates( 103 certificate_handler_->ImportCertificates(
100 certificates, onc_source, web_trust_certs.get()); 104 certificates, onc_source, web_trust_certs.get());
101 105
102 if (onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY) 106 if (onc_source == chromeos::onc::ONC_SOURCE_USER_POLICY)
103 SetTrustAnchors(web_trust_certs.Pass()); 107 SetTrustAnchors(web_trust_certs.Pass());
104 } 108 }
105 109
106 } // namespace policy 110 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698