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

Side by Side Diff: chrome/browser/chromeos/extensions/external_cache.cc

Issue 2768573002: Send traffic-management headers from extension updater. (Closed)
Patch Set: Change the code according to mek's comments. Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.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) 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
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(
261 it.key(), update_url, false, 0,
262 extensions::ManifestFetchData::FetchPriority::BACKGROUND);
261 } 263 }
262 264
263 base::FilePath file_path; 265 base::FilePath file_path;
264 std::string version; 266 std::string version;
265 std::string hash; 267 std::string hash;
266 if (local_cache_.GetExtension(it.key(), hash, &file_path, &version)) { 268 if (local_cache_.GetExtension(it.key(), hash, &file_path, &version)) {
267 // Copy entry to don't modify it inside extensions_. 269 // Copy entry to don't modify it inside extensions_.
268 std::unique_ptr<base::DictionaryValue> entry_copy = 270 std::unique_ptr<base::DictionaryValue> entry_copy =
269 entry->CreateDeepCopy(); 271 entry->CreateDeepCopy();
270 272
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 OnPutExtension(id, file_path, file_ownership_passed); 362 OnPutExtension(id, file_path, file_ownership_passed);
361 callback.Run(id, !file_ownership_passed); 363 callback.Run(id, !file_ownership_passed);
362 } 364 }
363 365
364 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( 366 std::string ExternalCache::Delegate::GetInstalledExtensionVersion(
365 const std::string& id) { 367 const std::string& id) {
366 return std::string(); 368 return std::string();
367 } 369 }
368 370
369 } // namespace chromeos 371 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698