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

Unified Diff: components/browser_sync/profile_sync_service.cc

Issue 2808113003: [Sync] Post back to UI thread for USS GetAllNodes. (Closed)
Patch Set: Created 3 years, 8 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 | components/sync/driver/model_type_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/profile_sync_service.cc
diff --git a/components/browser_sync/profile_sync_service.cc b/components/browser_sync/profile_sync_service.cc
index 015bbd9dfe1fe3758ef13a1a24542ca4a74200ca..5eb7949df19312fb33f3f7d137fa9432ae7ff581 100644
--- a/components/browser_sync/profile_sync_service.cc
+++ b/components/browser_sync/profile_sync_service.cc
@@ -2110,9 +2110,11 @@ class GetAllNodesRequestHelper
virtual ~GetAllNodesRequestHelper();
std::unique_ptr<base::ListValue> result_accumulator_;
-
syncer::ModelTypeSet awaiting_types_;
base::Callback<void(std::unique_ptr<base::ListValue>)> callback_;
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(GetAllNodesRequestHelper);
};
GetAllNodesRequestHelper::GetAllNodesRequestHelper(
@@ -2135,6 +2137,8 @@ GetAllNodesRequestHelper::~GetAllNodesRequestHelper() {
void GetAllNodesRequestHelper::OnReceivedNodesForType(
const syncer::ModelType type,
std::unique_ptr<base::ListValue> node_list) {
+ DCHECK(thread_checker_.CalledOnValidThread());
+
// Add these results to our list.
std::unique_ptr<base::DictionaryValue> type_dict(new base::DictionaryValue());
type_dict->SetString("type", ModelTypeToString(type));
« no previous file with comments | « no previous file | components/sync/driver/model_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698