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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/callback_helpers.h" | 12 #include "base/callback_helpers.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/format_macros.h" | 15 #include "base/format_macros.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "base/metrics/field_trial.h" | 18 #include "base/metrics/field_trial.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram_macros.h" |
20 #include "base/metrics/sparse_histogram.h" | 20 #include "base/metrics/sparse_histogram.h" |
21 #include "base/rand_util.h" | 21 #include "base/rand_util.h" |
22 #include "base/sequenced_task_runner_helpers.h" | 22 #include "base/sequenced_task_runner_helpers.h" |
23 #include "base/sha1.h" | 23 #include "base/sha1.h" |
24 #include "base/stl_util.h" | 24 #include "base/stl_util.h" |
25 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
26 #include "base/strings/string_split.h" | 26 #include "base/strings/string_split.h" |
27 #include "base/strings/string_util.h" | 27 #include "base/strings/string_util.h" |
28 #include "base/strings/stringprintf.h" | 28 #include "base/strings/stringprintf.h" |
29 #include "base/task/cancelable_task_tracker.h" | 29 #include "base/task/cancelable_task_tracker.h" |
(...skipping 1715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 GURL DownloadProtectionService::GetDownloadRequestUrl() { | 1745 GURL DownloadProtectionService::GetDownloadRequestUrl() { |
1746 GURL url(kDownloadRequestUrl); | 1746 GURL url(kDownloadRequestUrl); |
1747 std::string api_key = google_apis::GetAPIKey(); | 1747 std::string api_key = google_apis::GetAPIKey(); |
1748 if (!api_key.empty()) | 1748 if (!api_key.empty()) |
1749 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); | 1749 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); |
1750 | 1750 |
1751 return url; | 1751 return url; |
1752 } | 1752 } |
1753 | 1753 |
1754 } // namespace safe_browsing | 1754 } // namespace safe_browsing |
OLD | NEW |