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/download/chrome_download_manager_delegate.h" | 5 #include "chrome/browser/download/chrome_download_manager_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 const content::NotificationSource& source, | 508 const content::NotificationSource& source, |
509 const content::NotificationDetails& details) { | 509 const content::NotificationDetails& details) { |
510 DCHECK(type == chrome::NOTIFICATION_CRX_INSTALLER_DONE); | 510 DCHECK(type == chrome::NOTIFICATION_CRX_INSTALLER_DONE); |
511 | 511 |
512 registrar_.Remove(this, | 512 registrar_.Remove(this, |
513 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 513 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
514 source); | 514 source); |
515 | 515 |
516 scoped_refptr<extensions::CrxInstaller> installer = | 516 scoped_refptr<extensions::CrxInstaller> installer = |
517 content::Source<extensions::CrxInstaller>(source).ptr(); | 517 content::Source<extensions::CrxInstaller>(source).ptr(); |
518 content::DownloadOpenDelayedCallback callback = crx_installers_[installer]; | 518 content::DownloadOpenDelayedCallback callback = |
| 519 crx_installers_[installer.get()]; |
519 crx_installers_.erase(installer.get()); | 520 crx_installers_.erase(installer.get()); |
520 callback.Run(installer->did_handle_successfully()); | 521 callback.Run(installer->did_handle_successfully()); |
521 } | 522 } |
OLD | NEW |