| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 MessageLoop message_loop; | 542 MessageLoop message_loop; |
| 543 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); | 543 content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop); |
| 544 ExtensionUpdater updater( | 544 ExtensionUpdater updater( |
| 545 &service, service.extension_prefs(), service.pref_service(), | 545 &service, service.extension_prefs(), service.pref_service(), |
| 546 service.profile(), kUpdateFrequencySecs); | 546 service.profile(), kUpdateFrequencySecs); |
| 547 updater.Start(); | 547 updater.Start(); |
| 548 | 548 |
| 549 ManifestFetchData fetch_data(GURL("http://localhost/foo")); | 549 ManifestFetchData fetch_data(GURL("http://localhost/foo")); |
| 550 UpdateManifest::Results updates; | 550 UpdateManifest::Results updates; |
| 551 | 551 |
| 552 std::set<std::string> ids_for_update_check; | 552 std::list<std::string> ids_for_update_check; |
| 553 pending_extension_manager->GetPendingIdsForUpdateCheck( | 553 pending_extension_manager->GetPendingIdsForUpdateCheck( |
| 554 &ids_for_update_check); | 554 &ids_for_update_check); |
| 555 | 555 |
| 556 std::set<std::string>::const_iterator it; | 556 std::list<std::string>::const_iterator it; |
| 557 for (it = ids_for_update_check.begin(); | 557 for (it = ids_for_update_check.begin(); |
| 558 it != ids_for_update_check.end(); ++it) { | 558 it != ids_for_update_check.end(); ++it) { |
| 559 fetch_data.AddExtension(*it, | 559 fetch_data.AddExtension(*it, |
| 560 "1.0.0.0", | 560 "1.0.0.0", |
| 561 kNeverPingedData, | 561 kNeverPingedData, |
| 562 kEmptyUpdateUrlData); | 562 kEmptyUpdateUrlData); |
| 563 AddParseResult(*it, "1.1", "http://localhost/e1_1.1.crx", &updates); | 563 AddParseResult(*it, "1.1", "http://localhost/e1_1.1.crx", &updates); |
| 564 } | 564 } |
| 565 std::vector<int> updateable = | 565 std::vector<int> updateable = |
| 566 updater.DetermineUpdates(fetch_data, updates); | 566 updater.DetermineUpdates(fetch_data, updates); |
| (...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 | 1261 |
| 1262 // TODO(asargent) - (http://crbug.com/12780) add tests for: | 1262 // TODO(asargent) - (http://crbug.com/12780) add tests for: |
| 1263 // -prodversionmin (shouldn't update if browser version too old) | 1263 // -prodversionmin (shouldn't update if browser version too old) |
| 1264 // -manifests & updates arriving out of order / interleaved | 1264 // -manifests & updates arriving out of order / interleaved |
| 1265 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1265 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1266 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1266 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1267 // "come back from the dead") | 1267 // "come back from the dead") |
| 1268 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1268 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1269 // you don't get downgraded accidentally) | 1269 // you don't get downgraded accidentally) |
| 1270 // -An update manifest mentions multiple updates | 1270 // -An update manifest mentions multiple updates |
| OLD | NEW |