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

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

Issue 7978039: net: Put more functions from escape.h into net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/protocol_manager.h" 5 #include "chrome/browser/safe_browsing/protocol_manager.h"
6 6
7 #ifndef NDEBUG 7 #ifndef NDEBUG
8 #include "base/base64.h" 8 #include "base/base64.h"
9 #endif 9 #endif
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 threat_list = "binhashhit"; 790 threat_list = "binhashhit";
791 break; 791 break;
792 case SafeBrowsingService::CLIENT_SIDE_PHISHING_URL: 792 case SafeBrowsingService::CLIENT_SIDE_PHISHING_URL:
793 threat_list = "phishcsdhit"; 793 threat_list = "phishcsdhit";
794 break; 794 break;
795 default: 795 default:
796 NOTREACHED(); 796 NOTREACHED();
797 } 797 }
798 return GURL(base::StringPrintf("%s&evts=%s&evtd=%s&evtr=%s&evhr=%s&evtb=%d", 798 return GURL(base::StringPrintf("%s&evts=%s&evtd=%s&evtr=%s&evhr=%s&evtb=%d",
799 url.c_str(), threat_list.c_str(), 799 url.c_str(), threat_list.c_str(),
800 EscapeQueryParamValue(malicious_url.spec(), true).c_str(), 800 net::EscapeQueryParamValue(malicious_url.spec(), true).c_str(),
801 EscapeQueryParamValue(page_url.spec(), true).c_str(), 801 net::EscapeQueryParamValue(page_url.spec(), true).c_str(),
802 EscapeQueryParamValue(referrer_url.spec(), true).c_str(), 802 net::EscapeQueryParamValue(referrer_url.spec(), true).c_str(),
803 is_subresource)); 803 is_subresource));
804 } 804 }
805 805
806 GURL SafeBrowsingProtocolManager::MalwareDetailsUrl() const { 806 GURL SafeBrowsingProtocolManager::MalwareDetailsUrl() const {
807 // The malware details go over HTTPS. 807 // The malware details go over HTTPS.
808 std::string url = base::StringPrintf( 808 std::string url = base::StringPrintf(
809 "%s/clientreport/malware?client=%s&appver=%s&pver=1.0", 809 "%s/clientreport/malware?client=%s&appver=%s&pver=1.0",
810 https_url_prefix_.c_str(), 810 https_url_prefix_.c_str(),
811 client_name_.c_str(), 811 client_name_.c_str(),
812 version_.c_str()); 812 version_.c_str());
(...skipping 12 matching lines...) Expand all
825 if (!additional_query_.empty()) { 825 if (!additional_query_.empty()) {
826 if (next_url.find("?") != std::string::npos) { 826 if (next_url.find("?") != std::string::npos) {
827 next_url.append("&"); 827 next_url.append("&");
828 } else { 828 } else {
829 next_url.append("?"); 829 next_url.append("?");
830 } 830 }
831 next_url.append(additional_query_); 831 next_url.append(additional_query_);
832 } 832 }
833 return GURL(next_url); 833 return GURL(next_url);
834 } 834 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/device_management_backend_impl.cc ('k') | chrome/browser/safe_browsing/safe_browsing_blocking_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698