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

Unified Diff: extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc

Issue 1308013005: Add scoped_ptr-safe base::Value to Dictionary/List conversion functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made conversions static members. Created 5 years, 3 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 | « extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc ('k') | extensions/browser/api_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc
diff --git a/extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc b/extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc
index 3414f36768d3e0fae85f868af68cfc9702db8959..8811c2ec52479dda9b3b34de56f5a75ea1866900 100644
--- a/extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc
+++ b/extensions/browser/api/sockets_tcp_server/sockets_tcp_server_apitest.cc
@@ -62,8 +62,8 @@ IN_PROC_BROWSER_TEST_F(SocketsTcpServerApiTest, SocketTCPCreateGood) {
api_test_utils::RunFunctionAndReturnSingleResult(
socket_create_function.get(), "[]", browser_context()));
ASSERT_EQ(base::Value::TYPE_DICTIONARY, result->GetType());
- base::DictionaryValue* value =
- static_cast<base::DictionaryValue*>(result.get());
+ scoped_ptr<base::DictionaryValue> value =
+ base::DictionaryValue::From(result.Pass());
int socketId = -1;
EXPECT_TRUE(value->GetInteger("socketId", &socketId));
ASSERT_TRUE(socketId > 0);
« no previous file with comments | « extensions/browser/api/sockets_tcp/sockets_tcp_apitest.cc ('k') | extensions/browser/api_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698