Skip to content

Commit

Permalink
[Sync] Remove unused functions from ServerConnectionManager
Browse files Browse the repository at this point in the history
As part of code review I came across these few functions that aren't
used anywhere. Removing them.

R=maxbogue@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1992573002
Cr-Commit-Position: refs/heads/master@{#394443}
  • Loading branch information
pavely authored and Commit bot committed May 18, 2016
1 parent 28728e3 commit c578253
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 37 deletions.
27 changes: 0 additions & 27 deletions sync/engine/net/server_connection_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -299,33 +299,6 @@ bool ServerConnectionManager::PostBufferToPath(PostBufferParams* params,
return false;
}

// Returns the current server parameters in server_url and port.
void ServerConnectionManager::GetServerParameters(string* server_url,
int* port,
bool* use_ssl) const {
if (server_url != NULL)
*server_url = sync_server_;
if (port != NULL)
*port = sync_server_port_;
if (use_ssl != NULL)
*use_ssl = use_ssl_;
}

std::string ServerConnectionManager::GetServerHost() const {
string server_url;
int port;
bool use_ssl;
GetServerParameters(&server_url, &port, &use_ssl);
// For unit tests.
if (server_url.empty())
return std::string();
// We just want the hostname, so we don't need to switch on use_ssl.
server_url = "http://" + server_url;
GURL gurl(server_url);
DCHECK(gurl.is_valid()) << gurl;
return gurl.host();
}

void ServerConnectionManager::AddListener(
ServerConnectionEventListener* listener) {
DCHECK(thread_checker_.CalledOnValidThread());
Expand Down
10 changes: 0 additions & 10 deletions sync/engine/net/server_connection_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
ServerConnectionManager* scm_;

private:
int ReadResponse(void* buffer, int length);
int ReadResponse(std::string* buffer, int length);
};

Expand All @@ -185,13 +184,6 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {

const std::string client_id() const { return client_id_; }

// Returns the current server parameters in server_url, port and use_ssl.
void GetServerParameters(std::string* server_url,
int* port,
bool* use_ssl) const;

std::string GetServerHost() const;

// Factory method to create an Connection object we can use for
// communication with the server.
virtual Connection* MakeConnection();
Expand Down Expand Up @@ -288,8 +280,6 @@ class SYNC_EXPORT ServerConnectionManager : public CancelationObserver {
Connection* active_connection_;

private:
friend class Connection;

// A class to help deal with cleaning up active Connection objects when (for
// ex) multiple early-exits are present in some scope. ScopedConnectionHelper
// informs the ServerConnectionManager before the Connection object it takes
Expand Down

0 comments on commit c578253

Please sign in to comment.