Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 8135017: Refactor downloads into a ProfileKeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated latest rounds of comments from John. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 0a8eac7d6c21d7fda23a7413dfa872753450a62b..731107e2316ac1b3c5390ded07f29a5c3861bb25 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -19,6 +19,8 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/command_updater.h"
+#include "chrome/browser/download/download_service.h"
+#include "chrome/browser/download/download_service_factory.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/instant/instant_confirm_dialog.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -645,7 +647,11 @@ const AEEventClass kAECloudPrintUninstallClass = 'GCPu';
std::vector<Profile*> profiles(profile_manager->GetLoadedProfiles());
for (size_t i = 0; i < profiles.size(); ++i) {
- DownloadManager* download_manager = profiles[i]->GetDownloadManager();
+ DownloadService* download_service =
+ DownloadServiceFactory::GetForProfile(profiles[i]);
+ DownloadManager* download_manager =
+ (download_service->HasCreatedDownloadManager() ?
+ download_service->GetDownloadManager() : NULL);
if (download_manager && download_manager->in_progress_count() > 0) {
int downloadCount = download_manager->in_progress_count();
if ([self userWillWaitForInProgressDownloads:downloadCount]) {
« no previous file with comments | « no previous file | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698