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

Unified Diff: chrome/browser/extensions/updater/extension_downloader.h

Issue 10689097: Enforce the 'requirements' field in manifests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/updater/extension_downloader.h
diff --git a/chrome/browser/extensions/updater/extension_downloader.h b/chrome/browser/extensions/updater/extension_downloader.h
index a95423baa068e235a43a184f8189fd84b28b70e9..8cf758940d0d7cda8f5837b214a589ea4a110750 100644
--- a/chrome/browser/extensions/updater/extension_downloader.h
+++ b/chrome/browser/extensions/updater/extension_downloader.h
@@ -8,7 +8,6 @@
#include <deque>
#include <map>
-#include <set>
#include <string>
#include <vector>
@@ -55,7 +54,8 @@ class ExtensionDownloader : public net::URLFetcherDelegate {
// Adds extension |id| to the list of extensions to check for updates.
// Returns false if the |id| can't be updated due to invalid details.
// In that case, no callbacks will be performed on the |delegate_|.
- bool AddPendingExtension(const std::string& id, const GURL& update_url);
+ bool AddPendingExtension(const std::string& id, const GURL& update_url,
+ bool is_sync);
// Schedules a fetch of the manifest of all the extensions added with
// AddExtension() and AddPendingExtension().
@@ -97,13 +97,15 @@ class ExtensionDownloader : public net::URLFetcherDelegate {
struct ExtensionFetch {
ExtensionFetch();
ExtensionFetch(const std::string& id, const GURL& url,
- const std::string& package_hash, const std::string& version);
+ const std::string& package_hash, const std::string& version,
+ const bool is_sync);
~ExtensionFetch();
std::string id;
GURL url;
std::string package_hash;
std::string version;
+ bool is_sync;
};
// Helper for AddExtension() and AddPendingExtension().
@@ -111,7 +113,8 @@ class ExtensionDownloader : public net::URLFetcherDelegate {
const Version& version,
Extension::Type extension_type,
GURL update_url,
- const std::string& update_url_data);
+ const std::string& update_url_data,
+ bool is_sync);
// Adds all recorded stats taken so far to histogram counts.
void ReportStats() const;
@@ -143,7 +146,8 @@ class ExtensionDownloader : public net::URLFetcherDelegate {
void FetchUpdatedExtension(const std::string& id,
const GURL& url,
const std::string& hash,
- const std::string& version);
+ const std::string& version,
+ const bool is_sync);
// Handles the result of a crx fetch.
void OnCRXFetchComplete(const net::URLFetcher* source,
@@ -152,9 +156,10 @@ class ExtensionDownloader : public net::URLFetcherDelegate {
int response_code);
// Invokes OnExtensionDownloadFailed() on the |delegate_| for each extension
- // in the set, with |error| as the reason for failure.
- void NotifyExtensionsDownloadFailed(const std::set<std::string>& id_set,
- ExtensionDownloaderDelegate::Error error);
+ // in the mamapwith |error| as the reason for failure.
+ void NotifyExtensionsDownloadFailed(
+ const ManifestFetchData::ExtensionInfoMap& id_map,
+ ExtensionDownloaderDelegate::Error error);
// Send a notification that an update was found for |id| that we'll
// attempt to download.

Powered by Google App Engine
This is Rietveld 408576698