| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 crx_file.path, | 560 crx_file.path, |
| 561 crx_file.file_ownership_passed, | 561 crx_file.file_ownership_passed, |
| 562 &installer)) { | 562 &installer)) { |
| 563 crx_install_is_running_ = true; | 563 crx_install_is_running_ = true; |
| 564 current_crx_file_ = crx_file; | 564 current_crx_file_ = crx_file; |
| 565 | 565 |
| 566 for (std::set<int>::const_iterator it = crx_file.request_ids.begin(); | 566 for (std::set<int>::const_iterator it = crx_file.request_ids.begin(); |
| 567 it != crx_file.request_ids.end(); ++it) { | 567 it != crx_file.request_ids.end(); ++it) { |
| 568 InProgressCheck& request = requests_in_progress_[*it]; | 568 InProgressCheck& request = requests_in_progress_[*it]; |
| 569 if (request.install_immediately) { | 569 if (request.install_immediately) { |
| 570 installer->set_install_wait_for_idle(false); | 570 installer->set_install_immediately(true); |
| 571 break; | 571 break; |
| 572 } | 572 } |
| 573 } | 573 } |
| 574 | 574 |
| 575 // Source parameter ensures that we only see the completion event for the | 575 // Source parameter ensures that we only see the completion event for the |
| 576 // the installer we started. | 576 // the installer we started. |
| 577 registrar_.Add(this, | 577 registrar_.Add(this, |
| 578 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 578 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
| 579 content::Source<CrxInstaller>(installer)); | 579 content::Source<CrxInstaller>(installer)); |
| 580 } else { | 580 } else { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 const InProgressCheck& request = requests_in_progress_[request_id]; | 642 const InProgressCheck& request = requests_in_progress_[request_id]; |
| 643 if (request.in_progress_ids_.empty()) { | 643 if (request.in_progress_ids_.empty()) { |
| 644 VLOG(2) << "Finished update check " << request_id; | 644 VLOG(2) << "Finished update check " << request_id; |
| 645 if (!request.callback.is_null()) | 645 if (!request.callback.is_null()) |
| 646 request.callback.Run(); | 646 request.callback.Run(); |
| 647 requests_in_progress_.erase(request_id); | 647 requests_in_progress_.erase(request_id); |
| 648 } | 648 } |
| 649 } | 649 } |
| 650 | 650 |
| 651 } // namespace extensions | 651 } // namespace extensions |
| OLD | NEW |