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

Side by Side Diff: chrome/browser/download/download_service.cc

Issue 966983002: downloads: clicking "remove" on chrome://downloads should also hide shelf item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: probably more like this Created 5 years, 9 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 unified diff | Download patch
OLDNEW
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/download_service.h" 5 #include "chrome/browser/download/download_service.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/download/chrome_download_manager_delegate.h" 9 #include "chrome/browser/download/chrome_download_manager_delegate.h"
10 #include "chrome/browser/download/download_history.h" 10 #include "chrome/browser/download/download_history.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 history->GetNextDownloadId( 61 history->GetNextDownloadId(
62 manager_delegate_->GetDownloadIdReceiverCallback()); 62 manager_delegate_->GetDownloadIdReceiverCallback());
63 download_history_.reset(new DownloadHistory( 63 download_history_.reset(new DownloadHistory(
64 manager, 64 manager,
65 scoped_ptr<DownloadHistory::HistoryAdapter>( 65 scoped_ptr<DownloadHistory::HistoryAdapter>(
66 new DownloadHistory::HistoryAdapter(history)))); 66 new DownloadHistory::HistoryAdapter(history))));
67 } 67 }
68 68
69 // Pass an empty delegate when constructing the DownloadUIController. The 69 // Pass an empty delegate when constructing the DownloadUIController. The
70 // default delegate does all the notifications we need. 70 // default delegate does all the notifications we need.
71 download_ui_.reset(new DownloadUIController( 71 download_ui_.reset(new DownloadUIController(manager));
72 manager, scoped_ptr<DownloadUIController::Delegate>()));
73 72
74 // Include this download manager in the set monitored by the 73 // Include this download manager in the set monitored by the
75 // global status updater. 74 // global status updater.
76 g_browser_process->download_status_updater()->AddManager(manager); 75 g_browser_process->download_status_updater()->AddManager(manager);
77 76
78 return manager_delegate_.get(); 77 return manager_delegate_.get();
79 } 78 }
80 79
81 DownloadHistory* DownloadService::GetDownloadHistory() { 80 DownloadHistory* DownloadService::GetDownloadHistory() {
82 if (!download_manager_created_) { 81 if (!download_manager_created_) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // code) when the DownloadManager is shutting down. So we shut it down 170 // code) when the DownloadManager is shutting down. So we shut it down
172 // manually earlier. See http://crbug.com/131692 171 // manually earlier. See http://crbug.com/131692
173 BrowserContext::GetDownloadManager(profile_)->Shutdown(); 172 BrowserContext::GetDownloadManager(profile_)->Shutdown();
174 } 173 }
175 #if defined(ENABLE_EXTENSIONS) 174 #if defined(ENABLE_EXTENSIONS)
176 extension_event_router_.reset(); 175 extension_event_router_.reset();
177 #endif 176 #endif
178 manager_delegate_.reset(); 177 manager_delegate_.reset();
179 download_history_.reset(); 178 download_history_.reset();
180 } 179 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_ui_controller.h » ('j') | chrome/browser/download/download_ui_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698