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

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

Issue 1881763002: Add more mac executable extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update download stats Created 4 years, 8 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/safe_browsing/download_protection_service.h" 5 #include "chrome/browser/safe_browsing/download_protection_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 FILE_PATH_LITERAL(".zip"))) { 335 FILE_PATH_LITERAL(".zip"))) {
336 StartExtractZipFeatures(); 336 StartExtractZipFeatures();
337 #if defined(OS_MACOSX) 337 #if defined(OS_MACOSX)
338 } else if (item_->GetTargetFilePath().MatchesExtension( 338 } else if (item_->GetTargetFilePath().MatchesExtension(
339 FILE_PATH_LITERAL(".dmg")) || 339 FILE_PATH_LITERAL(".dmg")) ||
340 item_->GetTargetFilePath().MatchesExtension( 340 item_->GetTargetFilePath().MatchesExtension(
341 FILE_PATH_LITERAL(".img")) || 341 FILE_PATH_LITERAL(".img")) ||
342 item_->GetTargetFilePath().MatchesExtension( 342 item_->GetTargetFilePath().MatchesExtension(
343 FILE_PATH_LITERAL(".iso")) || 343 FILE_PATH_LITERAL(".iso")) ||
344 item_->GetTargetFilePath().MatchesExtension( 344 item_->GetTargetFilePath().MatchesExtension(
345 FILE_PATH_LITERAL(".smi"))) { 345 FILE_PATH_LITERAL(".smi")) ||
346 item_->GetTargetFilePath().MatchesExtension(
347 FILE_PATH_LITERAL(".cdr")) ||
348 item_->GetTargetFilePath().MatchesExtension(
349 FILE_PATH_LITERAL(".dart")) ||
350 item_->GetTargetFilePath().MatchesExtension(
351 FILE_PATH_LITERAL(".dc42")) ||
352 item_->GetTargetFilePath().MatchesExtension(
353 FILE_PATH_LITERAL(".diskcopy42")) ||
354 item_->GetTargetFilePath().MatchesExtension(
355 FILE_PATH_LITERAL(".dmgpart")) ||
356 item_->GetTargetFilePath().MatchesExtension(
357 FILE_PATH_LITERAL(".dvdr")) ||
358 item_->GetTargetFilePath().MatchesExtension(
359 FILE_PATH_LITERAL(".imgpart")) ||
360 item_->GetTargetFilePath().MatchesExtension(
361 FILE_PATH_LITERAL(".ndif")) ||
362 item_->GetTargetFilePath().MatchesExtension(
363 FILE_PATH_LITERAL(".sparsebundle")) ||
364 item_->GetTargetFilePath().MatchesExtension(
365 FILE_PATH_LITERAL(".sparseimage")) ||
366 item_->GetTargetFilePath().MatchesExtension(
367 FILE_PATH_LITERAL(".toast")) ||
368 item_->GetTargetFilePath().MatchesExtension(
369 FILE_PATH_LITERAL(".udif"))) {
346 StartExtractDmgFeatures(); 370 StartExtractDmgFeatures();
347 #endif 371 #endif
348 } else { 372 } else {
349 StartExtractFileFeatures(); 373 StartExtractFileFeatures();
350 } 374 }
351 } 375 }
352 376
353 // Start a timeout to cancel the request if it takes too long. 377 // Start a timeout to cancel the request if it takes too long.
354 // This should only be called after we have finished accessing the file. 378 // This should only be called after we have finished accessing the file.
355 void StartTimeout() { 379 void StartTimeout() {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 GURL DownloadProtectionService::GetDownloadRequestUrl() { 1304 GURL DownloadProtectionService::GetDownloadRequestUrl() {
1281 GURL url(kDownloadRequestUrl); 1305 GURL url(kDownloadRequestUrl);
1282 std::string api_key = google_apis::GetAPIKey(); 1306 std::string api_key = google_apis::GetAPIKey();
1283 if (!api_key.empty()) 1307 if (!api_key.empty())
1284 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); 1308 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true));
1285 1309
1286 return url; 1310 return url;
1287 } 1311 }
1288 1312
1289 } // namespace safe_browsing 1313 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/download/download_extensions.cc ('k') | chrome/common/safe_browsing/download_protection_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698