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/ping_manager.h" | 5 #include "chrome/browser/safe_browsing/ping_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "base/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "chrome/common/env_vars.h" | 11 #include "chrome/common/env_vars.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "google_apis/google_api_keys.h" | 13 #include "google_apis/google_api_keys.h" |
14 #include "net/base/escape.h" | 14 #include "net/base/escape.h" |
15 #include "net/base/load_flags.h" | 15 #include "net/base/load_flags.h" |
16 #include "net/url_request/url_fetcher.h" | 16 #include "net/url_request/url_fetcher.h" |
17 #include "net/url_request/url_request_context_getter.h" | 17 #include "net/url_request/url_request_context_getter.h" |
18 #include "net/url_request/url_request_status.h" | 18 #include "net/url_request/url_request_status.h" |
19 | 19 |
20 using content::BrowserThread; | 20 using content::BrowserThread; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 url_prefix_.c_str(), | 148 url_prefix_.c_str(), |
149 client_name_.c_str(), | 149 client_name_.c_str(), |
150 version_.c_str()); | 150 version_.c_str()); |
151 std::string api_key = google_apis::GetAPIKey(); | 151 std::string api_key = google_apis::GetAPIKey(); |
152 if (!api_key.empty()) { | 152 if (!api_key.empty()) { |
153 base::StringAppendF(&url, "&key=%s", | 153 base::StringAppendF(&url, "&key=%s", |
154 net::EscapeQueryParamValue(api_key, true).c_str()); | 154 net::EscapeQueryParamValue(api_key, true).c_str()); |
155 } | 155 } |
156 return GURL(url); | 156 return GURL(url); |
157 } | 157 } |
OLD | NEW |