| Index: chrome/browser/sync/glue/session_model_associator.cc
|
| diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
|
| index 739e1379a11209b602443c8b1c1714fa43276ca3..5c6ea1502b96a67085bce3c83879b3eabafbcd7e 100644
|
| --- a/chrome/browser/sync/glue/session_model_associator.cc
|
| +++ b/chrome/browser/sync/glue/session_model_associator.cc
|
| @@ -36,12 +36,10 @@
|
| #include "sync/internal_api/public/base/model_type_invalidation_map.h"
|
| #include "sync/internal_api/public/read_node.h"
|
| #include "sync/internal_api/public/read_transaction.h"
|
| +#include "sync/internal_api/public/user_share.h"
|
| #include "sync/internal_api/public/write_node.h"
|
| #include "sync/internal_api/public/write_transaction.h"
|
| #include "sync/protocol/session_specifics.pb.h"
|
| -#include "sync/syncable/directory.h"
|
| -#include "sync/syncable/read_transaction.h"
|
| -#include "sync/syncable/write_transaction.h"
|
| #include "sync/util/get_session_name.h"
|
| #include "ui/gfx/favicon_size.h"
|
| #if defined(OS_LINUX)
|
| @@ -602,7 +600,7 @@ syncer::SyncError SessionModelAssociator::AssociateModels() {
|
|
|
| // Make sure we have a machine tag.
|
| if (current_machine_tag_.empty()) {
|
| - InitializeCurrentMachineTag(&trans);
|
| + InitializeCurrentMachineTag(sync_service_->GetUserShare());
|
| // The session name is retrieved asynchronously so it might not come back
|
| // for the writing of the session. However, we write to the session often
|
| // enough (on every navigation) that we'll pick it up quickly.
|
| @@ -677,7 +675,7 @@ syncer::SyncError SessionModelAssociator::DisassociateModels() {
|
| }
|
|
|
| void SessionModelAssociator::InitializeCurrentMachineTag(
|
| - syncer::WriteTransaction* trans) {
|
| + syncer::UserShare* share) {
|
| DCHECK(CalledOnValidThread());
|
| DCHECK(current_machine_tag_.empty());
|
| std::string persisted_guid;
|
| @@ -688,8 +686,6 @@ void SessionModelAssociator::InitializeCurrentMachineTag(
|
| DVLOG(1) << "Restoring persisted session sync guid: "
|
| << persisted_guid;
|
| } else {
|
| - syncer::syncable::Directory* dir =
|
| - trans->GetWrappedWriteTrans()->directory();
|
| current_machine_tag_ = "session_sync";
|
| #if defined(OS_ANDROID)
|
| const std::string android_id = syncer::internal::GetAndroidId();
|
| @@ -697,9 +693,9 @@ void SessionModelAssociator::InitializeCurrentMachineTag(
|
| // are supposed to be fixed as of Gingerbread, but if it happens we fall
|
| // back to use the same GUID generation as on other platforms.
|
| current_machine_tag_.append(android_id.empty() ?
|
| - dir->cache_guid() : android_id);
|
| + share->cache_guid() : android_id);
|
| #else
|
| - current_machine_tag_.append(dir->cache_guid());
|
| + current_machine_tag_.append(share->cache_guid());
|
| #endif
|
| DVLOG(1) << "Creating session sync guid: " << current_machine_tag_;
|
| if (pref_service_)
|
|
|