| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/extensions/extension_updater.h" | 5 #include "chrome/browser/extensions/extension_updater.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 location != Extension::EXTERNAL_REGISTRY) | 759 location != Extension::EXTERNAL_REGISTRY) |
| 760 fetches_builder.AddPendingExtension(iter->first, iter->second); | 760 fetches_builder.AddPendingExtension(iter->first, iter->second); |
| 761 } | 761 } |
| 762 | 762 |
| 763 fetches_builder.ReportStats(); | 763 fetches_builder.ReportStats(); |
| 764 | 764 |
| 765 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches()); | 765 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches()); |
| 766 | 766 |
| 767 // Start a fetch of the blacklist if needed. | 767 // Start a fetch of the blacklist if needed. |
| 768 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) { | 768 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) { |
| 769 // Note: it is very important that we use the https version of the update | 769 // Note: it is very important that we use the https version of the update |
| 770 // url here to avoid DNS hijacking of the blacklist, which is not validated | 770 // url here to avoid DNS hijacking of the blacklist, which is not validated |
| 771 // by a public key signature like .crx files are. | 771 // by a public key signature like .crx files are. |
| 772 ManifestFetchData* blacklist_fetch = | 772 ManifestFetchData* blacklist_fetch = |
| 773 new ManifestFetchData(Extension::GalleryUpdateUrl(true)); | 773 new ManifestFetchData(Extension::GalleryUpdateUrl(true)); |
| 774 std::string version = prefs_->GetString(kExtensionBlacklistUpdateVersion); | 774 std::string version = prefs_->GetString(kExtensionBlacklistUpdateVersion); |
| 775 int ping_days = | 775 int ping_days = |
| 776 CalculatePingDays(service_->extension_prefs()->BlacklistLastPingDay()); | 776 CalculatePingDays(service_->extension_prefs()->BlacklistLastPingDay()); |
| 777 blacklist_fetch->AddExtension(kBlacklistAppID, version, ping_days, ""); | 777 blacklist_fetch->AddExtension(kBlacklistAppID, version, ping_days, ""); |
| 778 StartUpdateCheck(blacklist_fetch); | 778 StartUpdateCheck(blacklist_fetch); |
| 779 } | 779 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); | 925 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); |
| 926 extension_fetcher_->set_request_context( | 926 extension_fetcher_->set_request_context( |
| 927 Profile::GetDefaultRequestContext()); | 927 Profile::GetDefaultRequestContext()); |
| 928 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | | 928 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | |
| 929 net::LOAD_DO_NOT_SAVE_COOKIES | | 929 net::LOAD_DO_NOT_SAVE_COOKIES | |
| 930 net::LOAD_DISABLE_CACHE); | 930 net::LOAD_DISABLE_CACHE); |
| 931 extension_fetcher_->Start(); | 931 extension_fetcher_->Start(); |
| 932 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); | 932 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); |
| 933 } | 933 } |
| 934 } | 934 } |
| OLD | NEW |