| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/download_manager.h" | 5 #include "chrome/browser/download/download_manager.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 NotificationService* nservice = NotificationService::current(); | 1245 NotificationService* nservice = NotificationService::current(); |
| 1246 nservice->Notify(NotificationType::EXTENSION_READY_FOR_INSTALL, | 1246 nservice->Notify(NotificationType::EXTENSION_READY_FOR_INSTALL, |
| 1247 Source<DownloadManager>(this), | 1247 Source<DownloadManager>(this), |
| 1248 NotificationService::NoDetails()); | 1248 NotificationService::NoDetails()); |
| 1249 CrxInstaller::Start(full_path, | 1249 CrxInstaller::Start(full_path, |
| 1250 service->install_directory(), | 1250 service->install_directory(), |
| 1251 Extension::INTERNAL, | 1251 Extension::INTERNAL, |
| 1252 "", // no expected id | 1252 "", // no expected id |
| 1253 true, // please delete crx on completion | 1253 true, // please delete crx on completion |
| 1254 true, // privilege increase allowed | 1254 true, // privilege increase allowed |
| 1255 g_browser_process->file_thread()->message_loop(), | |
| 1256 service, | 1255 service, |
| 1257 new ExtensionInstallUI(profile_)); | 1256 new ExtensionInstallUI(profile_)); |
| 1258 } | 1257 } |
| 1259 } | 1258 } |
| 1260 | 1259 |
| 1261 void DownloadManager::OpenDownloadInShell(const DownloadItem* download, | 1260 void DownloadManager::OpenDownloadInShell(const DownloadItem* download, |
| 1262 gfx::NativeView parent_window) { | 1261 gfx::NativeView parent_window) { |
| 1263 DCHECK(file_manager_); | 1262 DCHECK(file_manager_); |
| 1264 DCHECK(MessageLoop::current() == ui_loop_); | 1263 DCHECK(MessageLoop::current() == ui_loop_); |
| 1265 #if defined(OS_MACOSX) | 1264 #if defined(OS_MACOSX) |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1548 | 1547 |
| 1549 if (contents) | 1548 if (contents) |
| 1550 contents->OnStartDownload(download); | 1549 contents->OnStartDownload(download); |
| 1551 } | 1550 } |
| 1552 | 1551 |
| 1553 // Clears the last download path, used to initialize "save as" dialogs. | 1552 // Clears the last download path, used to initialize "save as" dialogs. |
| 1554 void DownloadManager::ClearLastDownloadPath() { | 1553 void DownloadManager::ClearLastDownloadPath() { |
| 1555 last_download_path_ = FilePath(); | 1554 last_download_path_ = FilePath(); |
| 1556 } | 1555 } |
| 1557 | 1556 |
| OLD | NEW |