Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/browser/extensions/extension_updater.cc

Issue 5552002: Remember external extensions installed from file in pending extensions map (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 const ExtensionList* extensions = service_->extensions(); 727 const ExtensionList* extensions = service_->extensions();
728 for (ExtensionList::const_iterator iter = extensions->begin(); 728 for (ExtensionList::const_iterator iter = extensions->begin();
729 iter != extensions->end(); ++iter) { 729 iter != extensions->end(); ++iter) {
730 fetches_builder.AddExtension(**iter); 730 fetches_builder.AddExtension(**iter);
731 } 731 }
732 732
733 const PendingExtensionMap& pending_extensions = 733 const PendingExtensionMap& pending_extensions =
734 service_->pending_extensions(); 734 service_->pending_extensions();
735 for (PendingExtensionMap::const_iterator iter = pending_extensions.begin(); 735 for (PendingExtensionMap::const_iterator iter = pending_extensions.begin();
736 iter != pending_extensions.end(); ++iter) { 736 iter != pending_extensions.end(); ++iter) {
737 fetches_builder.AddPendingExtension(iter->first, iter->second); 737 Extension::Location location = iter->second.install_source;
738 if (location != Extension::EXTERNAL_PREF &&
739 location != Extension::EXTERNAL_REGISTRY)
740 fetches_builder.AddPendingExtension(iter->first, iter->second);
738 } 741 }
739 742
740 fetches_builder.ReportStats(); 743 fetches_builder.ReportStats();
741 744
742 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches()); 745 std::vector<ManifestFetchData*> fetches(fetches_builder.GetFetches());
743 746
744 // Start a fetch of the blacklist if needed. 747 // Start a fetch of the blacklist if needed.
745 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) { 748 if (blacklist_checks_enabled_ && service_->HasInstalledExtensions()) {
746 // Note: it is very important that we use the https version of the update 749 // Note: it is very important that we use the https version of the update
747 // url here to avoid DNS hijacking of the blacklist, which is not validated 750 // url here to avoid DNS hijacking of the blacklist, which is not validated
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this)); 905 URLFetcher::Create(kExtensionFetcherId, url, URLFetcher::GET, this));
903 extension_fetcher_->set_request_context( 906 extension_fetcher_->set_request_context(
904 Profile::GetDefaultRequestContext()); 907 Profile::GetDefaultRequestContext());
905 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES | 908 extension_fetcher_->set_load_flags(net::LOAD_DO_NOT_SEND_COOKIES |
906 net::LOAD_DO_NOT_SAVE_COOKIES | 909 net::LOAD_DO_NOT_SAVE_COOKIES |
907 net::LOAD_DISABLE_CACHE); 910 net::LOAD_DISABLE_CACHE);
908 extension_fetcher_->Start(); 911 extension_fetcher_->Start();
909 current_extension_fetch_ = ExtensionFetch(id, url, hash, version); 912 current_extension_fetch_ = ExtensionFetch(id, url, hash, version);
910 } 913 }
911 } 914 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extensions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698