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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/file_util.h" | 12 #include "base/file_util.h" |
13 #include "base/prefs/pref_member.h" | 13 #include "base/prefs/pref_member.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/rand_util.h" | 15 #include "base/rand_util.h" |
16 #include "base/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time.h" | 18 #include "base/time.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/download/download_completion_blocker.h" | 20 #include "chrome/browser/download/download_completion_blocker.h" |
21 #include "chrome/browser/download/download_crx_util.h" | 21 #include "chrome/browser/download/download_crx_util.h" |
22 #include "chrome/browser/download/download_file_picker.h" | 22 #include "chrome/browser/download/download_file_picker.h" |
23 #include "chrome/browser/download/download_history.h" | 23 #include "chrome/browser/download/download_history.h" |
24 #include "chrome/browser/download/download_path_reservation_tracker.h" | 24 #include "chrome/browser/download/download_path_reservation_tracker.h" |
25 #include "chrome/browser/download/download_prefs.h" | 25 #include "chrome/browser/download/download_prefs.h" |
26 #include "chrome/browser/download/download_service.h" | 26 #include "chrome/browser/download/download_service.h" |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 chrome::NOTIFICATION_CRX_INSTALLER_DONE, | 528 chrome::NOTIFICATION_CRX_INSTALLER_DONE, |
529 source); | 529 source); |
530 | 530 |
531 scoped_refptr<extensions::CrxInstaller> installer = | 531 scoped_refptr<extensions::CrxInstaller> installer = |
532 content::Source<extensions::CrxInstaller>(source).ptr(); | 532 content::Source<extensions::CrxInstaller>(source).ptr(); |
533 content::DownloadOpenDelayedCallback callback = | 533 content::DownloadOpenDelayedCallback callback = |
534 crx_installers_[installer.get()]; | 534 crx_installers_[installer.get()]; |
535 crx_installers_.erase(installer.get()); | 535 crx_installers_.erase(installer.get()); |
536 callback.Run(installer->did_handle_successfully()); | 536 callback.Run(installer->did_handle_successfully()); |
537 } | 537 } |
OLD | NEW |