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

Side by Side Diff: chrome/browser/safe_browsing/download_protection_service_unittest.cc

Issue 1420123003: Move more declarations from c/b/sb/sb_util.h to components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_components
Patch Set: Minor: Replace safe_browsing_util:: with safe_browsing:: and use safe_browsing:: namespace prefix Created 5 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 "chrome/browser/safe_browsing/download_protection_service.h" 5 #include "chrome/browser/safe_browsing/download_protection_service.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 ACTION_P(CheckDownloadUrlDone, threat_type) { 197 ACTION_P(CheckDownloadUrlDone, threat_type) {
198 // TODO(nparker): Remove use of SafeBrowsingCheck and instead call 198 // TODO(nparker): Remove use of SafeBrowsingCheck and instead call
199 // client->OnCheckDownloadUrlResult(..) directly. 199 // client->OnCheckDownloadUrlResult(..) directly.
200 LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck* check = 200 LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck* check =
201 new LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck( 201 new LocalSafeBrowsingDatabaseManager::SafeBrowsingCheck(
202 arg0, 202 arg0,
203 std::vector<SBFullHash>(), 203 std::vector<SBFullHash>(),
204 arg1, 204 arg1,
205 safe_browsing_util::BINURL, 205 safe_browsing::BINURL,
206 std::vector<SBThreatType>(1, SB_THREAT_TYPE_BINARY_MALWARE_URL)); 206 std::vector<SBThreatType>(1, SB_THREAT_TYPE_BINARY_MALWARE_URL));
207 for (size_t i = 0; i < check->url_results.size(); ++i) 207 for (size_t i = 0; i < check->url_results.size(); ++i)
208 check->url_results[i] = threat_type; 208 check->url_results[i] = threat_type;
209 BrowserThread::PostTask(BrowserThread::IO, 209 BrowserThread::PostTask(BrowserThread::IO,
210 FROM_HERE, 210 FROM_HERE,
211 base::Bind(&OnSafeBrowsingResult, 211 base::Bind(&OnSafeBrowsingResult,
212 base::Owned(check))); 212 base::Owned(check)));
213 } 213 }
214 214
215 class DownloadProtectionServiceTest : public testing::Test { 215 class DownloadProtectionServiceTest : public testing::Test {
(...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after
1952 1952
1953 EXPECT_CALL(mock_download_item, GetDangerType()) 1953 EXPECT_CALL(mock_download_item, GetDangerType())
1954 .WillOnce(Return(content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST)); 1954 .WillOnce(Return(content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST));
1955 EXPECT_CALL(mock_page_navigator, OpenURL(OpenURLParamsWithContextValue("7"))); 1955 EXPECT_CALL(mock_page_navigator, OpenURL(OpenURLParamsWithContextValue("7")));
1956 1956
1957 download_service_->ShowDetailsForDownload(mock_download_item, 1957 download_service_->ShowDetailsForDownload(mock_download_item,
1958 &mock_page_navigator); 1958 &mock_page_navigator);
1959 } 1959 }
1960 1960
1961 } // namespace safe_browsing 1961 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/database_manager.h ('k') | chrome/browser/safe_browsing/local_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698