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

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: nit 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 "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 FILE_PATH_LITERAL(".zip"))) { 334 FILE_PATH_LITERAL(".zip"))) {
335 StartExtractZipFeatures(); 335 StartExtractZipFeatures();
336 #if defined(OS_MACOSX) 336 #if defined(OS_MACOSX)
337 } else if (item_->GetTargetFilePath().MatchesExtension( 337 } else if (item_->GetTargetFilePath().MatchesExtension(
338 FILE_PATH_LITERAL(".dmg")) || 338 FILE_PATH_LITERAL(".dmg")) ||
339 item_->GetTargetFilePath().MatchesExtension( 339 item_->GetTargetFilePath().MatchesExtension(
340 FILE_PATH_LITERAL(".img")) || 340 FILE_PATH_LITERAL(".img")) ||
341 item_->GetTargetFilePath().MatchesExtension( 341 item_->GetTargetFilePath().MatchesExtension(
342 FILE_PATH_LITERAL(".iso")) || 342 FILE_PATH_LITERAL(".iso")) ||
343 item_->GetTargetFilePath().MatchesExtension( 343 item_->GetTargetFilePath().MatchesExtension(
344 FILE_PATH_LITERAL(".smi"))) { 344 FILE_PATH_LITERAL(".smi")) ||
345 item_->GetTargetFilePath().MatchesExtension(
346 FILE_PATH_LITERAL(".cdr")) ||
347 item_->GetTargetFilePath().MatchesExtension(
348 FILE_PATH_LITERAL(".dart")) ||
349 item_->GetTargetFilePath().MatchesExtension(
350 FILE_PATH_LITERAL(".dc42")) ||
351 item_->GetTargetFilePath().MatchesExtension(
352 FILE_PATH_LITERAL(".diskcopy42")) ||
353 item_->GetTargetFilePath().MatchesExtension(
354 FILE_PATH_LITERAL(".dmgpart")) ||
355 item_->GetTargetFilePath().MatchesExtension(
356 FILE_PATH_LITERAL(".dvdr")) ||
357 item_->GetTargetFilePath().MatchesExtension(
358 FILE_PATH_LITERAL(".imgpart")) ||
359 item_->GetTargetFilePath().MatchesExtension(
360 FILE_PATH_LITERAL(".ndif")) ||
361 item_->GetTargetFilePath().MatchesExtension(
362 FILE_PATH_LITERAL(".sparsebundle")) ||
363 item_->GetTargetFilePath().MatchesExtension(
364 FILE_PATH_LITERAL(".sparseimage")) ||
365 item_->GetTargetFilePath().MatchesExtension(
366 FILE_PATH_LITERAL(".toast")) ||
367 item_->GetTargetFilePath().MatchesExtension(
368 FILE_PATH_LITERAL(".udif"))) {
345 StartExtractDmgFeatures(); 369 StartExtractDmgFeatures();
346 #endif 370 #endif
347 } else { 371 } else {
348 StartExtractFileFeatures(); 372 StartExtractFileFeatures();
349 } 373 }
350 } 374 }
351 375
352 // Start a timeout to cancel the request if it takes too long. 376 // Start a timeout to cancel the request if it takes too long.
353 // This should only be called after we have finished accessing the file. 377 // This should only be called after we have finished accessing the file.
354 void StartTimeout() { 378 void StartTimeout() {
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1279 GURL DownloadProtectionService::GetDownloadRequestUrl() { 1303 GURL DownloadProtectionService::GetDownloadRequestUrl() {
1280 GURL url(kDownloadRequestUrl); 1304 GURL url(kDownloadRequestUrl);
1281 std::string api_key = google_apis::GetAPIKey(); 1305 std::string api_key = google_apis::GetAPIKey();
1282 if (!api_key.empty()) 1306 if (!api_key.empty())
1283 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); 1307 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true));
1284 1308
1285 return url; 1309 return url;
1286 } 1310 }
1287 1311
1288 } // namespace safe_browsing 1312 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698