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

Unified Diff: components/sync/driver/glue/ui_model_worker.cc

Issue 2388673002: Revert of [Sync] Move //components/sync to the syncer namespace. (patchset #5 id:40001 of https://co (Closed)
Patch Set: Created 4 years, 2 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: components/sync/driver/glue/ui_model_worker.cc
diff --git a/components/sync/driver/glue/ui_model_worker.cc b/components/sync/driver/glue/ui_model_worker.cc
index 9847a73cf01a1e3d2ce7a9748e09b1554df42f32..9df8711392ff651cd0ea52961da3e74d88f4b57f 100644
--- a/components/sync/driver/glue/ui_model_worker.cc
+++ b/components/sync/driver/glue/ui_model_worker.cc
@@ -11,14 +11,14 @@
#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "base/threading/thread_restrictions.h"
-namespace syncer {
+namespace browser_sync {
namespace {
// A simple callback to signal a waitable event after running a closure.
-void CallDoWorkAndSignalCallback(const WorkCallback& work,
+void CallDoWorkAndSignalCallback(const syncer::WorkCallback& work,
base::WaitableEvent* work_done,
- SyncerError* error_info) {
+ syncer::SyncerError* error_info) {
if (work.is_null()) {
// This can happen during tests or cases where there are more than just the
// default UIModelWorker in existence and it gets destroyed before
@@ -40,17 +40,17 @@ void CallDoWorkAndSignalCallback(const WorkCallback& work,
UIModelWorker::UIModelWorker(
const scoped_refptr<base::SingleThreadTaskRunner>& ui_thread,
- WorkerLoopDestructionObserver* observer)
- : ModelSafeWorker(observer), ui_thread_(ui_thread) {}
+ syncer::WorkerLoopDestructionObserver* observer)
+ : syncer::ModelSafeWorker(observer), ui_thread_(ui_thread) {}
void UIModelWorker::RegisterForLoopDestruction() {
CHECK(ui_thread_->BelongsToCurrentThread());
SetWorkingLoopToCurrent();
}
-SyncerError UIModelWorker::DoWorkAndWaitUntilDoneImpl(
- const WorkCallback& work) {
- SyncerError error_info;
+syncer::SyncerError UIModelWorker::DoWorkAndWaitUntilDoneImpl(
+ const syncer::WorkCallback& work) {
+ syncer::SyncerError error_info;
if (ui_thread_->BelongsToCurrentThread()) {
DLOG(WARNING) << "DoWorkAndWaitUntilDone called from "
<< "ui_loop_. Probably a nested invocation?";
@@ -61,7 +61,7 @@ SyncerError UIModelWorker::DoWorkAndWaitUntilDoneImpl(
base::Bind(&CallDoWorkAndSignalCallback, work,
work_done_or_stopped(), &error_info))) {
DLOG(WARNING) << "Could not post work to UI loop.";
- error_info = CANNOT_DO_WORK;
+ error_info = syncer::CANNOT_DO_WORK;
return error_info;
}
work_done_or_stopped()->Wait();
@@ -69,10 +69,10 @@ SyncerError UIModelWorker::DoWorkAndWaitUntilDoneImpl(
return error_info;
}
-ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
- return GROUP_UI;
+syncer::ModelSafeGroup UIModelWorker::GetModelSafeGroup() {
+ return syncer::GROUP_UI;
}
UIModelWorker::~UIModelWorker() {}
-} // namespace syncer
+} // namespace browser_sync
« no previous file with comments | « components/sync/driver/glue/ui_model_worker.h ('k') | components/sync/driver/glue/ui_model_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698