OLD | NEW |
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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/message_loop_helpers.h" | 12 #include "base/message_loop_helpers.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/string_number_conversions.h" | 15 #include "base/string_number_conversions.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/stringprintf.h" | 17 #include "base/stringprintf.h" |
18 #include "base/threading/sequenced_worker_pool.h" | 18 #include "base/threading/sequenced_worker_pool.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 20 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
21 #include "chrome/browser/safe_browsing/signature_util.h" | 21 #include "chrome/browser/safe_browsing/signature_util.h" |
| 22 #include "chrome/browser/ui/browser.h" |
22 #include "chrome/browser/ui/browser_list.h" | 23 #include "chrome/browser/ui/browser_list.h" |
23 #include "chrome/common/safe_browsing/csd.pb.h" | 24 #include "chrome/common/safe_browsing/csd.pb.h" |
24 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
25 #include "content/public/browser/browser_thread.h" | 26 #include "content/public/browser/browser_thread.h" |
26 #include "content/public/browser/download_item.h" | 27 #include "content/public/browser/download_item.h" |
27 #include "content/public/browser/page_navigator.h" | 28 #include "content/public/browser/page_navigator.h" |
28 #include "content/public/common/url_fetcher.h" | 29 #include "content/public/common/url_fetcher.h" |
29 #include "content/public/common/url_fetcher_delegate.h" | 30 #include "content/public/common/url_fetcher_delegate.h" |
30 #include "net/base/load_flags.h" | 31 #include "net/base/load_flags.h" |
31 #include "net/base/x509_cert_types.h" | 32 #include "net/base/x509_cert_types.h" |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 | 858 |
858 std::string issuer_fp = base::HexEncode(issuer.fingerprint().data, | 859 std::string issuer_fp = base::HexEncode(issuer.fingerprint().data, |
859 sizeof(issuer.fingerprint().data)); | 860 sizeof(issuer.fingerprint().data)); |
860 for (std::set<std::string>::iterator it = paths_to_check.begin(); | 861 for (std::set<std::string>::iterator it = paths_to_check.begin(); |
861 it != paths_to_check.end(); ++it) { | 862 it != paths_to_check.end(); ++it) { |
862 whitelist_strings->push_back("cert/" + issuer_fp + *it); | 863 whitelist_strings->push_back("cert/" + issuer_fp + *it); |
863 } | 864 } |
864 } | 865 } |
865 | 866 |
866 } // namespace safe_browsing | 867 } // namespace safe_browsing |
OLD | NEW |