Skip to content

Commit

Permalink
Remove unused function rlz_lib::PingFinancialServer.
Browse files Browse the repository at this point in the history
BUG=

Review-Url: https://codereview.chromium.org/2041413007
Cr-Commit-Position: refs/heads/master@{#399210}
  • Loading branch information
fdoray authored and Commit bot committed Jun 10, 2016
1 parent 3ac77d9 commit e424404
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
23 changes: 0 additions & 23 deletions rlz/lib/rlz_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,29 +377,6 @@ bool FormFinancialPingRequest(Product product, const AccessPoint* access_points,
return true;
}

bool PingFinancialServer(Product product, const char* request, char* response,
size_t response_buffer_size) {
if (!response || response_buffer_size == 0)
return false;
response[0] = 0;

// Check if the time is right to ping.
if (!FinancialPing::IsPingTime(product, false))
return false;

// Send out the ping.
std::string response_string;
if (!FinancialPing::PingServer(request, &response_string))
return false;

if (response_string.size() >= response_buffer_size)
return false;

strncpy(response, response_string.c_str(), response_buffer_size);
response[response_buffer_size - 1] = 0;
return true;
}

bool IsPingResponseValid(const char* response, int* checksum_idx) {
if (!response || !response[0])
return false;
Expand Down
22 changes: 0 additions & 22 deletions rlz/lib/rlz_lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,28 +177,6 @@ bool RLZ_LIB_API FormFinancialPingRequest(Product product,
char* request,
size_t request_buffer_size);

// Pings the financial server and returns the HTTP response. This will fail
// if it is too early to ping the server since the last ping.
//
// If RLZ_NETWORK_IMPLEMENTATION_CHROME_NET is set, SetURLRequestContext() needs
// to be called before calling this function.
//
// product : The product to ping for.
// request : The HTTP request (for example, returned by
// FormFinancialPingRequest).
// response : The buffer in which the HTTP response is returned.
// response_buffer_size : The size of the response buffer in bytes. The buffer
// size (kMaxPingResponseLength+1) is enough for all
// legitimate server responses (any response that is
// bigger should be considered the same way as a general
// network problem).
//
// Access: HKCU read.
bool RLZ_LIB_API PingFinancialServer(Product product,
const char* request,
char* response,
size_t response_buffer_size);

// Checks if a ping response is valid - ie. it has a checksum line which
// is the CRC-32 checksum of the message uptil the checksum. If
// checksum_idx is not NULL, it will get the index of the checksum, i.e. -
Expand Down

0 comments on commit e424404

Please sign in to comment.