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

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

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 syncer::WorkerLoopDestructionObserver* observer) 18 syncer::WorkerLoopDestructionObserver* observer)
19 : syncer::ModelSafeWorker(observer), 19 : syncer::ModelSafeWorker(observer),
20 password_store_(password_store) { 20 password_store_(password_store) {
21 DCHECK(password_store); 21 DCHECK(password_store.get());
22 } 22 }
23 23
24 void PasswordModelWorker::RegisterForLoopDestruction() { 24 void PasswordModelWorker::RegisterForLoopDestruction() {
25 password_store_->ScheduleTask( 25 password_store_->ScheduleTask(
26 base::Bind(&PasswordModelWorker::RegisterForPasswordLoopDestruction, 26 base::Bind(&PasswordModelWorker::RegisterForPasswordLoopDestruction,
27 this)); 27 this));
28 } 28 }
29 29
30 syncer::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDoneImpl( 30 syncer::SyncerError PasswordModelWorker::DoWorkAndWaitUntilDoneImpl(
31 const syncer::WorkCallback& work) { 31 const syncer::WorkCallback& work) {
(...skipping 20 matching lines...) Expand all
52 syncer::SyncerError *error) { 52 syncer::SyncerError *error) {
53 *error = work.Run(); 53 *error = work.Run();
54 done->Signal(); 54 done->Signal();
55 } 55 }
56 56
57 void PasswordModelWorker::RegisterForPasswordLoopDestruction() { 57 void PasswordModelWorker::RegisterForPasswordLoopDestruction() {
58 base::MessageLoop::current()->AddDestructionObserver(this); 58 base::MessageLoop::current()->AddDestructionObserver(this);
59 } 59 }
60 60
61 } // namespace browser_sync 61 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/non_ui_data_type_controller_unittest.cc ('k') | chrome/browser/sync/glue/shared_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698