1 // Copyright 2020 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.
4 
5 #include "components/autofill/core/browser/address_profiles/address_profile_save_manager.h"
6 
7 #include "components/autofill/core/browser/data_model/autofill_profile.h"
8 #include "components/autofill/core/browser/personal_data_manager.h"
9 
10 namespace autofill {
11 
AddressProfileSaveManager(PersonalDataManager * personal_data_manager)12 AddressProfileSaveManager::AddressProfileSaveManager(
13     PersonalDataManager* personal_data_manager)
14     : personal_data_manager_(personal_data_manager) {}
15 
16 AddressProfileSaveManager::~AddressProfileSaveManager() = default;
17 
SaveProfile(const AutofillProfile & profile)18 std::string AddressProfileSaveManager::SaveProfile(
19     const AutofillProfile& profile) {
20   return personal_data_manager_
21              ? personal_data_manager_->SaveImportedProfile(profile)
22              : std::string();
23 }
24 
25 }  // namespace autofill
26