[Sync] Cleanup all tab sync enabling logic now that its on by default.

BUG=none
TEST=


Review URL: https://chromiumcodereview.appspot.com/10443046

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139462 0039d316-1c4b-4281-b951-d872f2087c98
    GetSyncableServiceForType(syncable::ModelType type) {
  if (!profile_) {  // For tests.
     return base::WeakPtr<SyncableService>();
  }
  switch (type) {
    case syncable::PREFERENCES:
      return profile_->GetPrefs()->GetSyncableService()->AsWeakPtr();
    case syncable::AUTOFILL:
    case syncable::AUTOFILL_PROFILE: {
      if (!web_data_service_.get())
        return base::WeakPtr<SyncableService>();
      if (type == syncable::AUTOFILL) {
        return web_data_service_->GetAutocompleteSyncableService()->AsWeakPtr();
      } else {
        return web_data_service_->
                   GetAutofillProfileSyncableService()->AsWeakPtr();
      }
    }
    case syncable::APPS:
    case syncable::EXTENSIONS:
      return extension_system_->extension_service()->AsWeakPtr();
    case syncable::SEARCH_ENGINES:
      return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr();
    case syncable::APP_SETTINGS:
    case syncable::EXTENSION_SETTINGS:
      return extension_system_->extension_service()->settings_frontend()->
          GetBackendForSync(type)->AsWeakPtr();
    case syncable::APP_NOTIFICATIONS:
      return extension_system_->extension_service()->
          app_notification_manager()->AsWeakPtr();
    default:
      NOTREACHED();
      return base::WeakPtr<SyncableService>();
  }
}

    GetSyncableServiceForType(syncable::ModelType type) {
  if (!profile_) {  // For tests.
     return base::WeakPtr<SyncableService>();
  }
  switch (type) {
    case syncable::PREFERENCES:
      return profile_->GetPrefs()->GetSyncableService()->AsWeakPtr();
    case syncable::AUTOFILL:
    case syncable::AUTOFILL_PROFILE: {
      if (!web_data_service_.get())
        return base::WeakPtr<SyncableService>();
      if (type == syncable::AUTOFILL) {
        return web_data_service_->GetAutocompleteSyncableService()->AsWeakPtr();
      } else {
        return web_data_service_->
                   GetAutofillProfileSyncableService()->AsWeakPtr();
      }
    }
    case syncable::APPS:
    case syncable::EXTENSIONS:
      return extension_system_->extension_service()->AsWeakPtr();
    case syncable::SEARCH_ENGINES:
      return TemplateURLServiceFactory::GetForProfile(profile_)->AsWeakPtr();
    case syncable::APP_SETTINGS:
    case syncable::EXTENSION_SETTINGS:
      return extension_system_->extension_service()->settings_frontend()->
          GetBackendForSync(type)->AsWeakPtr();
    case syncable::APP_NOTIFICATIONS:
      return extension_system_->extension_service()->
          app_notification_manager()->AsWeakPtr();
    default:
      NOTREACHED();
      return base::WeakPtr<SyncableService>();
  }
}
