| 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 <list> | 5 #include <list> |
| 6 #include <map> | 6 #include <map> |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 explicit ServiceForDownloadTests(TestExtensionPrefs* prefs) | 364 explicit ServiceForDownloadTests(TestExtensionPrefs* prefs) |
| 365 : MockService(prefs) { | 365 : MockService(prefs) { |
| 366 } | 366 } |
| 367 | 367 |
| 368 // Add a fake crx installer to be returned by a call to UpdateExtension() | 368 // Add a fake crx installer to be returned by a call to UpdateExtension() |
| 369 // with a specific ID. Caller keeps ownership of |crx_installer|. | 369 // with a specific ID. Caller keeps ownership of |crx_installer|. |
| 370 void AddFakeCrxInstaller(const std::string& id, CrxInstaller* crx_installer) { | 370 void AddFakeCrxInstaller(const std::string& id, CrxInstaller* crx_installer) { |
| 371 fake_crx_installers_[id] = crx_installer; | 371 fake_crx_installers_[id] = crx_installer; |
| 372 } | 372 } |
| 373 | 373 |
| 374 bool UpdateExtension( | 374 virtual bool UpdateExtension( |
| 375 const std::string& id, | 375 const std::string& id, |
| 376 const FilePath& extension_path, | 376 const FilePath& extension_path, |
| 377 const GURL& download_url, | 377 const GURL& download_url, |
| 378 CrxInstaller** out_crx_installer) OVERRIDE { | 378 CrxInstaller** out_crx_installer) OVERRIDE { |
| 379 extension_id_ = id; | 379 extension_id_ = id; |
| 380 install_path_ = extension_path; | 380 install_path_ = extension_path; |
| 381 download_url_ = download_url; | 381 download_url_ = download_url; |
| 382 | 382 |
| 383 if (ContainsKey(fake_crx_installers_, id)) { | 383 if (ContainsKey(fake_crx_installers_, id)) { |
| 384 *out_crx_installer = fake_crx_installers_[id]; | 384 *out_crx_installer = fake_crx_installers_[id]; |
| (...skipping 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1694 // -prodversionmin (shouldn't update if browser version too old) | 1694 // -prodversionmin (shouldn't update if browser version too old) |
| 1695 // -manifests & updates arriving out of order / interleaved | 1695 // -manifests & updates arriving out of order / interleaved |
| 1696 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1696 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1697 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1697 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1698 // "come back from the dead") | 1698 // "come back from the dead") |
| 1699 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1699 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1700 // you don't get downgraded accidentally) | 1700 // you don't get downgraded accidentally) |
| 1701 // -An update manifest mentions multiple updates | 1701 // -An update manifest mentions multiple updates |
| 1702 | 1702 |
| 1703 } // namespace extensions | 1703 } // namespace extensions |
| OLD | NEW |