| 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 "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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 extensions_->Remove(id, NULL); | 99 extensions_->Remove(id, NULL); |
| 100 | 100 |
| 101 local_cache_.RemoveExtension(id, std::string()); | 101 local_cache_.RemoveExtension(id, std::string()); |
| 102 UpdateExtensionLoader(); | 102 UpdateExtensionLoader(); |
| 103 | 103 |
| 104 // Don't try to DownloadMissingExtensions() from here, | 104 // Don't try to DownloadMissingExtensions() from here, |
| 105 // since it can cause a fail/retry loop. | 105 // since it can cause a fail/retry loop. |
| 106 return; | 106 return; |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 LOG(ERROR) << "ExternalCache cannot find external_crx " << path.value(); | 109 DLOG(ERROR) << "ExternalCache cannot find external_crx " << path.value(); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void ExternalCache::RemoveExtensions(const std::vector<std::string>& ids) { | 112 void ExternalCache::RemoveExtensions(const std::vector<std::string>& ids) { |
| 113 if (ids.empty()) | 113 if (ids.empty()) |
| 114 return; | 114 return; |
| 115 | 115 |
| 116 for (size_t i = 0; i < ids.size(); ++i) { | 116 for (size_t i = 0; i < ids.size(); ++i) { |
| 117 cached_extensions_->Remove(ids[i], NULL); | 117 cached_extensions_->Remove(ids[i], NULL); |
| 118 extensions_->Remove(ids[i], NULL); | 118 extensions_->Remove(ids[i], NULL); |
| 119 local_cache_.RemoveExtension(ids[i], std::string()); | 119 local_cache_.RemoveExtension(ids[i], std::string()); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 OnPutExtension(id, file_path, file_ownership_passed); | 346 OnPutExtension(id, file_path, file_ownership_passed); |
| 347 callback.Run(id, !file_ownership_passed); | 347 callback.Run(id, !file_ownership_passed); |
| 348 } | 348 } |
| 349 | 349 |
| 350 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( | 350 std::string ExternalCache::Delegate::GetInstalledExtensionVersion( |
| 351 const std::string& id) { | 351 const std::string& id) { |
| 352 return std::string(); | 352 return std::string(); |
| 353 } | 353 } |
| 354 | 354 |
| 355 } // namespace chromeos | 355 } // namespace chromeos |
| OLD | NEW |