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

Unified Diff: chrome/browser/policy/configuration_policy_pref_store.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nat_policy.cc Created 9 years, 4 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
Index: chrome/browser/policy/configuration_policy_pref_store.cc
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 344d59c5b12a92aad5c73c90e2fd9bd4c9ee78bf..29fe902d0507711dcaddb0ecee257fb5109a249c 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -360,7 +360,7 @@ ConfigurationPolicyPrefKeeper::GetValue(const std::string& key,
// Check whether there's a default value, which indicates READ_USE_DEFAULT
// should be returned.
- if (stored_value->IsType(Value::TYPE_NULL))
+ if (stored_value->IsNull())
return PrefStore::READ_USE_DEFAULT;
if (result)
@@ -925,10 +925,8 @@ bool ConfigurationPolicyPrefKeeper::HasProxyPolicy(
iter = proxy_policies_.find(policy);
std::string tmp;
if (iter == proxy_policies_.end() ||
- !iter->second ||
- iter->second->IsType(Value::TYPE_NULL) ||
- (iter->second->IsType(Value::TYPE_STRING) &&
- iter->second->GetAsString(&tmp) &&
+ !iter->second || iter->second->IsNull() ||
+ (iter->second->IsString() && iter->second->GetAsString(&tmp) &&
tmp.empty())) {
return false;
}

Powered by Google App Engine
This is Rietveld 408576698