| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/updater/extension_updater.h" | 5 #include "chrome/browser/extensions/updater/extension_updater.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_ids); | 351 pending_extension_manager->GetPendingIdsForUpdateCheck(&pending_ids); |
| 352 | 352 |
| 353 std::list<std::string>::const_iterator iter; | 353 std::list<std::string>::const_iterator iter; |
| 354 for (iter = pending_ids.begin(); iter != pending_ids.end(); ++iter) { | 354 for (iter = pending_ids.begin(); iter != pending_ids.end(); ++iter) { |
| 355 const PendingExtensionInfo* info = pending_extension_manager->GetById( | 355 const PendingExtensionInfo* info = pending_extension_manager->GetById( |
| 356 *iter); | 356 *iter); |
| 357 if (!Manifest::IsAutoUpdateableLocation(info->install_source())) { | 357 if (!Manifest::IsAutoUpdateableLocation(info->install_source())) { |
| 358 VLOG(2) << "Extension " << *iter << " is not auto updateable"; | 358 VLOG(2) << "Extension " << *iter << " is not auto updateable"; |
| 359 continue; | 359 continue; |
| 360 } | 360 } |
| 361 if (downloader_->AddPendingExtension(*iter, info->update_url(), | 361 if (downloader_->AddPendingExtension( |
| 362 request_id)) | 362 *iter, info->update_url(), |
| 363 pending_extension_manager->IsPolicyReinstallForCorruptionExpected( |
| 364 *iter), |
| 365 request_id)) |
| 363 request.in_progress_ids_.push_back(*iter); | 366 request.in_progress_ids_.push_back(*iter); |
| 364 } | 367 } |
| 365 | 368 |
| 366 ExtensionRegistry* registry = ExtensionRegistry::Get(profile_); | 369 ExtensionRegistry* registry = ExtensionRegistry::Get(profile_); |
| 367 AddToDownloader(®istry->enabled_extensions(), pending_ids, request_id); | 370 AddToDownloader(®istry->enabled_extensions(), pending_ids, request_id); |
| 368 AddToDownloader(®istry->disabled_extensions(), pending_ids, request_id); | 371 AddToDownloader(®istry->disabled_extensions(), pending_ids, request_id); |
| 369 } else { | 372 } else { |
| 370 for (std::list<std::string>::const_iterator it = params.ids.begin(); | 373 for (std::list<std::string>::const_iterator it = params.ids.begin(); |
| 371 it != params.ids.end(); ++it) { | 374 it != params.ids.end(); ++it) { |
| 372 const Extension* extension = service_->GetExtensionById(*it, true); | 375 const Extension* extension = service_->GetExtensionById(*it, true); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 const InProgressCheck& request = requests_in_progress_[request_id]; | 598 const InProgressCheck& request = requests_in_progress_[request_id]; |
| 596 if (request.in_progress_ids_.empty()) { | 599 if (request.in_progress_ids_.empty()) { |
| 597 VLOG(2) << "Finished update check " << request_id; | 600 VLOG(2) << "Finished update check " << request_id; |
| 598 if (!request.callback.is_null()) | 601 if (!request.callback.is_null()) |
| 599 request.callback.Run(); | 602 request.callback.Run(); |
| 600 requests_in_progress_.erase(request_id); | 603 requests_in_progress_.erase(request_id); |
| 601 } | 604 } |
| 602 } | 605 } |
| 603 | 606 |
| 604 } // namespace extensions | 607 } // namespace extensions |
| OLD | NEW |