| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 const ExtensionList* extensions = service_->extensions(); | 680 const ExtensionList* extensions = service_->extensions(); |
| 681 for (ExtensionList::const_iterator iter = extensions->begin(); | 681 for (ExtensionList::const_iterator iter = extensions->begin(); |
| 682 iter != extensions->end(); ++iter) { | 682 iter != extensions->end(); ++iter) { |
| 683 fetches_builder.AddExtension(**iter); | 683 fetches_builder.AddExtension(**iter); |
| 684 } | 684 } |
| 685 | 685 |
| 686 const PendingExtensionMap& pending_extensions = | 686 const PendingExtensionMap& pending_extensions = |
| 687 service_->pending_extensions(); | 687 service_->pending_extensions(); |
| 688 for (PendingExtensionMap::const_iterator iter = pending_extensions.begin(); | 688 for (PendingExtensionMap::const_iterator iter = pending_extensions.begin(); |
| 689 iter != pending_extensions.end(); ++iter) { | 689 iter != pending_extensions.end(); ++iter) { |
| 690 fetches_builder.AddPendingExtension(iter->first, iter->second); | 690 Extension::Location location = iter->second.install_source; |
| 691 if (location != Extension::EXTERNAL_PREF && |
| 692 location != Extension::EXTERNAL_REGISTRY) |
| 693 fetches_builder.AddPendingExtension(iter->first, iter->second); |
| 691 } | 694 } |
| 692 | 695 |
| 693 fetches_builder.ReportStats(); | 696 fetches_builder.ReportStats(); |
| 694 | 697 |
| 695 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches()); | 698 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches()); |
| 696 | 699 |
| 697 // Start a fetch of the blacklist if needed. | 700 // Start a fetch of the blacklist if needed. |
| 698 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) { | 701 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) { |
| 699 ManifestFetchData* blacklist_fetch = | 702 ManifestFetchData* blacklist_fetch = |
| 700 new ManifestFetchData(GURL(kBlacklistUpdateUrl)); | 703 new ManifestFetchData(GURL(kBlacklistUpdateUrl)); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); | 853 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); |
| 851 extension_fetcher_->set_request_context( | 854 extension_fetcher_->set_request_context( |
| 852 Profile::GetDefaultRequestContext()); | 855 Profile::GetDefaultRequestContext()); |
| 853 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | | 856 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | |
| 854 net::LOAD_DO_NOT_SAVE_COOKIES | | 857 net::LOAD_DO_NOT_SAVE_COOKIES | |
| 855 net::LOAD_DISABLE_CACHE); | 858 net::LOAD_DISABLE_CACHE); |
| 856 extension_fetcher_->Start(); | 859 extension_fetcher_->Start(); |
| 857 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); | 860 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); |
| 858 } | 861 } |
| 859 } | 862 } |
| OLD | NEW |