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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 442403003: Update SyncManager::Init to use a GURL for the sync server URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix sync_client.cc too. Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/sync_manager_impl.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 82740abd505387ef12ef20d857e012767af5921c..db5c2fc1535a6a54b8ccf9aec933193b7fed3dbb 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -50,6 +50,8 @@
using base::TimeDelta;
using sync_pb::GetUpdatesCallerInfo;
+class GURL;
+
namespace syncer {
using sessions::SyncSessionContext;
@@ -304,9 +306,7 @@ void SyncManagerImpl::ConfigureSyncer(
void SyncManagerImpl::Init(
const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
- const std::string& sync_server_and_path,
- int port,
- bool use_ssl,
+ const GURL& service_url,
scoped_ptr<HttpPostProviderFactory> post_factory,
const std::vector<scoped_refptr<ModelSafeWorker> >& workers,
ExtensionsActivity* extensions_activity,
@@ -384,8 +384,11 @@ void SyncManagerImpl::Init(
}
connection_manager_.reset(new SyncAPIServerConnectionManager(
- sync_server_and_path, port, use_ssl,
- post_factory.release(), cancelation_signal));
+ service_url.host() + service_url.path(),
haitaol1 2014/08/06 21:30:26 Why don't continue to pass down GURL?
maniscalco 2014/08/06 21:33:40 No reason other than I don't need it any deeper at
+ service_url.EffectiveIntPort(),
+ service_url.SchemeIsSecure(),
+ post_factory.release(),
+ cancelation_signal));
connection_manager_->set_client_id(directory()->cache_guid());
connection_manager_->AddListener(this);
« no previous file with comments | « sync/internal_api/sync_manager_impl.h ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698