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

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

Issue 2029903002: Add token field to ClientSafeBrowsingReportReqeust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweak comments Created 4 years, 6 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 "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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 MOCK_METHOD0(Remove, void()); 135 MOCK_METHOD0(Remove, void());
136 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); 136 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*));
137 MOCK_CONST_METHOD0(CurrentSpeed, int64_t()); 137 MOCK_CONST_METHOD0(CurrentSpeed, int64_t());
138 MOCK_CONST_METHOD0(PercentComplete, int()); 138 MOCK_CONST_METHOD0(PercentComplete, int());
139 MOCK_CONST_METHOD0(AllDataSaved, bool()); 139 MOCK_CONST_METHOD0(AllDataSaved, bool());
140 MOCK_CONST_METHOD1(MatchesQuery, bool(const base::string16& query)); 140 MOCK_CONST_METHOD1(MatchesQuery, bool(const base::string16& query));
141 MOCK_CONST_METHOD0(IsDone, bool()); 141 MOCK_CONST_METHOD0(IsDone, bool());
142 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&()); 142 MOCK_CONST_METHOD0(GetFullPath, const base::FilePath&());
143 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&()); 143 MOCK_CONST_METHOD0(GetTargetFilePath, const base::FilePath&());
144 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition()); 144 MOCK_CONST_METHOD0(GetTargetDisposition, TargetDisposition());
145 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); 145 MOCK_METHOD2(OnContentCheckCompleted, void(DownloadDangerType,
146 const std::string&));
146 MOCK_CONST_METHOD0(GetState, DownloadState()); 147 MOCK_CONST_METHOD0(GetState, DownloadState());
147 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&()); 148 MOCK_CONST_METHOD0(GetUrlChain, const std::vector<GURL>&());
148 MOCK_METHOD1(SetTotalBytes, void(int64_t)); 149 MOCK_METHOD1(SetTotalBytes, void(int64_t));
149 MOCK_CONST_METHOD0(GetURL, const GURL&()); 150 MOCK_CONST_METHOD0(GetURL, const GURL&());
150 MOCK_CONST_METHOD0(GetOriginalUrl, const GURL&()); 151 MOCK_CONST_METHOD0(GetOriginalUrl, const GURL&());
151 MOCK_CONST_METHOD0(GetReferrerUrl, const GURL&()); 152 MOCK_CONST_METHOD0(GetReferrerUrl, const GURL&());
152 MOCK_CONST_METHOD0(GetTabUrl, const GURL&()); 153 MOCK_CONST_METHOD0(GetTabUrl, const GURL&());
153 MOCK_CONST_METHOD0(GetTabReferrerUrl, const GURL&()); 154 MOCK_CONST_METHOD0(GetTabReferrerUrl, const GURL&());
154 MOCK_CONST_METHOD0(GetSuggestedFilename, std::string()); 155 MOCK_CONST_METHOD0(GetSuggestedFilename, std::string());
155 MOCK_CONST_METHOD0(GetContentDisposition, std::string()); 156 MOCK_CONST_METHOD0(GetContentDisposition, std::string());
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0); 789 EXPECT_CALL(GetMockDownloadItem(1), Remove()).Times(0);
789 790
790 base::Callback<bool(const GURL&)> url_filter = 791 base::Callback<bool(const GURL&)> url_filter =
791 GetSingleURLFilter(download_urls_[0]); 792 GetSingleURLFilter(download_urls_[0]);
792 int remove_count = download_manager_->RemoveDownloadsByURLAndTime( 793 int remove_count = download_manager_->RemoveDownloadsByURLAndTime(
793 url_filter, base::Time(), base::Time::Max()); 794 url_filter, base::Time(), base::Time::Max());
794 EXPECT_EQ(remove_count, 1); 795 EXPECT_EQ(remove_count, 1);
795 } 796 }
796 797
797 } // namespace content 798 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698