| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 </app> | 368 </app> |
| 369 </response> | 369 </response> |
| 370 */ | 370 */ |
| 371 UpdateResponse::Result::Manifest::Package package; | 371 UpdateResponse::Result::Manifest::Package package; |
| 372 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 372 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 373 package.hash_sha256 = | 373 package.hash_sha256 = |
| 374 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 374 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 375 | 375 |
| 376 UpdateResponse::Result result; | 376 UpdateResponse::Result result; |
| 377 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 377 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 378 result.status = "ok"; |
| 378 result.crx_urls.push_back(GURL("http://localhost/download/")); | 379 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 379 result.manifest.version = "1.0"; | 380 result.manifest.version = "1.0"; |
| 380 result.manifest.browser_min_version = "11.0.1.0"; | 381 result.manifest.browser_min_version = "11.0.1.0"; |
| 381 result.manifest.packages.push_back(package); | 382 result.manifest.packages.push_back(package); |
| 382 | 383 |
| 383 UpdateResponse::Results results; | 384 UpdateResponse::Results results; |
| 384 results.list.push_back(result); | 385 results.list.push_back(result); |
| 385 | 386 |
| 386 base::ThreadTaskRunnerHandle::Get()->PostTask( | 387 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 387 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); | 388 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 </app> | 570 </app> |
| 570 </response> | 571 </response> |
| 571 */ | 572 */ |
| 572 UpdateResponse::Result::Manifest::Package package1; | 573 UpdateResponse::Result::Manifest::Package package1; |
| 573 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 574 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 574 package1.hash_sha256 = | 575 package1.hash_sha256 = |
| 575 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 576 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 576 | 577 |
| 577 UpdateResponse::Result result1; | 578 UpdateResponse::Result result1; |
| 578 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 579 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 580 result1.status = "ok"; |
| 579 result1.crx_urls.push_back(GURL("http://localhost/download/")); | 581 result1.crx_urls.push_back(GURL("http://localhost/download/")); |
| 580 result1.manifest.version = "1.0"; | 582 result1.manifest.version = "1.0"; |
| 581 result1.manifest.browser_min_version = "11.0.1.0"; | 583 result1.manifest.browser_min_version = "11.0.1.0"; |
| 582 result1.manifest.packages.push_back(package1); | 584 result1.manifest.packages.push_back(package1); |
| 583 | 585 |
| 584 UpdateResponse::Result::Manifest::Package package2; | 586 UpdateResponse::Result::Manifest::Package package2; |
| 585 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; | 587 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; |
| 586 package2.hash_sha256 = | 588 package2.hash_sha256 = |
| 587 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; | 589 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; |
| 588 | 590 |
| 589 UpdateResponse::Result result2; | 591 UpdateResponse::Result result2; |
| 590 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 592 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 593 result2.status = "ok"; |
| 591 result2.crx_urls.push_back(GURL("http://localhost/download/")); | 594 result2.crx_urls.push_back(GURL("http://localhost/download/")); |
| 592 result2.manifest.version = "1.0"; | 595 result2.manifest.version = "1.0"; |
| 593 result2.manifest.browser_min_version = "11.0.1.0"; | 596 result2.manifest.browser_min_version = "11.0.1.0"; |
| 594 result2.manifest.packages.push_back(package2); | 597 result2.manifest.packages.push_back(package2); |
| 595 | 598 |
| 596 UpdateResponse::Results results; | 599 UpdateResponse::Results results; |
| 597 results.list.push_back(result1); | 600 results.list.push_back(result1); |
| 598 results.list.push_back(result2); | 601 results.list.push_back(result2); |
| 599 | 602 |
| 600 base::ThreadTaskRunnerHandle::Get()->PostTask( | 603 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 </app> | 821 </app> |
| 819 </response> | 822 </response> |
| 820 */ | 823 */ |
| 821 UpdateResponse::Result::Manifest::Package package1; | 824 UpdateResponse::Result::Manifest::Package package1; |
| 822 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 825 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 823 package1.hash_sha256 = | 826 package1.hash_sha256 = |
| 824 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 827 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 825 | 828 |
| 826 UpdateResponse::Result result1; | 829 UpdateResponse::Result result1; |
| 827 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 830 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 831 result1.status = "ok"; |
| 828 result1.crx_urls.push_back(GURL("http://localhost/download/")); | 832 result1.crx_urls.push_back(GURL("http://localhost/download/")); |
| 829 result1.manifest.version = "1.0"; | 833 result1.manifest.version = "1.0"; |
| 830 result1.manifest.browser_min_version = "11.0.1.0"; | 834 result1.manifest.browser_min_version = "11.0.1.0"; |
| 831 result1.manifest.packages.push_back(package1); | 835 result1.manifest.packages.push_back(package1); |
| 832 | 836 |
| 833 UpdateResponse::Result::Manifest::Package package2; | 837 UpdateResponse::Result::Manifest::Package package2; |
| 834 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; | 838 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; |
| 835 package2.hash_sha256 = | 839 package2.hash_sha256 = |
| 836 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; | 840 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; |
| 837 | 841 |
| 838 UpdateResponse::Result result2; | 842 UpdateResponse::Result result2; |
| 839 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 843 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 844 result2.status = "ok"; |
| 840 result2.crx_urls.push_back(GURL("http://localhost/download/")); | 845 result2.crx_urls.push_back(GURL("http://localhost/download/")); |
| 841 result2.manifest.version = "1.0"; | 846 result2.manifest.version = "1.0"; |
| 842 result2.manifest.browser_min_version = "11.0.1.0"; | 847 result2.manifest.browser_min_version = "11.0.1.0"; |
| 843 result2.manifest.packages.push_back(package2); | 848 result2.manifest.packages.push_back(package2); |
| 844 | 849 |
| 845 UpdateResponse::Results results; | 850 UpdateResponse::Results results; |
| 846 results.list.push_back(result1); | 851 results.list.push_back(result1); |
| 847 results.list.push_back(result2); | 852 results.list.push_back(result2); |
| 848 | 853 |
| 849 base::ThreadTaskRunnerHandle::Get()->PostTask( | 854 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1061 </app> | 1066 </app> |
| 1062 </response> | 1067 </response> |
| 1063 */ | 1068 */ |
| 1064 UpdateResponse::Result::Manifest::Package package; | 1069 UpdateResponse::Result::Manifest::Package package; |
| 1065 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; | 1070 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; |
| 1066 package.hash_sha256 = | 1071 package.hash_sha256 = |
| 1067 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; | 1072 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; |
| 1068 package.fingerprint = "1"; | 1073 package.fingerprint = "1"; |
| 1069 UpdateResponse::Result result; | 1074 UpdateResponse::Result result; |
| 1070 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 1075 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 1076 result.status = "ok"; |
| 1071 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1077 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1072 result.manifest.version = "1.0"; | 1078 result.manifest.version = "1.0"; |
| 1073 result.manifest.browser_min_version = "11.0.1.0"; | 1079 result.manifest.browser_min_version = "11.0.1.0"; |
| 1074 result.manifest.packages.push_back(package); | 1080 result.manifest.packages.push_back(package); |
| 1075 results.list.push_back(result); | 1081 results.list.push_back(result); |
| 1076 } else if (num_call == 2) { | 1082 } else if (num_call == 2) { |
| 1077 /* | 1083 /* |
| 1078 Fake the following response: | 1084 Fake the following response: |
| 1079 <?xml version='1.0' encoding='UTF-8'?> | 1085 <?xml version='1.0' encoding='UTF-8'?> |
| 1080 <response protocol='3.0'> | 1086 <response protocol='3.0'> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1102 UpdateResponse::Result::Manifest::Package package; | 1108 UpdateResponse::Result::Manifest::Package package; |
| 1103 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_2.crx"; | 1109 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_2.crx"; |
| 1104 package.namediff = "ihfokbkgjpifnbbojhneepfflplebdkc_1to2.crx"; | 1110 package.namediff = "ihfokbkgjpifnbbojhneepfflplebdkc_1to2.crx"; |
| 1105 package.hash_sha256 = | 1111 package.hash_sha256 = |
| 1106 "1af337fbd19c72db0f870753bcd7711c3ae9dcaa0ecde26c262bad942b112990"; | 1112 "1af337fbd19c72db0f870753bcd7711c3ae9dcaa0ecde26c262bad942b112990"; |
| 1107 package.hashdiff_sha256 = | 1113 package.hashdiff_sha256 = |
| 1108 "73c6e2d4f783fc4ca5481e89e0b8bfce7aec8ead3686290c94792658ec06f2f2"; | 1114 "73c6e2d4f783fc4ca5481e89e0b8bfce7aec8ead3686290c94792658ec06f2f2"; |
| 1109 package.fingerprint = "22"; | 1115 package.fingerprint = "22"; |
| 1110 UpdateResponse::Result result; | 1116 UpdateResponse::Result result; |
| 1111 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 1117 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 1118 result.status = "ok"; |
| 1112 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1119 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1113 result.crx_diffurls.push_back(GURL("http://localhost/download/")); | 1120 result.crx_diffurls.push_back(GURL("http://localhost/download/")); |
| 1114 result.manifest.version = "2.0"; | 1121 result.manifest.version = "2.0"; |
| 1115 result.manifest.browser_min_version = "11.0.1.0"; | 1122 result.manifest.browser_min_version = "11.0.1.0"; |
| 1116 result.manifest.packages.push_back(package); | 1123 result.manifest.packages.push_back(package); |
| 1117 results.list.push_back(result); | 1124 results.list.push_back(result); |
| 1118 } else { | 1125 } else { |
| 1119 NOTREACHED(); | 1126 NOTREACHED(); |
| 1120 } | 1127 } |
| 1121 | 1128 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 </updatecheck> | 1356 </updatecheck> |
| 1350 </app> | 1357 </app> |
| 1351 </response> | 1358 </response> |
| 1352 */ | 1359 */ |
| 1353 UpdateResponse::Result::Manifest::Package package; | 1360 UpdateResponse::Result::Manifest::Package package; |
| 1354 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 1361 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 1355 package.hash_sha256 = | 1362 package.hash_sha256 = |
| 1356 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 1363 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 1357 UpdateResponse::Result result; | 1364 UpdateResponse::Result result; |
| 1358 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 1365 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 1366 result.status = "ok"; |
| 1359 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1367 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1360 result.manifest.version = "1.0"; | 1368 result.manifest.version = "1.0"; |
| 1361 result.manifest.browser_min_version = "11.0.1.0"; | 1369 result.manifest.browser_min_version = "11.0.1.0"; |
| 1362 result.manifest.packages.push_back(package); | 1370 result.manifest.packages.push_back(package); |
| 1363 | 1371 |
| 1364 UpdateResponse::Results results; | 1372 UpdateResponse::Results results; |
| 1365 results.list.push_back(result); | 1373 results.list.push_back(result); |
| 1366 | 1374 |
| 1367 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1375 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1368 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); | 1376 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 </app> | 1548 </app> |
| 1541 </response> | 1549 </response> |
| 1542 */ | 1550 */ |
| 1543 UpdateResponse::Result::Manifest::Package package; | 1551 UpdateResponse::Result::Manifest::Package package; |
| 1544 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; | 1552 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; |
| 1545 package.hash_sha256 = | 1553 package.hash_sha256 = |
| 1546 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; | 1554 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; |
| 1547 package.fingerprint = "1"; | 1555 package.fingerprint = "1"; |
| 1548 UpdateResponse::Result result; | 1556 UpdateResponse::Result result; |
| 1549 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 1557 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 1558 result.status = "ok"; |
| 1550 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1559 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1551 result.manifest.version = "1.0"; | 1560 result.manifest.version = "1.0"; |
| 1552 result.manifest.browser_min_version = "11.0.1.0"; | 1561 result.manifest.browser_min_version = "11.0.1.0"; |
| 1553 result.manifest.packages.push_back(package); | 1562 result.manifest.packages.push_back(package); |
| 1554 results.list.push_back(result); | 1563 results.list.push_back(result); |
| 1555 } else if (num_call == 2) { | 1564 } else if (num_call == 2) { |
| 1556 /* | 1565 /* |
| 1557 Fake the following response: | 1566 Fake the following response: |
| 1558 <?xml version='1.0' encoding='UTF-8'?> | 1567 <?xml version='1.0' encoding='UTF-8'?> |
| 1559 <response protocol='3.0'> | 1568 <response protocol='3.0'> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1581 UpdateResponse::Result::Manifest::Package package; | 1590 UpdateResponse::Result::Manifest::Package package; |
| 1582 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_2.crx"; | 1591 package.name = "ihfokbkgjpifnbbojhneepfflplebdkc_2.crx"; |
| 1583 package.namediff = "ihfokbkgjpifnbbojhneepfflplebdkc_1to2.crx"; | 1592 package.namediff = "ihfokbkgjpifnbbojhneepfflplebdkc_1to2.crx"; |
| 1584 package.hash_sha256 = | 1593 package.hash_sha256 = |
| 1585 "1af337fbd19c72db0f870753bcd7711c3ae9dcaa0ecde26c262bad942b112990"; | 1594 "1af337fbd19c72db0f870753bcd7711c3ae9dcaa0ecde26c262bad942b112990"; |
| 1586 package.hashdiff_sha256 = | 1595 package.hashdiff_sha256 = |
| 1587 "73c6e2d4f783fc4ca5481e89e0b8bfce7aec8ead3686290c94792658ec06f2f2"; | 1596 "73c6e2d4f783fc4ca5481e89e0b8bfce7aec8ead3686290c94792658ec06f2f2"; |
| 1588 package.fingerprint = "22"; | 1597 package.fingerprint = "22"; |
| 1589 UpdateResponse::Result result; | 1598 UpdateResponse::Result result; |
| 1590 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 1599 result.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 1600 result.status = "ok"; |
| 1591 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1601 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1592 result.crx_diffurls.push_back(GURL("http://localhost/download/")); | 1602 result.crx_diffurls.push_back(GURL("http://localhost/download/")); |
| 1593 result.manifest.version = "2.0"; | 1603 result.manifest.version = "2.0"; |
| 1594 result.manifest.browser_min_version = "11.0.1.0"; | 1604 result.manifest.browser_min_version = "11.0.1.0"; |
| 1595 result.manifest.packages.push_back(package); | 1605 result.manifest.packages.push_back(package); |
| 1596 results.list.push_back(result); | 1606 results.list.push_back(result); |
| 1597 } else { | 1607 } else { |
| 1598 NOTREACHED(); | 1608 NOTREACHED(); |
| 1599 } | 1609 } |
| 1600 | 1610 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1925 </updatecheck> | 1935 </updatecheck> |
| 1926 </app> | 1936 </app> |
| 1927 </response> | 1937 </response> |
| 1928 */ | 1938 */ |
| 1929 UpdateResponse::Result::Manifest::Package package; | 1939 UpdateResponse::Result::Manifest::Package package; |
| 1930 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 1940 package.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 1931 package.hash_sha256 = | 1941 package.hash_sha256 = |
| 1932 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 1942 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 1933 UpdateResponse::Result result; | 1943 UpdateResponse::Result result; |
| 1934 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 1944 result.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 1945 result.status = "ok"; |
| 1935 result.crx_urls.push_back(GURL("http://localhost/download/")); | 1946 result.crx_urls.push_back(GURL("http://localhost/download/")); |
| 1936 result.manifest.version = "1.0"; | 1947 result.manifest.version = "1.0"; |
| 1937 result.manifest.browser_min_version = "11.0.1.0"; | 1948 result.manifest.browser_min_version = "11.0.1.0"; |
| 1938 result.manifest.packages.push_back(package); | 1949 result.manifest.packages.push_back(package); |
| 1939 | 1950 |
| 1940 UpdateResponse::Results results; | 1951 UpdateResponse::Results results; |
| 1941 results.list.push_back(result); | 1952 results.list.push_back(result); |
| 1942 | 1953 |
| 1943 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1954 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1944 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); | 1955 FROM_HERE, base::Bind(update_check_callback, 0, results, 0)); |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 // and further down to the UpdateChecker instance. | 2552 // and further down to the UpdateChecker instance. |
| 2542 EXPECT_FALSE(enabled_component_updates); | 2553 EXPECT_FALSE(enabled_component_updates); |
| 2543 | 2554 |
| 2544 UpdateResponse::Result::Manifest::Package package1; | 2555 UpdateResponse::Result::Manifest::Package package1; |
| 2545 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; | 2556 package1.name = "jebgalgnebhfojomionfpkfelancnnkf.crx"; |
| 2546 package1.hash_sha256 = | 2557 package1.hash_sha256 = |
| 2547 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; | 2558 "6fc4b93fd11134de1300c2c0bb88c12b644a4ec0fd7c9b12cb7cc067667bde87"; |
| 2548 | 2559 |
| 2549 UpdateResponse::Result result1; | 2560 UpdateResponse::Result result1; |
| 2550 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; | 2561 result1.extension_id = "jebgalgnebhfojomionfpkfelancnnkf"; |
| 2562 result1.status = "ok"; |
| 2551 result1.crx_urls.push_back(GURL("http://localhost/download/")); | 2563 result1.crx_urls.push_back(GURL("http://localhost/download/")); |
| 2552 result1.manifest.version = "1.0"; | 2564 result1.manifest.version = "1.0"; |
| 2553 result1.manifest.browser_min_version = "11.0.1.0"; | 2565 result1.manifest.browser_min_version = "11.0.1.0"; |
| 2554 result1.manifest.packages.push_back(package1); | 2566 result1.manifest.packages.push_back(package1); |
| 2555 | 2567 |
| 2556 UpdateResponse::Result::Manifest::Package package2; | 2568 UpdateResponse::Result::Manifest::Package package2; |
| 2557 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; | 2569 package2.name = "ihfokbkgjpifnbbojhneepfflplebdkc_1.crx"; |
| 2558 package2.hash_sha256 = | 2570 package2.hash_sha256 = |
| 2559 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; | 2571 "813c59747e139a608b3b5fc49633affc6db574373f309f156ea6d27229c0b3f9"; |
| 2560 | 2572 |
| 2561 UpdateResponse::Result result2; | 2573 UpdateResponse::Result result2; |
| 2562 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; | 2574 result2.extension_id = "ihfokbkgjpifnbbojhneepfflplebdkc"; |
| 2575 result2.status = "ok"; |
| 2563 result2.crx_urls.push_back(GURL("http://localhost/download/")); | 2576 result2.crx_urls.push_back(GURL("http://localhost/download/")); |
| 2564 result2.manifest.version = "1.0"; | 2577 result2.manifest.version = "1.0"; |
| 2565 result2.manifest.browser_min_version = "11.0.1.0"; | 2578 result2.manifest.browser_min_version = "11.0.1.0"; |
| 2566 result2.manifest.packages.push_back(package2); | 2579 result2.manifest.packages.push_back(package2); |
| 2567 | 2580 |
| 2568 UpdateResponse::Results results; | 2581 UpdateResponse::Results results; |
| 2569 results.list.push_back(result1); | 2582 results.list.push_back(result1); |
| 2570 results.list.push_back(result2); | 2583 results.list.push_back(result2); |
| 2571 | 2584 |
| 2572 base::ThreadTaskRunnerHandle::Get()->PostTask( | 2585 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 update_client->Update( | 2707 update_client->Update( |
| 2695 ids, base::Bind(&DataCallbackFake::Callback), | 2708 ids, base::Bind(&DataCallbackFake::Callback), |
| 2696 base::Bind(&CompletionCallbackFake::Callback, quit_closure())); | 2709 base::Bind(&CompletionCallbackFake::Callback, quit_closure())); |
| 2697 | 2710 |
| 2698 RunThreads(); | 2711 RunThreads(); |
| 2699 | 2712 |
| 2700 update_client->RemoveObserver(&observer); | 2713 update_client->RemoveObserver(&observer); |
| 2701 } | 2714 } |
| 2702 | 2715 |
| 2703 } // namespace update_client | 2716 } // namespace update_client |
| OLD | NEW |