| OLD | NEW |
| 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 "components/password_manager/sync/browser/password_data_type_controller
.h" | 5 #include "components/password_manager/sync/browser/password_data_type_controller
.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "components/password_manager/core/browser/password_store.h" | 9 #include "components/password_manager/core/browser/password_store.h" |
| 10 #include "components/sync/driver/sync_client.h" | 10 #include "components/sync/driver/sync_client.h" |
| 11 #include "components/sync/driver/sync_service.h" | 11 #include "components/sync/driver/sync_service.h" |
| 12 | 12 |
| 13 namespace browser_sync { | 13 namespace browser_sync { |
| 14 | 14 |
| 15 PasswordDataTypeController::PasswordDataTypeController( | 15 PasswordDataTypeController::PasswordDataTypeController( |
| 16 const base::Closure& dump_stack, | 16 const base::Closure& dump_stack, |
| 17 sync_driver::SyncClient* sync_client, | 17 syncer::SyncClient* sync_client, |
| 18 const base::Closure& state_changed_callback, | 18 const base::Closure& state_changed_callback, |
| 19 const scoped_refptr<password_manager::PasswordStore>& password_store) | 19 const scoped_refptr<password_manager::PasswordStore>& password_store) |
| 20 : NonUIDataTypeController(syncer::PASSWORDS, dump_stack, sync_client), | 20 : NonUIDataTypeController(syncer::PASSWORDS, dump_stack, sync_client), |
| 21 sync_client_(sync_client), | 21 sync_client_(sync_client), |
| 22 state_changed_callback_(state_changed_callback), | 22 state_changed_callback_(state_changed_callback), |
| 23 password_store_(password_store) {} | 23 password_store_(password_store) {} |
| 24 | 24 |
| 25 syncer::ModelSafeGroup PasswordDataTypeController::model_safe_group() const { | 25 syncer::ModelSafeGroup PasswordDataTypeController::model_safe_group() const { |
| 26 return syncer::GROUP_PASSWORD; | 26 return syncer::GROUP_PASSWORD; |
| 27 } | 27 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 52 DCHECK(CalledOnValidThread()); | 52 DCHECK(CalledOnValidThread()); |
| 53 sync_client_->GetSyncService()->RemoveObserver(this); | 53 sync_client_->GetSyncService()->RemoveObserver(this); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void PasswordDataTypeController::OnStateChanged() { | 56 void PasswordDataTypeController::OnStateChanged() { |
| 57 DCHECK(CalledOnValidThread()); | 57 DCHECK(CalledOnValidThread()); |
| 58 state_changed_callback_.Run(); | 58 state_changed_callback_.Run(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace browser_sync | 61 } // namespace browser_sync |
| OLD | NEW |