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

Side by Side Diff: components/sync/driver/glue/ui_model_worker.cc

Issue 2489433002: [Sync] Move thread checking into the ModelSafeWorker interface. (Closed)
Patch Set: Improve/add comments. Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/driver/glue/ui_model_worker.h" 5 #include "components/sync/driver/glue/ui_model_worker.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 work_done_or_abandoned.Wait(); 56 work_done_or_abandoned.Wait();
57 57
58 return error_info; 58 return error_info;
59 } 59 }
60 60
61 ModelSafeGroup UIModelWorker::GetModelSafeGroup() { 61 ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
62 return GROUP_UI; 62 return GROUP_UI;
63 } 63 }
64 64
65 bool UIModelWorker::IsOnModelThread() {
66 return ui_thread_->BelongsToCurrentThread();
67 }
68
65 UIModelWorker::~UIModelWorker() {} 69 UIModelWorker::~UIModelWorker() {}
66 70
67 } // namespace syncer 71 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698