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

Unified Diff: chrome/browser/sync/glue/autofill_data_type_controller.cc

Issue 10071033: RefCounted types should not have public destructors, chrome/browser/ part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation ordering fixes as well Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/autofill_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 31ad3ae107726d1e4718e255a0531e84c6efd0d5..b614b09292fc6a0d0a5b7c6d20942a4882f1ed74 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -26,6 +26,30 @@ AutofillDataTypeController::AutofillDataTypeController(
profile_sync_factory, profile, sync_service) {
}
+syncable::ModelType AutofillDataTypeController::type() const {
+ return syncable::AUTOFILL;
+}
+
+browser_sync::ModelSafeGroup AutofillDataTypeController::model_safe_group()
+ const {
+ return browser_sync::GROUP_DB;
+}
+
+void AutofillDataTypeController::Observe(
+ int notification_type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_EQ(chrome::NOTIFICATION_WEB_DATABASE_LOADED, notification_type);
+ DCHECK_EQ(MODEL_STARTING, state());
+ notification_registrar_.RemoveAll();
+ set_state(ASSOCIATING);
+ if (!StartAssociationAsync()) {
+ SyncError error(FROM_HERE, "Failed to post association task.", type());
+ StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
+ }
+}
+
AutofillDataTypeController::~AutofillDataTypeController() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
@@ -52,21 +76,6 @@ bool AutofillDataTypeController::StartModels() {
}
}
-void AutofillDataTypeController::Observe(
- int notification_type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(chrome::NOTIFICATION_WEB_DATABASE_LOADED, notification_type);
- DCHECK_EQ(MODEL_STARTING, state());
- notification_registrar_.RemoveAll();
- set_state(ASSOCIATING);
- if (!StartAssociationAsync()) {
- SyncError error(FROM_HERE, "Failed to post association task.", type());
- StartDoneImpl(ASSOCIATION_FAILED, DISABLED, error);
- }
-}
-
void AutofillDataTypeController::StopModels() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED);
@@ -74,13 +83,4 @@ void AutofillDataTypeController::StopModels() {
notification_registrar_.RemoveAll();
}
-syncable::ModelType AutofillDataTypeController::type() const {
- return syncable::AUTOFILL;
-}
-
-browser_sync::ModelSafeGroup AutofillDataTypeController::model_safe_group()
- const {
- return browser_sync::GROUP_DB;
-}
-
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698