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/client_side_detection_service.h" | 5 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/command_line.h" | 10 #include "base/command_line.h" |
9 #include "base/logging.h" | 11 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
12 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
13 #include "base/metrics/sparse_histogram.h" | 15 #include "base/metrics/sparse_histogram.h" |
14 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
15 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
16 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 GURL ClientSideDetectionService::GetClientReportUrl( | 635 GURL ClientSideDetectionService::GetClientReportUrl( |
634 const std::string& report_url) { | 636 const std::string& report_url) { |
635 GURL url(report_url); | 637 GURL url(report_url); |
636 std::string api_key = google_apis::GetAPIKey(); | 638 std::string api_key = google_apis::GetAPIKey(); |
637 if (!api_key.empty()) | 639 if (!api_key.empty()) |
638 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); | 640 url = url.Resolve("?key=" + net::EscapeQueryParamValue(api_key, true)); |
639 | 641 |
640 return url; | 642 return url; |
641 } | 643 } |
642 } // namespace safe_browsing | 644 } // namespace safe_browsing |
OLD | NEW |