| Index: chrome/browser/component_updater/test/update_checker_unittest.cc
|
| diff --git a/chrome/browser/component_updater/test/update_checker_unittest.cc b/chrome/browser/component_updater/test/update_checker_unittest.cc
|
| index 0b609003418ffef5d514264fb4baa1c57ca0a623..ffb6806073b45cc5b0ae4479c52730fc348b96b7 100644
|
| --- a/chrome/browser/component_updater/test/update_checker_unittest.cc
|
| +++ b/chrome/browser/component_updater/test/update_checker_unittest.cc
|
| @@ -55,7 +55,7 @@ class UpdateCheckerTest : public testing::Test {
|
| void RunThreads();
|
| void RunThreadsUntilIdle();
|
|
|
| - CrxUpdateItem BuildCrxUpdateItem();
|
| + scoped_ptr<CrxUpdateItem> BuildCrxUpdateItem();
|
|
|
| scoped_ptr<UpdateChecker> update_checker_;
|
|
|
| @@ -142,7 +142,7 @@ void UpdateCheckerTest::UpdateCheckComplete(
|
| Quit();
|
| }
|
|
|
| -CrxUpdateItem UpdateCheckerTest::BuildCrxUpdateItem() {
|
| +scoped_ptr<CrxUpdateItem> UpdateCheckerTest::BuildCrxUpdateItem() {
|
| CrxComponent crx_component;
|
| crx_component.name = "test_jebg";
|
| crx_component.pk_hash.assign(jebg_hash, jebg_hash + arraysize(jebg_hash));
|
| @@ -150,12 +150,12 @@ CrxUpdateItem UpdateCheckerTest::BuildCrxUpdateItem() {
|
| crx_component.version = base::Version("0.9");
|
| crx_component.fingerprint = "fp1";
|
|
|
| - CrxUpdateItem crx_update_item;
|
| - crx_update_item.status = CrxUpdateItem::kNew;
|
| - crx_update_item.id = "jebgalgnebhfojomionfpkfelancnnkf";
|
| - crx_update_item.component = crx_component;
|
| + scoped_ptr<CrxUpdateItem> crx_update_item(new CrxUpdateItem());
|
| + crx_update_item->status = CrxUpdateItem::kNew;
|
| + crx_update_item->id = "jebgalgnebhfojomionfpkfelancnnkf";
|
| + crx_update_item->component = crx_component;
|
|
|
| - return crx_update_item;
|
| + return crx_update_item.Pass();
|
| }
|
|
|
| TEST_F(UpdateCheckerTest, UpdateCheckSuccess) {
|
| @@ -168,9 +168,9 @@ TEST_F(UpdateCheckerTest, UpdateCheckSuccess) {
|
| base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
|
| base::Unretained(this))).Pass();
|
|
|
| - CrxUpdateItem item(BuildCrxUpdateItem());
|
| + scoped_ptr<CrxUpdateItem> item(BuildCrxUpdateItem());
|
| std::vector<CrxUpdateItem*> items_to_check;
|
| - items_to_check.push_back(&item);
|
| + items_to_check.push_back(item.get());
|
|
|
| update_checker_->CheckForUpdates(items_to_check, "extra=\"params\"");
|
|
|
| @@ -218,9 +218,9 @@ TEST_F(UpdateCheckerTest, UpdateNetworkError) {
|
| base::Bind(&UpdateCheckerTest::UpdateCheckComplete,
|
| base::Unretained(this))).Pass();
|
|
|
| - CrxUpdateItem item(BuildCrxUpdateItem());
|
| + scoped_ptr<CrxUpdateItem> item(BuildCrxUpdateItem());
|
| std::vector<CrxUpdateItem*> items_to_check;
|
| - items_to_check.push_back(&item);
|
| + items_to_check.push_back(item.get());
|
|
|
| update_checker_->CheckForUpdates(items_to_check, "");
|
|
|
|
|