Simplify ParseCWSChannelServiceResponse

CID=104393
BUG=
TEST=
TBR=mihaip@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10828021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148475 0039d316-1c4b-4281-b951-d872f2087c98
parent b40d7b47
...@@ -407,14 +407,6 @@ bool AppNotifyChannelSetup::ParseCWSChannelServiceResponse( ...@@ -407,14 +407,6 @@ bool AppNotifyChannelSetup::ParseCWSChannelServiceResponse(
if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY) if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY)
return false; return false;
Value* channel_id_value;
DictionaryValue* dict = static_cast<DictionaryValue*>(value.get()); DictionaryValue* dict = static_cast<DictionaryValue*>(value.get());
if (!dict->Get("id", &channel_id_value)) return dict->GetString("id", result);
return false;
if (channel_id_value->GetType() != base::Value::TYPE_STRING)
return false;
StringValue* channel_id = static_cast<StringValue*>(channel_id_value);
channel_id->GetAsString(result);
return true;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment