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

Side by Side Diff: chrome/browser/sync/glue/password_model_worker.cc

Issue 10698014: [Sync] Rename csync namespace to syncer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 "chrome/browser/sync/glue/password_model_worker.h" 5 #include "chrome/browser/sync/glue/password_model_worker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/synchronization/waitable_event.h" 9 #include "base/synchronization/waitable_event.h"
10 #include "chrome/browser/password_manager/password_store.h" 10 #include "chrome/browser/password_manager/password_store.h"
11 11
12 using base::WaitableEvent; 12 using base::WaitableEvent;
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 15
16 PasswordModelWorker::PasswordModelWorker( 16 PasswordModelWorker::PasswordModelWorker(
17 const scoped_refptr<PasswordStore>& password_store) 17 const scoped_refptr<PasswordStore>& password_store)
18 : password_store_(password_store) { 18 : password_store_(password_store) {
19 DCHECK(password_store); 19 DCHECK(password_store);
20 } 20 }
21 21
22 csync::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDone( 22 syncer::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDone(
23 const csync::WorkCallback& work) { 23 const syncer::WorkCallback& work) {
24 WaitableEvent done(false, false); 24 WaitableEvent done(false, false);
25 csync::SyncerError error = csync::UNSET; 25 syncer::SyncerError error = syncer::UNSET;
26 password_store_->ScheduleTask( 26 password_store_->ScheduleTask(
27 base::Bind(&PasswordModelWorker::CallDoWorkAndSignalTask, 27 base::Bind(&PasswordModelWorker::CallDoWorkAndSignalTask,
28 this, work, &done, &error)); 28 this, work, &done, &error));
29 done.Wait(); 29 done.Wait();
30 return error; 30 return error;
31 } 31 }
32 32
33 csync::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() { 33 syncer::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() {
34 return csync::GROUP_PASSWORD; 34 return syncer::GROUP_PASSWORD;
35 } 35 }
36 36
37 PasswordModelWorker::~PasswordModelWorker() {} 37 PasswordModelWorker::~PasswordModelWorker() {}
38 38
39 void PasswordModelWorker::CallDoWorkAndSignalTask( 39 void PasswordModelWorker::CallDoWorkAndSignalTask(
40 const csync::WorkCallback& work, 40 const syncer::WorkCallback& work,
41 WaitableEvent* done, 41 WaitableEvent* done,
42 csync::SyncerError *error) { 42 syncer::SyncerError *error) {
43 *error = work.Run(); 43 *error = work.Run();
44 done->Signal(); 44 done->Signal();
45 } 45 }
46 46
47 } // namespace browser_sync 47 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698