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

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

Issue 1060033003: [chrome/browser/safe_browsing] favor DCHECK_CURRENTLY_ON for better logs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test break now Created 5 years, 8 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/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/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 17 matching lines...) Expand all
28 const char kExtendedReportingUploadUrl[] = 28 const char kExtendedReportingUploadUrl[] =
29 "https://sb-ssl.google.com/safebrowsing/clientreport/chrome-certs"; 29 "https://sb-ssl.google.com/safebrowsing/clientreport/chrome-certs";
30 } // namespace 30 } // namespace
31 31
32 // SafeBrowsingPingManager implementation ---------------------------------- 32 // SafeBrowsingPingManager implementation ----------------------------------
33 33
34 // static 34 // static
35 SafeBrowsingPingManager* SafeBrowsingPingManager::Create( 35 SafeBrowsingPingManager* SafeBrowsingPingManager::Create(
36 net::URLRequestContextGetter* request_context_getter, 36 net::URLRequestContextGetter* request_context_getter,
37 const SafeBrowsingProtocolConfig& config) { 37 const SafeBrowsingProtocolConfig& config) {
38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 38 DCHECK_CURRENTLY_ON(BrowserThread::IO);
39 return new SafeBrowsingPingManager(request_context_getter, config); 39 return new SafeBrowsingPingManager(request_context_getter, config);
40 } 40 }
41 41
42 SafeBrowsingPingManager::SafeBrowsingPingManager( 42 SafeBrowsingPingManager::SafeBrowsingPingManager(
43 net::URLRequestContextGetter* request_context_getter, 43 net::URLRequestContextGetter* request_context_getter,
44 const SafeBrowsingProtocolConfig& config) 44 const SafeBrowsingProtocolConfig& config)
45 : client_name_(config.client_name), 45 : client_name_(config.client_name),
46 request_context_getter_(request_context_getter), 46 request_context_getter_(request_context_getter),
47 url_prefix_(config.url_prefix), 47 url_prefix_(config.url_prefix),
48 certificate_error_reporter_( 48 certificate_error_reporter_(
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 url_prefix_.c_str(), 175 url_prefix_.c_str(),
176 client_name_.c_str(), 176 client_name_.c_str(),
177 version_.c_str()); 177 version_.c_str());
178 std::string api_key = google_apis::GetAPIKey(); 178 std::string api_key = google_apis::GetAPIKey();
179 if (!api_key.empty()) { 179 if (!api_key.empty()) {
180 base::StringAppendF(&url, "&key=%s", 180 base::StringAppendF(&url, "&key=%s",
181 net::EscapeQueryParamValue(api_key, true).c_str()); 181 net::EscapeQueryParamValue(api_key, true).c_str());
182 } 182 }
183 return GURL(url); 183 return GURL(url);
184 } 184 }
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/malware_details_history.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698