| 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 18 matching lines...) Expand all Loading... |
| 29 #include "chrome/browser/extensions/extension_sync_data.h" | 29 #include "chrome/browser/extensions/extension_sync_data.h" |
| 30 #include "chrome/browser/extensions/test_extension_prefs.h" | 30 #include "chrome/browser/extensions/test_extension_prefs.h" |
| 31 #include "chrome/browser/extensions/test_extension_service.h" | 31 #include "chrome/browser/extensions/test_extension_service.h" |
| 32 #include "chrome/browser/extensions/test_extension_system.h" | 32 #include "chrome/browser/extensions/test_extension_system.h" |
| 33 #include "chrome/browser/extensions/updater/extension_downloader.h" | 33 #include "chrome/browser/extensions/updater/extension_downloader.h" |
| 34 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" | 34 #include "chrome/browser/extensions/updater/extension_downloader_delegate.h" |
| 35 #include "chrome/browser/extensions/updater/extension_updater.h" | 35 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 36 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" | 36 #include "chrome/browser/extensions/updater/manifest_fetch_data.h" |
| 37 #include "chrome/browser/extensions/updater/request_queue_impl.h" | 37 #include "chrome/browser/extensions/updater/request_queue_impl.h" |
| 38 #include "chrome/browser/google/google_brand.h" | 38 #include "chrome/browser/google/google_brand.h" |
| 39 #include "chrome/browser/omaha_query_params/omaha_query_params.h" | |
| 40 #include "chrome/browser/prefs/pref_service_syncable.h" | 39 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 41 #include "chrome/common/pref_names.h" | 40 #include "chrome/common/pref_names.h" |
| 42 #include "chrome/test/base/testing_profile.h" | 41 #include "chrome/test/base/testing_profile.h" |
| 42 #include "components/omaha_query_params/omaha_query_params.h" |
| 43 #include "content/public/browser/notification_details.h" | 43 #include "content/public/browser/notification_details.h" |
| 44 #include "content/public/browser/notification_observer.h" | 44 #include "content/public/browser/notification_observer.h" |
| 45 #include "content/public/browser/notification_registrar.h" | 45 #include "content/public/browser/notification_registrar.h" |
| 46 #include "content/public/browser/notification_service.h" | 46 #include "content/public/browser/notification_service.h" |
| 47 #include "content/public/browser/notification_source.h" | 47 #include "content/public/browser/notification_source.h" |
| 48 #include "content/public/test/test_browser_thread_bundle.h" | 48 #include "content/public/test/test_browser_thread_bundle.h" |
| 49 #include "content/public/test/test_utils.h" | 49 #include "content/public/test/test_utils.h" |
| 50 #include "extensions/browser/extension_prefs.h" | 50 #include "extensions/browser/extension_prefs.h" |
| 51 #include "extensions/browser/extension_registry.h" | 51 #include "extensions/browser/extension_registry.h" |
| 52 #include "extensions/browser/extension_system.h" | 52 #include "extensions/browser/extension_system.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 } | 501 } |
| 502 } | 502 } |
| 503 } | 503 } |
| 504 | 504 |
| 505 static void VerifyQueryAndExtractParameters( | 505 static void VerifyQueryAndExtractParameters( |
| 506 const std::string& query, | 506 const std::string& query, |
| 507 std::map<std::string, std::string>* result) { | 507 std::map<std::string, std::string>* result) { |
| 508 std::map<std::string, std::string> params; | 508 std::map<std::string, std::string> params; |
| 509 ExtractParameters(query, ¶ms); | 509 ExtractParameters(query, ¶ms); |
| 510 | 510 |
| 511 std::string omaha_params = | 511 std::string omaha_params = OmahaQueryParams::Get(OmahaQueryParams::CRX); |
| 512 chrome::OmahaQueryParams::Get(chrome::OmahaQueryParams::CRX); | |
| 513 std::map<std::string, std::string> expected; | 512 std::map<std::string, std::string> expected; |
| 514 ExtractParameters(omaha_params, &expected); | 513 ExtractParameters(omaha_params, &expected); |
| 515 | 514 |
| 516 for (std::map<std::string, std::string>::iterator it = expected.begin(); | 515 for (std::map<std::string, std::string>::iterator it = expected.begin(); |
| 517 it != expected.end(); ++it) { | 516 it != expected.end(); ++it) { |
| 518 EXPECT_EQ(it->second, params[it->first]); | 517 EXPECT_EQ(it->second, params[it->first]); |
| 519 } | 518 } |
| 520 | 519 |
| 521 EXPECT_EQ(1U, params.count("x")); | 520 EXPECT_EQ(1U, params.count("x")); |
| 522 std::string decoded = net::UnescapeURLComponent( | 521 std::string decoded = net::UnescapeURLComponent( |
| (...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1867 // -prodversionmin (shouldn't update if browser version too old) | 1866 // -prodversionmin (shouldn't update if browser version too old) |
| 1868 // -manifests & updates arriving out of order / interleaved | 1867 // -manifests & updates arriving out of order / interleaved |
| 1869 // -malformed update url (empty, file://, has query, has a # fragment, etc.) | 1868 // -malformed update url (empty, file://, has query, has a # fragment, etc.) |
| 1870 // -An extension gets uninstalled while updates are in progress (so it doesn't | 1869 // -An extension gets uninstalled while updates are in progress (so it doesn't |
| 1871 // "come back from the dead") | 1870 // "come back from the dead") |
| 1872 // -An extension gets manually updated to v3 while we're downloading v2 (ie | 1871 // -An extension gets manually updated to v3 while we're downloading v2 (ie |
| 1873 // you don't get downgraded accidentally) | 1872 // you don't get downgraded accidentally) |
| 1874 // -An update manifest mentions multiple updates | 1873 // -An update manifest mentions multiple updates |
| 1875 | 1874 |
| 1876 } // namespace extensions | 1875 } // namespace extensions |
| OLD | NEW |