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

Unified Diff: chrome/common/pref_service_uitest.cc

Issue 16270: Change the signature of JSONReader::Read() and related methods to be more (Closed)
Patch Set: fixens Created 12 years 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/common/pref_service_uitest.cc
diff --git a/chrome/common/pref_service_uitest.cc b/chrome/common/pref_service_uitest.cc
index b9f07744d592cb73212c34920592e92f7d9a73d7..0ecd1147fe8f67f5a71ced3f16072b124efe0dfc 100644
--- a/chrome/common/pref_service_uitest.cc
+++ b/chrome/common/pref_service_uitest.cc
@@ -82,13 +82,12 @@ TEST_F(PreferenceServiceTest, PreservedWindowPlacementIsLoaded) {
ASSERT_TRUE(file_util::PathExists(tmp_pref_file_));
JSONFileValueSerializer deserializer(tmp_pref_file_);
- Value* root = NULL;
- ASSERT_TRUE(deserializer.Deserialize(&root, NULL));
+ scoped_ptr<Value> root(deserializer.Deserialize(NULL));
- ASSERT_TRUE(root);
+ ASSERT_TRUE(root.get());
ASSERT_TRUE(root->IsType(Value::TYPE_DICTIONARY));
- DictionaryValue* root_dict = static_cast<DictionaryValue*>(root);
+ DictionaryValue* root_dict = static_cast<DictionaryValue*>(root.get());
// Retrieve the screen rect for the launched window
scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
@@ -130,6 +129,5 @@ TEST_F(PreferenceServiceTest, PreservedWindowPlacementIsLoaded) {
ASSERT_TRUE(root_dict->GetBoolean(kBrowserWindowPlacement + L".maximized",
&is_maximized));
ASSERT_EQ(is_maximized, is_window_maximized);
- delete root;
}

Powered by Google App Engine
This is Rietveld 408576698