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

Unified Diff: chrome/test/webdriver/cookie.cc

Issue 6901084: Use new APIs in base/values.h: Value::GetAsNumber and DictionaryValue::GetNumber. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, 2010->2011 Created 9 years, 8 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 | « chrome/common/json_schema_validator.cc ('k') | content/browser/host_zoom_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/cookie.cc
diff --git a/chrome/test/webdriver/cookie.cc b/chrome/test/webdriver/cookie.cc
index fdabc5e84ae303085f5c6c8d1adefd04716d5bf0..a5a492a4a1a50e9089d4f613b24797f435cafc81 100644
--- a/chrome/test/webdriver/cookie.cc
+++ b/chrome/test/webdriver/cookie.cc
@@ -72,10 +72,7 @@ Cookie::Cookie(const DictionaryValue& dict) {
// it could be either a floating point or integer number.
double expiry;
if (!dict.GetDouble("expiry", &expiry)) {
- int tmp;
- if (!dict.GetInteger("expiry", &tmp))
- return; // Expiry is not a number, so the cookie is invalid.
- expiry = static_cast<double>(tmp);
+ return; // Expiry is not a number, so the cookie is invalid.
}
expiration_ = base::Time::FromDoubleT(expiry);
« no previous file with comments | « chrome/common/json_schema_validator.cc ('k') | content/browser/host_zoom_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698