diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-29 19:59:08 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-29 19:59:08 +0000 |
commit | b4cebf87816cde49f6d4991ffa254e5ead97703b (patch) | |
tree | fb12e4b464a43af846f30bbd0dbe9484150373b0 /chrome/common/pref_service_uitest.cc | |
parent | 45ce59f19161b517c04a4e3bcd0890b938382b06 (diff) | |
download | chromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.zip chromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.tar.gz chromium_src-b4cebf87816cde49f6d4991ffa254e5ead97703b.tar.bz2 |
Change the signature of JSONReader::Read() and related
methods to be more friendly to use with scoped_ptr. Change
all the callsites.
Review URL: http://codereview.chromium.org/16270
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7486 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/pref_service_uitest.cc')
-rw-r--r-- | chrome/common/pref_service_uitest.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chrome/common/pref_service_uitest.cc b/chrome/common/pref_service_uitest.cc index b9f0774..0ecd114 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; } |