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

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

Issue 248713004: [Downloads] Add real observers to MockDownloadItem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 base::FilePath testdata_path_; 358 base::FilePath testdata_path_;
359 }; 359 };
360 360
361 TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) { 361 TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) {
362 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 362 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
363 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe")); 363 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe"));
364 std::vector<GURL> url_chain; 364 std::vector<GURL> url_chain;
365 GURL referrer("http://www.google.com/"); 365 GURL referrer("http://www.google.com/");
366 366
367 content::MockDownloadItem item; 367 content::MockDownloadItem item;
368 EXPECT_CALL(item, AddObserver(_));
369 EXPECT_CALL(item, RemoveObserver(_));
370 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 368 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
371 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 369 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
372 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 370 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
373 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 371 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
374 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 372 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
375 EXPECT_CALL(item, GetTabReferrerUrl()) 373 EXPECT_CALL(item, GetTabReferrerUrl())
376 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 374 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
377 download_service_->CheckClientDownload( 375 download_service_->CheckClientDownload(
378 &item, 376 &item,
379 base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, 377 base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
380 base::Unretained(this))); 378 base::Unretained(this)));
381 MessageLoop::current()->Run(); 379 MessageLoop::current()->Run();
382 EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE)); 380 EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
383 Mock::VerifyAndClearExpectations(&item); 381 Mock::VerifyAndClearExpectations(&item);
384 382
385 url_chain.push_back(GURL("file://www.google.com/")); 383 url_chain.push_back(GURL("file://www.google.com/"));
386 EXPECT_CALL(item, AddObserver(_));
387 EXPECT_CALL(item, RemoveObserver(_));
388 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 384 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
389 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 385 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
390 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 386 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
391 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 387 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
392 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 388 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
393 EXPECT_CALL(item, GetTabReferrerUrl()) 389 EXPECT_CALL(item, GetTabReferrerUrl())
394 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 390 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
395 download_service_->CheckClientDownload( 391 download_service_->CheckClientDownload(
396 &item, 392 &item,
397 base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback, 393 base::Bind(&DownloadProtectionServiceTest::CheckDoneCallback,
(...skipping 12 matching lines...) Expand all
410 response.SerializeAsString(), 406 response.SerializeAsString(),
411 net::HTTP_OK, net::URLRequestStatus::SUCCESS); 407 net::HTTP_OK, net::URLRequestStatus::SUCCESS);
412 408
413 std::string hash = "hash"; 409 std::string hash = "hash";
414 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 410 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
415 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe")); 411 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe"));
416 std::vector<GURL> url_chain; 412 std::vector<GURL> url_chain;
417 GURL referrer; 413 GURL referrer;
418 414
419 content::MockDownloadItem item; 415 content::MockDownloadItem item;
420 EXPECT_CALL(item, AddObserver(_)).Times(4);
421 EXPECT_CALL(item, RemoveObserver(_)).Times(4);
422 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 416 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
423 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 417 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
424 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 418 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
425 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 419 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
426 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 420 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
427 EXPECT_CALL(item, GetTabReferrerUrl()) 421 EXPECT_CALL(item, GetTabReferrerUrl())
428 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 422 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
429 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 423 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
430 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 424 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
431 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 425 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 net::HTTP_INTERNAL_SERVER_ERROR, net::URLRequestStatus::FAILED); 496 net::HTTP_INTERNAL_SERVER_ERROR, net::URLRequestStatus::FAILED);
503 497
504 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 498 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
505 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe")); 499 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe"));
506 std::vector<GURL> url_chain; 500 std::vector<GURL> url_chain;
507 url_chain.push_back(GURL("http://www.evil.com/a.exe")); 501 url_chain.push_back(GURL("http://www.evil.com/a.exe"));
508 GURL referrer("http://www.google.com/"); 502 GURL referrer("http://www.google.com/");
509 std::string hash = "hash"; 503 std::string hash = "hash";
510 504
511 content::MockDownloadItem item; 505 content::MockDownloadItem item;
512 EXPECT_CALL(item, AddObserver(_));
513 EXPECT_CALL(item, RemoveObserver(_));
514 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 506 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
515 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 507 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
516 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 508 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
517 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 509 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
518 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 510 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
519 EXPECT_CALL(item, GetTabReferrerUrl()) 511 EXPECT_CALL(item, GetTabReferrerUrl())
520 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 512 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
521 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 513 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
522 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 514 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
523 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 515 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 24 matching lines...) Expand all
548 net::HTTP_OK, net::URLRequestStatus::SUCCESS); 540 net::HTTP_OK, net::URLRequestStatus::SUCCESS);
549 541
550 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 542 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
551 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe")); 543 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe"));
552 std::vector<GURL> url_chain; 544 std::vector<GURL> url_chain;
553 url_chain.push_back(GURL("http://www.evil.com/a.exe")); 545 url_chain.push_back(GURL("http://www.evil.com/a.exe"));
554 GURL referrer("http://www.google.com/"); 546 GURL referrer("http://www.google.com/");
555 std::string hash = "hash"; 547 std::string hash = "hash";
556 548
557 content::MockDownloadItem item; 549 content::MockDownloadItem item;
558 EXPECT_CALL(item, AddObserver(_)).Times(6);
559 EXPECT_CALL(item, RemoveObserver(_)).Times(6);
560 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 550 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
561 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 551 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
562 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 552 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
563 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 553 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
564 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 554 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
565 EXPECT_CALL(item, GetTabReferrerUrl()) 555 EXPECT_CALL(item, GetTabReferrerUrl())
566 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 556 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
567 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 557 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
568 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 558 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
569 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 559 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 net::HTTP_OK, net::URLRequestStatus::SUCCESS); 688 net::HTTP_OK, net::URLRequestStatus::SUCCESS);
699 689
700 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 690 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
701 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe")); 691 base::FilePath a_exe(FILE_PATH_LITERAL("a.exe"));
702 std::vector<GURL> url_chain; 692 std::vector<GURL> url_chain;
703 url_chain.push_back(GURL("http://www.evil.com/a.exe")); 693 url_chain.push_back(GURL("http://www.evil.com/a.exe"));
704 GURL referrer("http://www.google.com/"); 694 GURL referrer("http://www.google.com/");
705 std::string hash = "hash"; 695 std::string hash = "hash";
706 696
707 content::MockDownloadItem item; 697 content::MockDownloadItem item;
708 EXPECT_CALL(item, AddObserver(_)).Times(1);
709 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
710 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 698 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
711 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe)); 699 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_exe));
712 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 700 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
713 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 701 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
714 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 702 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
715 EXPECT_CALL(item, GetTabReferrerUrl()) 703 EXPECT_CALL(item, GetTabReferrerUrl())
716 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 704 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
717 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 705 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
718 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 706 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
719 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 707 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 ASSERT_TRUE(download_dir.CreateUniqueTempDir()); 741 ASSERT_TRUE(download_dir.CreateUniqueTempDir());
754 742
755 base::FilePath a_tmp(download_dir.path().Append(FILE_PATH_LITERAL("a.tmp"))); 743 base::FilePath a_tmp(download_dir.path().Append(FILE_PATH_LITERAL("a.tmp")));
756 base::FilePath a_zip(FILE_PATH_LITERAL("a.zip")); 744 base::FilePath a_zip(FILE_PATH_LITERAL("a.zip"));
757 std::vector<GURL> url_chain; 745 std::vector<GURL> url_chain;
758 url_chain.push_back(GURL("http://www.evil.com/a.zip")); 746 url_chain.push_back(GURL("http://www.evil.com/a.zip"));
759 GURL referrer("http://www.google.com/"); 747 GURL referrer("http://www.google.com/");
760 std::string hash = "hash"; 748 std::string hash = "hash";
761 749
762 content::MockDownloadItem item; 750 content::MockDownloadItem item;
763 EXPECT_CALL(item, AddObserver(_)).Times(3);
764 EXPECT_CALL(item, RemoveObserver(_)).Times(3);
765 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 751 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
766 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_zip)); 752 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_zip));
767 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 753 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
768 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 754 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
769 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 755 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
770 EXPECT_CALL(item, GetTabReferrerUrl()) 756 EXPECT_CALL(item, GetTabReferrerUrl())
771 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 757 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
772 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 758 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
773 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 759 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
774 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 760 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 ASSERT_TRUE(download_dir.CreateUniqueTempDir()); 823 ASSERT_TRUE(download_dir.CreateUniqueTempDir());
838 824
839 base::FilePath a_tmp(download_dir.path().Append(FILE_PATH_LITERAL("a.tmp"))); 825 base::FilePath a_tmp(download_dir.path().Append(FILE_PATH_LITERAL("a.tmp")));
840 base::FilePath a_zip(FILE_PATH_LITERAL("a.zip")); 826 base::FilePath a_zip(FILE_PATH_LITERAL("a.zip"));
841 std::vector<GURL> url_chain; 827 std::vector<GURL> url_chain;
842 url_chain.push_back(GURL("http://www.evil.com/a.zip")); 828 url_chain.push_back(GURL("http://www.evil.com/a.zip"));
843 GURL referrer("http://www.google.com/"); 829 GURL referrer("http://www.google.com/");
844 std::string hash = "hash"; 830 std::string hash = "hash";
845 831
846 content::MockDownloadItem item; 832 content::MockDownloadItem item;
847 EXPECT_CALL(item, AddObserver(_)).Times(1);
848 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
849 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 833 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
850 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_zip)); 834 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_zip));
851 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 835 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
852 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 836 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
853 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 837 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
854 EXPECT_CALL(item, GetTabReferrerUrl()) 838 EXPECT_CALL(item, GetTabReferrerUrl())
855 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 839 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
856 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 840 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
857 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 841 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
858 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 842 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 27 matching lines...) Expand all
886 net::HTTP_OK, net::URLRequestStatus::SUCCESS); 870 net::HTTP_OK, net::URLRequestStatus::SUCCESS);
887 871
888 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp")); 872 base::FilePath a_tmp(FILE_PATH_LITERAL("a.tmp"));
889 base::FilePath a_crx(FILE_PATH_LITERAL("a.crx")); 873 base::FilePath a_crx(FILE_PATH_LITERAL("a.crx"));
890 std::vector<GURL> url_chain; 874 std::vector<GURL> url_chain;
891 url_chain.push_back(GURL("http://www.evil.com/a.crx")); 875 url_chain.push_back(GURL("http://www.evil.com/a.crx"));
892 GURL referrer("http://www.google.com/"); 876 GURL referrer("http://www.google.com/");
893 std::string hash = "hash"; 877 std::string hash = "hash";
894 878
895 content::MockDownloadItem item; 879 content::MockDownloadItem item;
896 EXPECT_CALL(item, AddObserver(_)).Times(1);
897 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
898 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp)); 880 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(a_tmp));
899 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_crx)); 881 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(a_crx));
900 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 882 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
901 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 883 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
902 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 884 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
903 EXPECT_CALL(item, GetTabReferrerUrl()) 885 EXPECT_CALL(item, GetTabReferrerUrl())
904 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 886 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
905 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 887 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
906 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 888 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
907 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 889 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 22 matching lines...) Expand all
930 base::FilePath tmp_path(FILE_PATH_LITERAL("bla.tmp")); 912 base::FilePath tmp_path(FILE_PATH_LITERAL("bla.tmp"));
931 base::FilePath final_path(FILE_PATH_LITERAL("bla.exe")); 913 base::FilePath final_path(FILE_PATH_LITERAL("bla.exe"));
932 std::vector<GURL> url_chain; 914 std::vector<GURL> url_chain;
933 url_chain.push_back(GURL("http://www.google.com/")); 915 url_chain.push_back(GURL("http://www.google.com/"));
934 url_chain.push_back(GURL("http://www.google.com/bla.exe")); 916 url_chain.push_back(GURL("http://www.google.com/bla.exe"));
935 GURL referrer("http://www.google.com/"); 917 GURL referrer("http://www.google.com/");
936 std::string hash = "hash"; 918 std::string hash = "hash";
937 std::string remote_address = "10.11.12.13"; 919 std::string remote_address = "10.11.12.13";
938 920
939 content::MockDownloadItem item; 921 content::MockDownloadItem item;
940 EXPECT_CALL(item, AddObserver(_)).Times(1);
941 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
942 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path)); 922 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
943 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)); 923 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path));
944 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 924 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
945 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 925 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
946 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 926 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
947 EXPECT_CALL(item, GetTabReferrerUrl()) 927 EXPECT_CALL(item, GetTabReferrerUrl())
948 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 928 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
949 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 929 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
950 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 930 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
951 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 931 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 base::FilePath tmp_path(FILE_PATH_LITERAL("bla.tmp")); 999 base::FilePath tmp_path(FILE_PATH_LITERAL("bla.tmp"));
1020 base::FilePath final_path(FILE_PATH_LITERAL("bla.exe")); 1000 base::FilePath final_path(FILE_PATH_LITERAL("bla.exe"));
1021 std::vector<GURL> url_chain; 1001 std::vector<GURL> url_chain;
1022 url_chain.push_back(GURL("http://www.google.com/")); 1002 url_chain.push_back(GURL("http://www.google.com/"));
1023 url_chain.push_back(GURL("ftp://www.google.com/bla.exe")); 1003 url_chain.push_back(GURL("ftp://www.google.com/bla.exe"));
1024 GURL referrer("http://www.google.com/"); 1004 GURL referrer("http://www.google.com/");
1025 std::string hash = "hash"; 1005 std::string hash = "hash";
1026 std::string remote_address = "10.11.12.13"; 1006 std::string remote_address = "10.11.12.13";
1027 1007
1028 content::MockDownloadItem item; 1008 content::MockDownloadItem item;
1029 EXPECT_CALL(item, AddObserver(_)).Times(1);
1030 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
1031 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path)); 1009 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
1032 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)); 1010 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path));
1033 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 1011 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
1034 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 1012 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
1035 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1013 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1036 EXPECT_CALL(item, GetTabReferrerUrl()) 1014 EXPECT_CALL(item, GetTabReferrerUrl())
1037 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1015 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1038 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 1016 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
1039 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 1017 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
1040 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 1018 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 std::vector<GURL> url_chain; 1081 std::vector<GURL> url_chain;
1104 url_chain.push_back(GURL("http://www.google.com/")); 1082 url_chain.push_back(GURL("http://www.google.com/"));
1105 url_chain.push_back(GURL("http://www.google.com/bla.exe")); 1083 url_chain.push_back(GURL("http://www.google.com/bla.exe"));
1106 GURL referrer("http://www.google.com/"); 1084 GURL referrer("http://www.google.com/");
1107 GURL tab_url("http://tab.com/final"); 1085 GURL tab_url("http://tab.com/final");
1108 GURL tab_referrer("http://tab.com/referrer"); 1086 GURL tab_referrer("http://tab.com/referrer");
1109 std::string hash = "hash"; 1087 std::string hash = "hash";
1110 std::string remote_address = "10.11.12.13"; 1088 std::string remote_address = "10.11.12.13";
1111 1089
1112 content::MockDownloadItem item; 1090 content::MockDownloadItem item;
1113 EXPECT_CALL(item, AddObserver(_)).Times(2);
1114 EXPECT_CALL(item, RemoveObserver(_)).Times(2);
1115 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path)); 1091 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
1116 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)); 1092 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path));
1117 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 1093 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
1118 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 1094 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
1119 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(tab_url)); 1095 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(tab_url));
1120 EXPECT_CALL(item, GetTabReferrerUrl()) 1096 EXPECT_CALL(item, GetTabReferrerUrl())
1121 .WillRepeatedly(ReturnRef(tab_referrer)); 1097 .WillRepeatedly(ReturnRef(tab_referrer));
1122 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 1098 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
1123 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 1099 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
1124 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 1100 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 net::TestURLFetcherFactory factory; 1317 net::TestURLFetcherFactory factory;
1342 1318
1343 std::vector<GURL> url_chain; 1319 std::vector<GURL> url_chain;
1344 url_chain.push_back(GURL("http://www.evil.com/bla.exe")); 1320 url_chain.push_back(GURL("http://www.evil.com/bla.exe"));
1345 GURL referrer("http://www.google.com/"); 1321 GURL referrer("http://www.google.com/");
1346 base::FilePath tmp_path(FILE_PATH_LITERAL("a.tmp")); 1322 base::FilePath tmp_path(FILE_PATH_LITERAL("a.tmp"));
1347 base::FilePath final_path(FILE_PATH_LITERAL("a.exe")); 1323 base::FilePath final_path(FILE_PATH_LITERAL("a.exe"));
1348 std::string hash = "hash"; 1324 std::string hash = "hash";
1349 1325
1350 content::MockDownloadItem item; 1326 content::MockDownloadItem item;
1351 EXPECT_CALL(item, AddObserver(_)).Times(1);
1352 EXPECT_CALL(item, RemoveObserver(_)).Times(1);
1353 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path)); 1327 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
1354 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)); 1328 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path));
1355 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 1329 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
1356 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 1330 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
1357 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1331 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1358 EXPECT_CALL(item, GetTabReferrerUrl()) 1332 EXPECT_CALL(item, GetTabReferrerUrl())
1359 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1333 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1360 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 1334 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
1361 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100)); 1335 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
1362 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true)); 1336 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
(...skipping 21 matching lines...) Expand all
1384 TEST_F(DownloadProtectionServiceTest, TestDownloadItemDestroyed) { 1358 TEST_F(DownloadProtectionServiceTest, TestDownloadItemDestroyed) {
1385 net::TestURLFetcherFactory factory; 1359 net::TestURLFetcherFactory factory;
1386 1360
1387 std::vector<GURL> url_chain; 1361 std::vector<GURL> url_chain;
1388 url_chain.push_back(GURL("http://www.evil.com/bla.exe")); 1362 url_chain.push_back(GURL("http://www.evil.com/bla.exe"));
1389 GURL referrer("http://www.google.com/"); 1363 GURL referrer("http://www.google.com/");
1390 base::FilePath tmp_path(FILE_PATH_LITERAL("a.tmp")); 1364 base::FilePath tmp_path(FILE_PATH_LITERAL("a.tmp"));
1391 base::FilePath final_path(FILE_PATH_LITERAL("a.exe")); 1365 base::FilePath final_path(FILE_PATH_LITERAL("a.exe"));
1392 std::string hash = "hash"; 1366 std::string hash = "hash";
1393 1367
1394 content::MockDownloadItem item; 1368 {
1395 content::DownloadItem::Observer* observer = NULL; 1369 content::MockDownloadItem item;
1396 EXPECT_CALL(item, AddObserver(_)).WillOnce(SaveArg<0>(&observer)); 1370 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path));
1397 EXPECT_CALL(item, RemoveObserver(_)).WillOnce(Assign( 1371 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)) ;
1398 &observer, static_cast<content::DownloadItem::Observer*>(NULL))); 1372 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain));
1399 EXPECT_CALL(item, GetFullPath()).WillRepeatedly(ReturnRef(tmp_path)); 1373 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer));
1400 EXPECT_CALL(item, GetTargetFilePath()).WillRepeatedly(ReturnRef(final_path)); 1374 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1401 EXPECT_CALL(item, GetUrlChain()).WillRepeatedly(ReturnRef(url_chain)); 1375 EXPECT_CALL(item, GetTabReferrerUrl())
1402 EXPECT_CALL(item, GetReferrerUrl()).WillRepeatedly(ReturnRef(referrer)); 1376 .WillRepeatedly(ReturnRef(GURL::EmptyGURL()));
1403 EXPECT_CALL(item, GetTabUrl()).WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1377 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash));
1404 EXPECT_CALL(item, GetTabReferrerUrl()) 1378 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
1405 .WillRepeatedly(ReturnRef(GURL::EmptyGURL())); 1379 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
1406 EXPECT_CALL(item, GetHash()).WillRepeatedly(ReturnRef(hash)); 1380 EXPECT_CALL(item, GetRemoteAddress()).WillRepeatedly(Return(""));
1407 EXPECT_CALL(item, GetReceivedBytes()).WillRepeatedly(Return(100));
1408 EXPECT_CALL(item, HasUserGesture()).WillRepeatedly(Return(true));
1409 EXPECT_CALL(item, GetRemoteAddress()).WillRepeatedly(Return(""));
1410 1381
1411 EXPECT_CALL(*sb_service_->mock_database_manager(), 1382 EXPECT_CALL(*sb_service_->mock_database_manager(),
1412 MatchDownloadWhitelistUrl(_)) 1383 MatchDownloadWhitelistUrl(_))
1413 .WillRepeatedly(Return(false)); 1384 .WillRepeatedly(Return(false));
1414 EXPECT_CALL(*binary_feature_extractor_.get(), CheckSignature(tmp_path, _)); 1385 EXPECT_CALL(*binary_feature_extractor_.get(), CheckSignature(tmp_path, _));
1415 EXPECT_CALL(*binary_feature_extractor_.get(), 1386 EXPECT_CALL(*binary_feature_extractor_.get(),
1416 ExtractImageHeaders(tmp_path, _)); 1387 ExtractImageHeaders(tmp_path, _));
1417 1388
1418 download_service_->CheckClientDownload( 1389 download_service_->CheckClientDownload(
1419 &item, 1390 &item,
1420 base::Bind(&DownloadProtectionServiceTest::SyncCheckDoneCallback, 1391 base::Bind(&DownloadProtectionServiceTest::SyncCheckDoneCallback,
1421 base::Unretained(this))); 1392 base::Unretained(this)));
1393 // MockDownloadItem going out of scope triggers the OnDownloadDestroyed
1394 // notification.
1395 }
1422 1396
1423 ASSERT_TRUE(observer != NULL);
1424 observer->OnDownloadDestroyed(&item);
1425
1426 EXPECT_TRUE(observer == NULL);
1427 EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE)); 1397 EXPECT_TRUE(IsResult(DownloadProtectionService::SAFE));
1428 } 1398 }
1429 1399
1430 TEST_F(DownloadProtectionServiceTest, GetCertificateWhitelistStrings) { 1400 TEST_F(DownloadProtectionServiceTest, GetCertificateWhitelistStrings) {
1431 // We'll pass this cert in as the "issuer", even though it isn't really 1401 // We'll pass this cert in as the "issuer", even though it isn't really
1432 // used to sign the certs below. GetCertificateWhitelistStirngs doesn't care 1402 // used to sign the certs below. GetCertificateWhitelistStirngs doesn't care
1433 // about this. 1403 // about this.
1434 scoped_refptr<net::X509Certificate> issuer_cert( 1404 scoped_refptr<net::X509Certificate> issuer_cert(
1435 ReadTestCertificate("issuer.pem")); 1405 ReadTestCertificate("issuer.pem"));
1436 ASSERT_TRUE(issuer_cert.get()); 1406 ASSERT_TRUE(issuer_cert.get());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 EXPECT_THAT(whitelist_strings, ElementsAre(cert_base + "/OU=unit")); 1476 EXPECT_THAT(whitelist_strings, ElementsAre(cert_base + "/OU=unit"));
1507 1477
1508 cert = ReadTestCertificate("test_c.pem"); 1478 cert = ReadTestCertificate("test_c.pem");
1509 ASSERT_TRUE(cert.get()); 1479 ASSERT_TRUE(cert.get());
1510 whitelist_strings.clear(); 1480 whitelist_strings.clear();
1511 GetCertificateWhitelistStrings( 1481 GetCertificateWhitelistStrings(
1512 *cert.get(), *issuer_cert.get(), &whitelist_strings); 1482 *cert.get(), *issuer_cert.get(), &whitelist_strings);
1513 EXPECT_THAT(whitelist_strings, ElementsAre()); 1483 EXPECT_THAT(whitelist_strings, ElementsAre());
1514 } 1484 }
1515 } // namespace safe_browsing 1485 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698