Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/password_manager/sync/browser/password_model_worker.h" | 5 #include "components/password_manager/sync/browser/password_model_worker.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
| 10 #include "components/password_manager/core/browser/password_store.h" | 10 #include "components/password_manager/core/browser/password_store.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 work_done_or_abandoned.Wait(); | 55 work_done_or_abandoned.Wait(); |
| 56 else | 56 else |
| 57 error = syncer::CANNOT_DO_WORK; | 57 error = syncer::CANNOT_DO_WORK; |
| 58 return error; | 58 return error; |
| 59 } | 59 } |
| 60 | 60 |
| 61 syncer::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() { | 61 syncer::ModelSafeGroup PasswordModelWorker::GetModelSafeGroup() { |
| 62 return syncer::GROUP_PASSWORD; | 62 return syncer::GROUP_PASSWORD; |
| 63 } | 63 } |
| 64 | 64 |
| 65 bool PasswordModelWorker::IsOnModelThread() { | |
| 66 // Can't do better without modifying PasswordStore. | |
|
vabr (Chromium)
2016/11/08 08:32:45
Please explain the issue better. Ideally, the issu
maxbogue
2016/11/08 18:43:23
I've improved the comment to hopefully be clearer
vabr (Chromium)
2016/11/08 19:24:59
Acknowledged. If there was a need to implement thi
| |
| 67 return true; | |
| 68 } | |
| 69 | |
| 65 PasswordModelWorker::~PasswordModelWorker() {} | 70 PasswordModelWorker::~PasswordModelWorker() {} |
| 66 | 71 |
| 67 void PasswordModelWorker::RequestStop() { | 72 void PasswordModelWorker::RequestStop() { |
| 68 ModelSafeWorker::RequestStop(); | 73 ModelSafeWorker::RequestStop(); |
| 69 | 74 |
| 70 base::AutoLock lock(password_store_lock_); | 75 base::AutoLock lock(password_store_lock_); |
| 71 password_store_ = NULL; | 76 password_store_ = NULL; |
| 72 } | 77 } |
| 73 | 78 |
| 74 } // namespace browser_sync | 79 } // namespace browser_sync |
| OLD | NEW |