OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/chromeos/extensions/external_cache.h" | 5 #include "chrome/browser/chromeos/extensions/external_cache.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 entry->GetString(extensions::ExternalProviderImpl::kExternalUpdateUrl, | 250 entry->GetString(extensions::ExternalProviderImpl::kExternalUpdateUrl, |
251 &external_update_url); | 251 &external_update_url); |
252 if (downloader_ && !keep_if_present) { | 252 if (downloader_ && !keep_if_present) { |
253 GURL update_url; | 253 GURL update_url; |
254 if (!external_update_url.empty()) | 254 if (!external_update_url.empty()) |
255 update_url = GURL(external_update_url); | 255 update_url = GURL(external_update_url); |
256 else if (always_check_updates_) | 256 else if (always_check_updates_) |
257 update_url = extension_urls::GetWebstoreUpdateUrl(); | 257 update_url = extension_urls::GetWebstoreUpdateUrl(); |
258 | 258 |
259 if (update_url.is_valid()) | 259 if (update_url.is_valid()) |
260 downloader_->AddPendingExtension(it.key(), update_url, false, 0); | 260 downloader_->AddPendingExtension(it.key(), update_url, false, 0, false); |
261 } | 261 } |
262 | 262 |
263 base::FilePath file_path; | 263 base::FilePath file_path; |
264 std::string version; | 264 std::string version; |
265 std::string hash; | 265 std::string hash; |
266 if (local_cache_.GetExtension(it.key(), hash, &file_path, &version)) { | 266 if (local_cache_.GetExtension(it.key(), hash, &file_path, &version)) { |
267 // Copy entry to don't modify it inside extensions_. | 267 // Copy entry to don't modify it inside extensions_. |
268 base::DictionaryValue* entry_copy = entry->DeepCopy(); | 268 base::DictionaryValue* entry_copy = entry->DeepCopy(); |
269 | 269 |
270 if (extension_urls::IsWebstoreUpdateUrl(GURL(external_update_url))) { | 270 if (extension_urls::IsWebstoreUpdateUrl(GURL(external_update_url))) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 OnPutExtension(id, file_path, file_ownership_passed); | 358 OnPutExtension(id, file_path, file_ownership_passed); |
359 callback.Run(id, !file_ownership_passed); | 359 callback.Run(id, !file_ownership_passed); |
360 } | 360 } |
361 | 361 |
362 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( | 362 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( |
363 const std::string& id) { | 363 const std::string& id) { |
364 return std::string(); | 364 return std::string(); |
365 } | 365 } |
366 | 366 |
367 } // namespace chromeos | 367 } // namespace chromeos |
OLD | NEW |