| Index: chrome/browser/autofill/options_util.cc
|
| diff --git a/chrome/browser/autofill/options_util.cc b/chrome/browser/autofill/options_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ef87ea150fbde56707ab36bb4609c618f9af91a5
|
| --- /dev/null
|
| +++ b/chrome/browser/autofill/options_util.cc
|
| @@ -0,0 +1,21 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/autofill/options_util.h"
|
| +
|
| +#include "chrome/browser/sync/profile_sync_service.h"
|
| +#include "chrome/browser/sync/profile_sync_service_factory.h"
|
| +
|
| +namespace autofill {
|
| +
|
| +bool WalletIntegrationAvailableForProfile(Profile* profile) {
|
| + // TODO(estade): what to do in the IsManaged case?
|
| + ProfileSyncService* service =
|
| + ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile);
|
| + return service && service->IsSyncEnabledAndLoggedIn() &&
|
| + service->GetPreferredDataTypes().Has(syncer::AUTOFILL_PROFILE) &&
|
| + service->GetRegisteredDataTypes().Has(syncer::AUTOFILL_WALLET_DATA);
|
| +}
|
| +
|
| +} // namespace autofill
|
|
|