summaryrefslogtreecommitdiffstats
path: root/chromeos/network/shill_property_util.cc
diff options
context:
space:
mode:
authortimurrrr <timurrrr@chromium.org>2015-03-13 07:31:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-03-13 14:32:49 +0000
commit9f5893dca3b430f4c3edb64ca9019d45bdc1ddc2 (patch)
treee18631cb36a6eaa417ce82d672297e2591059ab0 /chromeos/network/shill_property_util.cc
parente9449efcb61fb3ef93afa906c861ffb7fe5668dd (diff)
downloadchromium_src-9f5893dca3b430f4c3edb64ca9019d45bdc1ddc2.zip
chromium_src-9f5893dca3b430f4c3edb64ca9019d45bdc1ddc2.tar.gz
chromium_src-9f5893dca3b430f4c3edb64ca9019d45bdc1ddc2.tar.bz2
Revert of NSH cleanup + logging fixes (patchset #2 id:20001 of https://codereview.chromium.org/1003573002/)
Reason for revert: Broke CrOS MSan build BUG=466995 Original issue's description: > NSH cleanup + logging fixes > > This is mostly formatting changes and changes from NET_LOG_TYPE -> > NET_LOG, plus some additional logging to help track down errors. > > I separated this out to make actual logic changes easier to review > in an upcoming CL. > > BUG=none > > Committed: https://crrev.com/f03f6c5c2296fc93a18e535e3f27c3ca039e20f2 > Cr-Commit-Position: refs/heads/master@{#320427} TBR=pneubeck@chromium.org,pstew@chromium.org,armansito@chromium.org,michaelpg@chromium.org,stevenjb@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=none Review URL: https://codereview.chromium.org/1005913003 Cr-Commit-Position: refs/heads/master@{#320496}
Diffstat (limited to 'chromeos/network/shill_property_util.cc')
-rw-r--r--chromeos/network/shill_property_util.cc46
1 files changed, 12 insertions, 34 deletions
diff --git a/chromeos/network/shill_property_util.cc b/chromeos/network/shill_property_util.cc
index a53487b..2e77fb7 100644
--- a/chromeos/network/shill_property_util.cc
+++ b/chromeos/network/shill_property_util.cc
@@ -4,8 +4,6 @@
#include "chromeos/network/shill_property_util.h"
-#include <set>
-
#include "base/i18n/icu_encoding_detection.h"
#include "base/i18n/icu_string_conversions.h"
#include "base/json/json_writer.h"
@@ -315,38 +313,18 @@ bool DoIdentifyingPropertiesMatch(const base::DictionaryValue& new_properties,
return new_identifying.Equals(&old_identifying);
}
-bool IsLoggableShillProperty(const std::string& key) {
- static std::set<std::string>* s_skip_properties = nullptr;
- if (!s_skip_properties) {
- s_skip_properties = new std::set<std::string>;
- s_skip_properties->insert(shill::kApnPasswordProperty);
- s_skip_properties->insert(shill::kEapCaCertNssProperty);
- s_skip_properties->insert(shill::kEapCaCertPemProperty);
- s_skip_properties->insert(shill::kEapCaCertProperty);
- s_skip_properties->insert(shill::kEapClientCertNssProperty);
- s_skip_properties->insert(shill::kEapClientCertProperty);
- s_skip_properties->insert(shill::kEapPasswordProperty);
- s_skip_properties->insert(shill::kEapPinProperty);
- s_skip_properties->insert(shill::kEapPrivateKeyPasswordProperty);
- s_skip_properties->insert(shill::kEapPrivateKeyProperty);
- s_skip_properties->insert(shill::kL2tpIpsecCaCertPemProperty);
- s_skip_properties->insert(shill::kL2tpIpsecPasswordProperty);
- s_skip_properties->insert(shill::kL2tpIpsecPinProperty);
- s_skip_properties->insert(shill::kL2tpIpsecPskProperty);
- s_skip_properties->insert(shill::kOpenVPNAuthUserPassProperty);
- s_skip_properties->insert(shill::kOpenVPNCaCertNSSProperty);
- s_skip_properties->insert(shill::kOpenVPNCaCertPemProperty);
- s_skip_properties->insert(shill::kOpenVPNCaCertProperty);
- s_skip_properties->insert(shill::kOpenVPNCertProperty);
- s_skip_properties->insert(shill::kOpenVPNExtraCertPemProperty);
- s_skip_properties->insert(shill::kOpenVPNOTPProperty);
- s_skip_properties->insert(shill::kOpenVPNPasswordProperty);
- s_skip_properties->insert(shill::kOpenVPNPinProperty);
- s_skip_properties->insert(shill::kOpenVPNTLSAuthContentsProperty);
- s_skip_properties->insert(shill::kPPPoEPasswordProperty);
- s_skip_properties->insert(shill::kPassphraseProperty);
- }
- return s_skip_properties->count(key) == 0;
+bool IsPassphraseKey(const std::string& key) {
+ return key == shill::kEapPrivateKeyPasswordProperty ||
+ key == shill::kEapPasswordProperty ||
+ key == shill::kL2tpIpsecPasswordProperty ||
+ key == shill::kOpenVPNPasswordProperty ||
+ key == shill::kOpenVPNAuthUserPassProperty ||
+ key == shill::kOpenVPNTLSAuthContentsProperty ||
+ key == shill::kPassphraseProperty ||
+ key == shill::kOpenVPNOTPProperty ||
+ key == shill::kEapPrivateKeyProperty ||
+ key == shill::kEapPinProperty ||
+ key == shill::kApnPasswordProperty;
}
bool GetHomeProviderFromProperty(const base::Value& value,