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

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

Issue 434493002: OAuth2 support for Webstore downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ExternalCache on chromeos Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.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 "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/file_util.h" 10 #include "base/file_util.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 delegate_->OnExtensionListsUpdated(cached_extensions_.get()); 203 delegate_->OnExtensionListsUpdated(cached_extensions_.get());
204 } 204 }
205 205
206 void ExternalCache::CheckCache() { 206 void ExternalCache::CheckCache() {
207 if (local_cache_.is_shutdown()) 207 if (local_cache_.is_shutdown())
208 return; 208 return;
209 209
210 // If request_context_ is missing we can't download anything. 210 // If request_context_ is missing we can't download anything.
211 if (!downloader_ && request_context_) { 211 if (!downloader_ && request_context_) {
212 downloader_.reset( 212 downloader_.reset(
213 new extensions::ExtensionDownloader(this, request_context_)); 213 new extensions::ExtensionDownloader(this, request_context_, NULL));
214 } 214 }
215 215
216 cached_extensions_->Clear(); 216 cached_extensions_->Clear();
217 for (base::DictionaryValue::Iterator it(*extensions_.get()); 217 for (base::DictionaryValue::Iterator it(*extensions_.get());
218 !it.IsAtEnd(); it.Advance()) { 218 !it.IsAtEnd(); it.Advance()) {
219 const base::DictionaryValue* entry = NULL; 219 const base::DictionaryValue* entry = NULL;
220 if (!it.value().GetAsDictionary(&entry)) { 220 if (!it.value().GetAsDictionary(&entry)) {
221 LOG(ERROR) << "ExternalCache found bad entry with type " 221 LOG(ERROR) << "ExternalCache found bad entry with type "
222 << it.value().GetType(); 222 << it.value().GetType();
223 continue; 223 continue;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 delegate_->OnExtensionLoadedInCache(id); 320 delegate_->OnExtensionLoadedInCache(id);
321 UpdateExtensionLoader(); 321 UpdateExtensionLoader();
322 } 322 }
323 323
324 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( 324 std::string ExternalCache::Delegate::GetInstalledExtensionVersion(
325 const std::string& id) { 325 const std::string& id) {
326 return std::string(); 326 return std::string();
327 } 327 }
328 328
329 } // namespace chromeos 329 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698