| 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 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/scoped_observer.h" | 10 #include "base/scoped_observer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class AutofillProfileDataTypeController | 23 class AutofillProfileDataTypeController |
| 24 : public sync_driver::NonUIDataTypeController, | 24 : public sync_driver::NonUIDataTypeController, |
| 25 public autofill::PersonalDataManagerObserver { | 25 public autofill::PersonalDataManagerObserver { |
| 26 public: | 26 public: |
| 27 AutofillProfileDataTypeController( | 27 AutofillProfileDataTypeController( |
| 28 ProfileSyncComponentsFactory* profile_sync_factory, | 28 ProfileSyncComponentsFactory* profile_sync_factory, |
| 29 Profile* profile); | 29 Profile* profile); |
| 30 | 30 |
| 31 // NonUIDataTypeController implementation. | 31 // NonUIDataTypeController implementation. |
| 32 virtual syncer::ModelType type() const OVERRIDE; | 32 virtual syncer::ModelType type() const override; |
| 33 virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE; | 33 virtual syncer::ModelSafeGroup model_safe_group() const override; |
| 34 | 34 |
| 35 // PersonalDataManagerObserver implementation: | 35 // PersonalDataManagerObserver implementation: |
| 36 virtual void OnPersonalDataChanged() OVERRIDE; | 36 virtual void OnPersonalDataChanged() override; |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 virtual ~AutofillProfileDataTypeController(); | 39 virtual ~AutofillProfileDataTypeController(); |
| 40 | 40 |
| 41 // NonUIDataTypeController implementation. | 41 // NonUIDataTypeController implementation. |
| 42 virtual bool PostTaskOnBackendThread( | 42 virtual bool PostTaskOnBackendThread( |
| 43 const tracked_objects::Location& from_here, | 43 const tracked_objects::Location& from_here, |
| 44 const base::Closure& task) OVERRIDE; | 44 const base::Closure& task) override; |
| 45 virtual bool StartModels() OVERRIDE; | 45 virtual bool StartModels() override; |
| 46 virtual void StopModels() OVERRIDE; | 46 virtual void StopModels() override; |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // Callback to notify that WebDatabase has loaded. | 49 // Callback to notify that WebDatabase has loaded. |
| 50 void WebDatabaseLoaded(); | 50 void WebDatabaseLoaded(); |
| 51 | 51 |
| 52 Profile* const profile_; | 52 Profile* const profile_; |
| 53 autofill::PersonalDataManager* personal_data_; | 53 autofill::PersonalDataManager* personal_data_; |
| 54 bool callback_registered_; | 54 bool callback_registered_; |
| 55 | 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(AutofillProfileDataTypeController); | 56 DISALLOW_COPY_AND_ASSIGN(AutofillProfileDataTypeController); |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace browser_sync | 59 } // namespace browser_sync |
| 60 | 60 |
| 61 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ | 61 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ |
| OLD | NEW |