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

Unified Diff: chromeos/network/certificate_pattern.cc

Issue 370623002: Remove most of NetworkUIData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed yet-another unused function. Created 6 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_pattern.h ('k') | chromeos/network/client_cert_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/certificate_pattern.cc
diff --git a/chromeos/network/certificate_pattern.cc b/chromeos/network/certificate_pattern.cc
index 777a33d92fc5a10da2a728d766de10b68da63f94..7d2208867ab3b286608a34a4e48bb53db82f1c7c 100644
--- a/chromeos/network/certificate_pattern.cc
+++ b/chromeos/network/certificate_pattern.cc
@@ -28,17 +28,6 @@ bool GetAsListOfStrings(const base::Value& value,
return true;
}
-base::ListValue* CreateListFromStrings(
- const std::vector<std::string>& strings) {
- base::ListValue* new_list = new base::ListValue;
- for (std::vector<std::string>::const_iterator iter = strings.begin();
- iter != strings.end();
- ++iter) {
- new_list->AppendString(*iter);
- }
- return new_list;
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -72,21 +61,6 @@ void IssuerSubjectPattern::Clear() {
organizational_unit_.clear();
}
-scoped_ptr<base::DictionaryValue> IssuerSubjectPattern::CreateONCDictionary()
- const {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
- if (!common_name_.empty())
- dict->SetString(onc::client_cert::kCommonName, common_name_);
- if (!locality_.empty())
- dict->SetString(onc::client_cert::kLocality, locality_);
- if (!organization_.empty())
- dict->SetString(onc::client_cert::kOrganization, organization_);
- if (!organizational_unit_.empty())
- dict->SetString(onc::client_cert::kOrganizationalUnit,
- organizational_unit_);
- return dict.Pass();
-}
-
void IssuerSubjectPattern::ReadFromONCDictionary(
const base::DictionaryValue& dict) {
Clear();
@@ -120,29 +94,6 @@ void CertificatePattern::Clear() {
enrollment_uri_list_.clear();
}
-scoped_ptr<base::DictionaryValue> CertificatePattern::CreateONCDictionary()
- const {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
-
- if (!issuer_ca_pems_.empty()) {
- dict->SetWithoutPathExpansion(onc::client_cert::kIssuerCAPEMs,
- CreateListFromStrings(issuer_ca_pems_));
- }
-
- if (!issuer_.Empty())
- dict->SetWithoutPathExpansion(onc::client_cert::kIssuer,
- issuer_.CreateONCDictionary().release());
-
- if (!subject_.Empty())
- dict->SetWithoutPathExpansion(onc::client_cert::kSubject,
- subject_.CreateONCDictionary().release());
-
- if (!enrollment_uri_list_.empty())
- dict->SetWithoutPathExpansion(onc::client_cert::kEnrollmentURI,
- CreateListFromStrings(enrollment_uri_list_));
- return dict.Pass();
-}
-
bool CertificatePattern::ReadFromONCDictionary(
const base::DictionaryValue& dict) {
Clear();
« no previous file with comments | « chromeos/network/certificate_pattern.h ('k') | chromeos/network/client_cert_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698