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

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

Issue 595383002: cros: Fix external cache not updating. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (delegate_) 217 if (delegate_)
218 delegate_->OnExtensionListsUpdated(cached_extensions_.get()); 218 delegate_->OnExtensionListsUpdated(cached_extensions_.get());
219 } 219 }
220 220
221 void ExternalCache::CheckCache() { 221 void ExternalCache::CheckCache() {
222 if (local_cache_.is_shutdown()) 222 if (local_cache_.is_shutdown())
223 return; 223 return;
224 224
225 // If request_context_ is missing we can't download anything. 225 // If request_context_ is missing we can't download anything.
226 if (!downloader_ && request_context_.get()) { 226 if (!downloader_ && request_context_.get()) {
227 downloader_.reset( 227 downloader_ = ChromeExtensionDownloaderFactory::CreateForRequestContext(
228 new extensions::ExtensionDownloader(this, request_context_.get())); 228 request_context_.get(), this);
229 } 229 }
230 230
231 cached_extensions_->Clear(); 231 cached_extensions_->Clear();
232 for (base::DictionaryValue::Iterator it(*extensions_.get()); 232 for (base::DictionaryValue::Iterator it(*extensions_.get());
233 !it.IsAtEnd(); it.Advance()) { 233 !it.IsAtEnd(); it.Advance()) {
234 const base::DictionaryValue* entry = NULL; 234 const base::DictionaryValue* entry = NULL;
235 if (!it.value().GetAsDictionary(&entry)) { 235 if (!it.value().GetAsDictionary(&entry)) {
236 LOG(ERROR) << "ExternalCache found bad entry with type " 236 LOG(ERROR) << "ExternalCache found bad entry with type "
237 << it.value().GetType(); 237 << it.value().GetType();
238 continue; 238 continue;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 OnPutExtension(id, file_path, file_ownership_passed); 345 OnPutExtension(id, file_path, file_ownership_passed);
346 callback.Run(id, !file_ownership_passed); 346 callback.Run(id, !file_ownership_passed);
347 } 347 }
348 348
349 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( 349 std::string ExternalCache::Delegate::GetInstalledExtensionVersion(
350 const std::string& id) { 350 const std::string& id) {
351 return std::string(); 351 return std::string();
352 } 352 }
353 353
354 } // namespace chromeos 354 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698