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

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

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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 <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 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1542 MessageLoop::current()->Run(); 1542 MessageLoop::current()->Run();
1543 #endif 1543 #endif
1544 } 1544 }
1545 1545
1546 // Now try with a history match. 1546 // Now try with a history match.
1547 { 1547 {
1548 history::RedirectList redirects; 1548 history::RedirectList redirects;
1549 redirects.push_back(GURL("http://tab.com/ref1")); 1549 redirects.push_back(GURL("http://tab.com/ref1"));
1550 redirects.push_back(GURL("http://tab.com/ref2")); 1550 redirects.push_back(GURL("http://tab.com/ref2"));
1551 redirects.push_back(tab_url); 1551 redirects.push_back(tab_url);
1552 HistoryServiceFactory::GetForProfile(&profile, Profile::EXPLICIT_ACCESS) 1552 HistoryServiceFactory::GetForProfile(&profile,
1553 ServiceAccessType::EXPLICIT_ACCESS)
1553 ->AddPage(tab_url, 1554 ->AddPage(tab_url,
1554 base::Time::Now(), 1555 base::Time::Now(),
1555 reinterpret_cast<history::ContextID>(1), 1556 reinterpret_cast<history::ContextID>(1),
1556 0, 1557 0,
1557 GURL(), 1558 GURL(),
1558 redirects, 1559 redirects,
1559 ui::PAGE_TRANSITION_TYPED, 1560 ui::PAGE_TRANSITION_TYPED,
1560 history::SOURCE_BROWSED, 1561 history::SOURCE_BROWSED,
1561 false); 1562 false);
1562 1563
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1907 EXPECT_THAT(whitelist_strings, ElementsAre(cert_base + "/OU=unit")); 1908 EXPECT_THAT(whitelist_strings, ElementsAre(cert_base + "/OU=unit"));
1908 1909
1909 cert = ReadTestCertificate("test_c.pem"); 1910 cert = ReadTestCertificate("test_c.pem");
1910 ASSERT_TRUE(cert.get()); 1911 ASSERT_TRUE(cert.get());
1911 whitelist_strings.clear(); 1912 whitelist_strings.clear();
1912 GetCertificateWhitelistStrings( 1913 GetCertificateWhitelistStrings(
1913 *cert.get(), *issuer_cert.get(), &whitelist_strings); 1914 *cert.get(), *issuer_cert.get(), &whitelist_strings);
1914 EXPECT_THAT(whitelist_strings, ElementsAre()); 1915 EXPECT_THAT(whitelist_strings, ElementsAre());
1915 } 1916 }
1916 } // namespace safe_browsing 1917 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698