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

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

Issue 7891054: Add GROUP_FILE ModelSafeGroup (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix worker count in unittest Created 9 years, 3 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: chrome/browser/sync/glue/database_model_worker.cc
diff --git a/chrome/browser/sync/glue/database_model_worker.cc b/chrome/browser/sync/glue/database_model_worker.cc
deleted file mode 100644
index 83330afb0739d7bc5a7948650a82ba9732991229..0000000000000000000000000000000000000000
--- a/chrome/browser/sync/glue/database_model_worker.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/sync/glue/database_model_worker.h"
-
-#include "base/synchronization/waitable_event.h"
-#include "content/browser/browser_thread.h"
-
-using base::WaitableEvent;
-
-namespace browser_sync {
-
-void DatabaseModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) {
- if (BrowserThread::CurrentlyOn(BrowserThread::DB)) {
- DLOG(WARNING) << "DoWorkAndWaitUntilDone called from the DB thread.";
- work->Run();
- return;
- }
- WaitableEvent done(false, false);
- if (!BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- NewRunnableMethod(this, &DatabaseModelWorker::CallDoWorkAndSignalTask,
- work, &done))) {
- NOTREACHED() << "Failed to post task to the db thread.";
- return;
- }
- done.Wait();
-}
-
-void DatabaseModelWorker::CallDoWorkAndSignalTask(Callback0::Type* work,
- WaitableEvent* done) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
- work->Run();
- done->Signal();
-}
-
-ModelSafeGroup DatabaseModelWorker::GetModelSafeGroup() {
- return GROUP_DB;
-}
-
-} // namespace browser_sync
« no previous file with comments | « chrome/browser/sync/glue/database_model_worker.h ('k') | chrome/browser/sync/glue/database_model_worker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698