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

Unified Diff: chrome/browser/chromeos/cros/native_network_parser.cc

Issue 7661009: base: Add Is* functions to Value class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tony review 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/chromeos/cros/native_network_parser.cc
diff --git a/chrome/browser/chromeos/cros/native_network_parser.cc b/chrome/browser/chromeos/cros/native_network_parser.cc
index d610e278ee0409639a084c4ec92e9b788ba7600f..314d9e86d0366a014d69cad7f4a3d2be57c0d481 100644
--- a/chrome/browser/chromeos/cros/native_network_parser.cc
+++ b/chrome/browser/chromeos/cros/native_network_parser.cc
@@ -194,7 +194,7 @@ bool NativeNetworkDeviceParser::ParseValue(
return true;
}
case PROPERTY_INDEX_CELLULAR_APN_LIST:
- if (value.IsType(Value::TYPE_LIST)) {
+ if (value.IsList()) {
CellularApnList provider_apn_list;
if (!ParseApnList(static_cast<const ListValue&>(value),
&provider_apn_list))
@@ -204,13 +204,13 @@ bool NativeNetworkDeviceParser::ParseValue(
}
break;
case PROPERTY_INDEX_NETWORKS:
- if (value.IsType(Value::TYPE_LIST)) {
+ if (value.IsList()) {
// Ignored.
return true;
}
break;
case PROPERTY_INDEX_FOUND_NETWORKS:
- if (value.IsType(Value::TYPE_LIST)) {
+ if (value.IsList()) {
CellularNetworkList found_cellular_networks;
if (!ParseFoundNetworksFromList(
static_cast<const ListValue&>(value),
@@ -221,7 +221,7 @@ bool NativeNetworkDeviceParser::ParseValue(
}
break;
case PROPERTY_INDEX_HOME_PROVIDER: {
- if (value.IsType(Value::TYPE_DICTIONARY)) {
+ if (value.IsDictionary()) {
const DictionaryValue& dict =
static_cast<const DictionaryValue&>(value);
std::string home_provider_code;
@@ -305,7 +305,7 @@ bool NativeNetworkDeviceParser::ParseValue(
return true;
}
case PROPERTY_INDEX_SIM_LOCK:
- if (value.IsType(Value::TYPE_DICTIONARY)) {
+ if (value.IsDictionary()) {
SimLockState sim_lock_state;
int sim_retries_left;
if (!ParseSimLockStateFromDictionary(
@@ -369,7 +369,7 @@ bool NativeNetworkDeviceParser::ParseApnList(const ListValue& list,
apn_list->clear();
apn_list->reserve(list.GetSize());
for (ListValue::const_iterator it = list.begin(); it != list.end(); ++it) {
- if ((*it)->IsType(Value::TYPE_DICTIONARY)) {
+ if ((*it)->IsDictionary()) {
apn_list->resize(apn_list->size() + 1);
const DictionaryValue* dict = static_cast<const DictionaryValue*>(*it);
dict->GetStringWithoutPathExpansion(
@@ -399,7 +399,7 @@ bool NativeNetworkDeviceParser::ParseFoundNetworksFromList(
found_networks->clear();
found_networks->reserve(list.GetSize());
for (ListValue::const_iterator it = list.begin(); it != list.end(); ++it) {
- if ((*it)->IsType(Value::TYPE_DICTIONARY)) {
+ if ((*it)->IsDictionary()) {
found_networks->resize(found_networks->size() + 1);
const DictionaryValue* dict = static_cast<const DictionaryValue*>(*it);
dict->GetStringWithoutPathExpansion(
@@ -697,14 +697,14 @@ bool NativeCellularNetworkParser::ParseValue(PropertyIndex index,
break;
}
case PROPERTY_INDEX_CELLULAR_APN: {
- if (value.IsType(Value::TYPE_DICTIONARY)) {
+ if (value.IsDictionary()) {
cellular_network->set_apn(static_cast<const DictionaryValue&>(value));
return true;
}
break;
}
case PROPERTY_INDEX_CELLULAR_LAST_GOOD_APN: {
- if (value.IsType(Value::TYPE_DICTIONARY)) {
+ if (value.IsDictionary()) {
cellular_network->set_last_good_apn(
static_cast<const DictionaryValue&>(value));
return true;
@@ -744,7 +744,7 @@ bool NativeCellularNetworkParser::ParseValue(PropertyIndex index,
return true;
}
case PROPERTY_INDEX_SERVING_OPERATOR: {
- if (value.IsType(Value::TYPE_DICTIONARY)) {
+ if (value.IsDictionary()) {
const DictionaryValue& dict =
static_cast<const DictionaryValue&>(value);
std::string value_str;
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/component_updater/component_unpacker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698