Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / autofill / options_util.cc
blobef87ea150fbde56707ab36bb4609c618f9af91a5
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/autofill/options_util.h"
7 #include "chrome/browser/sync/profile_sync_service.h"
8 #include "chrome/browser/sync/profile_sync_service_factory.h"
10 namespace autofill {
12 bool WalletIntegrationAvailableForProfile(Profile* profile) {
13 // TODO(estade): what to do in the IsManaged case?
14 ProfileSyncService* service =
15 ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
16 return service && service->IsSyncEnabledAndLoggedIn() &&
17 service->GetPreferredDataTypes().Has(syncer::AUTOFILL_PROFILE) &&
18 service->GetRegisteredDataTypes().Has(syncer::AUTOFILL_WALLET_DATA);
21 } // namespace autofill