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

Side by Side Diff: content/browser/download/download_manager_impl_unittest.cc

Issue 2439533002: Download Feedback Service should upload all eligible downloads (Closed)
Patch Set: make windows bots happy Created 4 years, 1 month 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 "content/browser/download/download_manager_impl.h" 5 #include "content/browser/download/download_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 DownloadDangerType, const base::FilePath&)); 110 DownloadDangerType, const base::FilePath&));
111 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); 111 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*));
112 MOCK_METHOD1(RemoveObserver, void(DownloadItem::Observer*)); 112 MOCK_METHOD1(RemoveObserver, void(DownloadItem::Observer*));
113 MOCK_METHOD0(UpdateObservers, void()); 113 MOCK_METHOD0(UpdateObservers, void());
114 MOCK_METHOD0(CanShowInFolder, bool()); 114 MOCK_METHOD0(CanShowInFolder, bool());
115 MOCK_METHOD0(CanOpenDownload, bool()); 115 MOCK_METHOD0(CanOpenDownload, bool());
116 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool()); 116 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool());
117 MOCK_METHOD0(OpenDownload, void()); 117 MOCK_METHOD0(OpenDownload, void());
118 MOCK_METHOD0(ShowDownloadInShell, void()); 118 MOCK_METHOD0(ShowDownloadInShell, void());
119 MOCK_METHOD0(ValidateDangerousDownload, void()); 119 MOCK_METHOD0(ValidateDangerousDownload, void());
120 MOCK_METHOD1(StealDangerousDownload, void(const AcquireFileCallback&)); 120 MOCK_METHOD2(StealDangerousDownload, void(bool, const AcquireFileCallback&));
121 MOCK_METHOD3(UpdateProgress, void(int64_t, int64_t, const std::string&)); 121 MOCK_METHOD3(UpdateProgress, void(int64_t, int64_t, const std::string&));
122 MOCK_METHOD1(Cancel, void(bool)); 122 MOCK_METHOD1(Cancel, void(bool));
123 MOCK_METHOD0(MarkAsComplete, void()); 123 MOCK_METHOD0(MarkAsComplete, void());
124 void OnAllDataSaved(int64_t, std::unique_ptr<crypto::SecureHash>) override { 124 void OnAllDataSaved(int64_t, std::unique_ptr<crypto::SecureHash>) override {
125 NOTREACHED(); 125 NOTREACHED();
126 } 126 }
127 MOCK_METHOD0(OnDownloadedFileRemoved, void()); 127 MOCK_METHOD0(OnDownloadedFileRemoved, void());
128 void Start(std::unique_ptr<DownloadFile> download_file, 128 void Start(std::unique_ptr<DownloadFile> download_file,
129 std::unique_ptr<DownloadRequestHandleInterface> req_handle, 129 std::unique_ptr<DownloadRequestHandleInterface> req_handle,
130 const DownloadCreateInfo& create_info) override { 130 const DownloadCreateInfo& create_info) override {
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 787 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
788 788
789 base::Callback<bool(const GURL&)> url_filter = 789 base::Callback<bool(const GURL&)> url_filter =
790 GetSingleURLFilter(download_urls_[0]); 790 GetSingleURLFilter(download_urls_[0]);
791 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 791 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
792 url_filter, base::Time(), base::Time::Max()); 792 url_filter, base::Time(), base::Time::Max());
793 EXPECT_EQ(remove_count, 1); 793 EXPECT_EQ(remove_count, 1);
794 } 794 }
795 795
796 } // namespace content 796 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_item_impl_unittest.cc ('k') | content/public/browser/download_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698