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

Unified Diff: chromeos/network/certificate_handler.cc

Issue 20041002: Make CertificateHandler a proper interface of CertificateImporter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/certificate_handler.h ('k') | chromeos/network/mock_certificate_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/certificate_handler.cc
diff --git a/chromeos/network/certificate_handler.cc b/chromeos/network/certificate_handler.cc
deleted file mode 100644
index 93a6ed4ae89ee2b1f3c3b54549330bbcd9787110..0000000000000000000000000000000000000000
--- a/chromeos/network/certificate_handler.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chromeos/network/certificate_handler.h"
-
-#include "base/logging.h"
-#include "base/values.h"
-#include "chromeos/network/onc/onc_certificate_importer.h"
-#include "chromeos/network/onc/onc_utils.h"
-
-namespace chromeos {
-
-CertificateHandler::CertificateHandler() {
-}
-
-CertificateHandler::~CertificateHandler() {
-}
-
-bool CertificateHandler::ImportCertificates(
- const base::ListValue& certificates,
- onc::ONCSource source,
- net::CertificateList* onc_trusted_certificates) {
- VLOG(2) << "ONC file has " << certificates.GetSize() << " certificates";
-
- // Web trust is only granted to certificates imported by the user.
- bool allow_trust_imports = source == onc::ONC_SOURCE_USER_IMPORT;
- onc::CertificateImporter cert_importer(allow_trust_imports);
- if (cert_importer.ParseAndStoreCertificates(
- certificates, onc_trusted_certificates, NULL) !=
- onc::CertificateImporter::IMPORT_OK) {
- LOG(ERROR) << "Cannot parse some of the certificates in the ONC from "
- << onc::GetSourceAsString(source);
- return false;
- }
- return true;
-}
-
-} // namespace chromeos
« no previous file with comments | « chromeos/network/certificate_handler.h ('k') | chromeos/network/mock_certificate_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698