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

Side by Side Diff: chrome/browser/extensions/updater/extension_downloader.cc

Issue 16283002: Move Extension::UpdatesFromGallery to ManifestURL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 months 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
OLDNEW
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 "chrome/browser/extensions/updater/extension_downloader.h" 5 #include "chrome/browser/extensions/updater/extension_downloader.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // scripts. 190 // scripts.
191 if (extension.converted_from_user_script() && 191 if (extension.converted_from_user_script() &&
192 ManifestURL::GetUpdateURL(&extension).is_empty()) { 192 ManifestURL::GetUpdateURL(&extension).is_empty()) {
193 return false; 193 return false;
194 } 194 }
195 195
196 // If the extension updates itself from the gallery, ignore any update URL 196 // If the extension updates itself from the gallery, ignore any update URL
197 // data. At the moment there is no extra data that an extension can 197 // data. At the moment there is no extra data that an extension can
198 // communicate to the the gallery update servers. 198 // communicate to the the gallery update servers.
199 std::string update_url_data; 199 std::string update_url_data;
200 if (!extension.UpdatesFromGallery()) 200 if (!ManifestURL::UpdatesFromGallery(&extension))
201 update_url_data = delegate_->GetUpdateUrlData(extension.id()); 201 update_url_data = delegate_->GetUpdateUrlData(extension.id());
202 202
203 return AddExtensionData(extension.id(), *extension.version(), 203 return AddExtensionData(extension.id(), *extension.version(),
204 extension.GetType(), 204 extension.GetType(),
205 ManifestURL::GetUpdateURL(&extension), 205 ManifestURL::GetUpdateURL(&extension),
206 update_url_data, request_id); 206 update_url_data, request_id);
207 } 207 }
208 208
209 bool ExtensionDownloader::AddPendingExtension(const std::string& id, 209 bool ExtensionDownloader::AddPendingExtension(const std::string& id,
210 const GURL& update_url, 210 const GURL& update_url,
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 void ExtensionDownloader::NotifyUpdateFound(const std::string& id, 774 void ExtensionDownloader::NotifyUpdateFound(const std::string& id,
775 const std::string& version) { 775 const std::string& version) {
776 UpdateDetails updateInfo(id, Version(version)); 776 UpdateDetails updateInfo(id, Version(version));
777 content::NotificationService::current()->Notify( 777 content::NotificationService::current()->Notify(
778 chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND, 778 chrome::NOTIFICATION_EXTENSION_UPDATE_FOUND,
779 content::NotificationService::AllBrowserContextsAndSources(), 779 content::NotificationService::AllBrowserContextsAndSources(),
780 content::Details<UpdateDetails>(&updateInfo)); 780 content::Details<UpdateDetails>(&updateInfo));
781 } 781 }
782 782
783 } // namespace extensions 783 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_install_ui.cc ('k') | chrome/browser/ui/webui/extensions/extension_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698