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

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

Issue 9565050: [Sync] Simplify GetSessionName interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile failure Created 8 years, 10 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 | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52d8909dffce78e5803d977dcfbceed37e78b29f..e5782c46372efe1804f4bb8a3abfa77633a68a1b 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -11,6 +11,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/threading/sequenced_worker_pool.h"
#include "base/sys_info.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
@@ -27,7 +28,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/protocol/session_specifics.pb.h"
#include "chrome/browser/sync/syncable/syncable.h"
-#include "chrome/browser/sync/util/get_session_name_task.h"
+#include "chrome/browser/sync/util/get_session_name.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/navigation_entry.h"
@@ -576,13 +577,10 @@ void SessionModelAssociator::InitializeCurrentSessionName() {
if (setup_for_test_) {
OnSessionNameInitialized("TestSessionName");
} else {
- scoped_refptr<GetSessionNameTask> task = new GetSessionNameTask(
+ browser_sync::GetSessionName(
+ BrowserThread::GetBlockingPool(),
base::Bind(&SessionModelAssociator::OnSessionNameInitialized,
AsWeakPtr()));
- BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&GetSessionNameTask::GetSessionNameAsync, task.get()));
}
}
« no previous file with comments | « no previous file | chrome/browser/sync/glue/sync_backend_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698