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

Unified Diff: chrome/browser/extensions/app_notify_channel_setup.cc

Issue 10828021: Simplify ParseCWSChannelServiceResponse (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_notify_channel_setup.cc
diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc
index 4f710080fe34af5c417261d9c2b3d52c02a2ea37..106eac7c756c8294edaff344ba4097d89bddee29 100644
--- a/chrome/browser/extensions/app_notify_channel_setup.cc
+++ b/chrome/browser/extensions/app_notify_channel_setup.cc
@@ -407,14 +407,6 @@ bool AppNotifyChannelSetup::ParseCWSChannelServiceResponse(
if (!value.get() || value->GetType() != base::Value::TYPE_DICTIONARY)
return false;
- Value* channel_id_value;
DictionaryValue* dict = static_cast<DictionaryValue*>(value.get());
- if (!dict->Get("id", &channel_id_value))
- 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;
+ return dict->GetString("id", result);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698