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

Side by Side Diff: chrome/browser/chromeos/cros/network_library.cc

Issue 11299236: This moves the ONC parsing code into chromeos/network/onc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove translated strings Created 8 years 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) 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/cros/network_library.h" 5 #include "chrome/browser/chromeos/cros/network_library.h"
6 6
7 #include "base/i18n/icu_encoding_detection.h" 7 #include "base/i18n/icu_encoding_detection.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/json/json_writer.h" // for debug output only. 10 #include "base/json/json_writer.h" // for debug output only.
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 744
745 void VirtualNetwork::MatchCertificatePattern(bool allow_enroll, 745 void VirtualNetwork::MatchCertificatePattern(bool allow_enroll,
746 const base::Closure& connect) { 746 const base::Closure& connect) {
747 DCHECK(client_cert_type() == CLIENT_CERT_TYPE_PATTERN); 747 DCHECK(client_cert_type() == CLIENT_CERT_TYPE_PATTERN);
748 DCHECK(!client_cert_pattern().Empty()); 748 DCHECK(!client_cert_pattern().Empty());
749 749
750 // We skip certificate patterns for device policy ONC so that an unmanaged 750 // We skip certificate patterns for device policy ONC so that an unmanaged
751 // user can't get to the place where a cert is presented for them 751 // user can't get to the place where a cert is presented for them
752 // involuntarily. 752 // involuntarily.
753 if (client_cert_pattern().Empty() || 753 if (client_cert_pattern().Empty() ||
754 ui_data().onc_source() == NetworkUIData::ONC_SOURCE_DEVICE_POLICY) { 754 ui_data().onc_source() == onc::ONC_SOURCE_DEVICE_POLICY) {
755 connect.Run(); 755 connect.Run();
756 return; 756 return;
757 } 757 }
758 758
759 scoped_refptr<net::X509Certificate> matching_cert = 759 scoped_refptr<net::X509Certificate> matching_cert =
760 client_cert_pattern().GetMatch(); 760 client_cert_pattern().GetMatch();
761 if (matching_cert.get()) { 761 if (matching_cert.get()) {
762 std::string client_cert_id = 762 std::string client_cert_id =
763 x509_certificate_model::GetPkcs11Id(matching_cert->os_cert_handle()); 763 x509_certificate_model::GetPkcs11Id(matching_cert->os_cert_handle());
764 if (provider_type() == PROVIDER_TYPE_OPEN_VPN) { 764 if (provider_type() == PROVIDER_TYPE_OPEN_VPN) {
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 NetworkLibrary* impl; 1349 NetworkLibrary* impl;
1350 if (stub) 1350 if (stub)
1351 impl = new NetworkLibraryImplStub(); 1351 impl = new NetworkLibraryImplStub();
1352 else 1352 else
1353 impl = new NetworkLibraryImplCros(); 1353 impl = new NetworkLibraryImplCros();
1354 impl->Init(); 1354 impl->Init();
1355 return impl; 1355 return impl;
1356 } 1356 }
1357 1357
1358 } // namespace chromeos 1358 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698