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

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

Issue 14593012: BrowserContext should simply own DownloadManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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/test_download_shelf.h" 5 #include "chrome/browser/download/test_download_shelf.h"
6 6
7 #include "content/public/browser/download_manager.h" 7 #include "content/public/browser/download_manager.h"
8 8
9 TestDownloadShelf::TestDownloadShelf() 9 TestDownloadShelf::TestDownloadShelf()
10 : is_showing_(false), 10 : is_showing_(false),
(...skipping 10 matching lines...) Expand all
21 bool TestDownloadShelf::IsClosing() const { 21 bool TestDownloadShelf::IsClosing() const {
22 return false; 22 return false;
23 } 23 }
24 24
25 Browser* TestDownloadShelf::browser() const { 25 Browser* TestDownloadShelf::browser() const {
26 return NULL; 26 return NULL;
27 } 27 }
28 28
29 void TestDownloadShelf::set_download_manager( 29 void TestDownloadShelf::set_download_manager(
30 content::DownloadManager* download_manager) { 30 content::DownloadManager* download_manager) {
31 download_manager_ = download_manager; 31 download_manager_ = download_manager;
benjhayden 2013/05/17 14:50:03 Should TestDownloadShelf observe download_manager_
cmarcelo 2013/05/20 15:22:06 It's not strictly necessary for the existing code
32 } 32 }
33 33
34 void TestDownloadShelf::DoAddDownload(content::DownloadItem* download) { 34 void TestDownloadShelf::DoAddDownload(content::DownloadItem* download) {
35 did_add_download_ = true; 35 did_add_download_ = true;
36 } 36 }
37 37
38 void TestDownloadShelf::DoShow() { 38 void TestDownloadShelf::DoShow() {
39 is_showing_ = true; 39 is_showing_ = true;
40 } 40 }
41 41
42 void TestDownloadShelf::DoClose(CloseReason reason) { 42 void TestDownloadShelf::DoClose(CloseReason reason) {
43 is_showing_ = false; 43 is_showing_ = false;
44 } 44 }
45 45
46 base::TimeDelta TestDownloadShelf::GetTransientDownloadShowDelay() { 46 base::TimeDelta TestDownloadShelf::GetTransientDownloadShowDelay() {
47 return base::TimeDelta(); 47 return base::TimeDelta();
48 } 48 }
49 49
50 content::DownloadManager* TestDownloadShelf::GetDownloadManager() { 50 content::DownloadManager* TestDownloadShelf::GetDownloadManager() {
51 return download_manager_.get(); 51 return download_manager_;
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698