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

Unified Diff: chrome/browser/extensions/updater/extension_updater.cc

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_updater.cc
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
index ef82538cb0a4585105377c5e1c446bc6cc371701..2873973d269102f808d6dfc57d1797123740c644 100644
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -87,15 +87,18 @@ namespace extensions {
ExtensionUpdater::FetchedCRXFile::FetchedCRXFile(const std::string& i,
const FilePath& p,
- const GURL& u)
+ const GURL& u,
+ bool is_sync)
: id(i),
path(p),
- download_url(u) {}
+ download_url(u),
+ is_sync(is_sync) {}
ExtensionUpdater::FetchedCRXFile::FetchedCRXFile()
: id(""),
path(),
- download_url() {}
+ download_url(),
+ is_sync(false) {}
ExtensionUpdater::FetchedCRXFile::~FetchedCRXFile() {}
@@ -310,7 +313,8 @@ void ExtensionUpdater::CheckNow() {
VLOG(2) << "Extension " << *iter << " is not auto updateable";
continue;
}
- if (downloader_->AddPendingExtension(*iter, info->update_url()))
+ if (downloader_->AddPendingExtension(*iter, info->update_url(),
+ info->is_from_sync()))
in_progress_ids_.push_back(*iter);
}
@@ -346,13 +350,14 @@ void ExtensionUpdater::OnExtensionDownloadFinished(const std::string& id,
const FilePath& path,
const GURL& download_url,
const std::string& version,
- const PingResult& ping) {
+ const PingResult& ping,
+ const bool is_sync) {
DCHECK(alive_);
UpdatePingData(id, ping);
VLOG(2) << download_url << " written to " << path.value();
- FetchedCRXFile fetched(id, path, download_url);
+ FetchedCRXFile fetched(id, path, download_url, is_sync);
fetched_crx_files_.push(fetched);
// MaybeInstallCRXFile() removes extensions from |in_progress_ids_| after

Powered by Google App Engine
This is Rietveld 408576698