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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_impl.cc

Issue 395013002: Pass signin_scoped_device_id to DeviceInfoSpecifics. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
Index: chrome/browser/sync/glue/sync_backend_host_impl.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_impl.cc b/chrome/browser/sync/glue/sync_backend_host_impl.cc
index dc0de63237f7dc4872aca1018e7b95145a3bc8db..8a66eb4f343bd9e280589ca7991fbbfdce148752 100644
--- a/chrome/browser/sync/glue/sync_backend_host_impl.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_impl.cc
@@ -9,11 +9,13 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/sync/glue/sync_backend_host_core.h"
#include "chrome/browser/sync/glue/sync_backend_registrar.h"
#include "chrome/common/chrome_switches.h"
#include "components/invalidation/invalidation_service.h"
#include "components/network_time/network_time_tracker.h"
+#include "components/signin/core/browser/signin_client.h"
#include "components/sync_driver/sync_frontend.h"
#include "components/sync_driver/sync_prefs.h"
#include "content/public/browser/browser_thread.h"
@@ -132,6 +134,11 @@ void SyncBackendHostImpl::Initialize(
InternalComponentsFactory::FORCE_ENABLE_PRE_COMMIT_UPDATE_AVOIDANCE;
}
+ SigninClient* signin_client =
+ ChromeSigninClientFactory::GetForProfile(profile_);
+ std::string signin_scoped_device_id =
+ signin_client->GetSigninScopedDeviceId();
rlarocque 2014/07/16 00:44:31 Is this guaranteed to succeed? If it can fail, wh
pavely 2014/07/16 21:35:59 profile_ is always valid, it is dereferenced in mu
rlarocque 2014/07/16 21:39:48 I think it was the empty string case that worried
+
scoped_ptr<DoInitializeOptions> init_opts(new DoInitializeOptions(
registrar_->sync_thread()->message_loop(),
registrar_.get(),
@@ -153,7 +160,8 @@ void SyncBackendHostImpl::Initialize(
scoped_ptr<InternalComponentsFactory>(
new syncer::InternalComponentsFactoryImpl(factory_switches)).Pass(),
unrecoverable_error_handler.Pass(),
- report_unrecoverable_error_function));
+ report_unrecoverable_error_function,
+ signin_scoped_device_id));
InitCore(init_opts.Pass());
}

Powered by Google App Engine
This is Rietveld 408576698