| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" | 5 #include "chrome/browser/autofill/autofill_ie_toolbar_import_win.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/string16.h" | 15 #include "base/string16.h" |
| 16 #include "base/win/registry.h" | 16 #include "base/win/registry.h" |
| 17 #include "chrome/browser/autofill/autofill_profile.h" | 17 #include "chrome/browser/autofill/autofill_profile.h" |
| 18 #include "chrome/browser/autofill/credit_card.h" | 18 #include "chrome/browser/autofill/credit_card.h" |
| 19 #include "chrome/browser/autofill/crypto/rc4_decryptor.h" | 19 #include "chrome/browser/autofill/crypto/rc4_decryptor.h" |
| 20 #include "chrome/browser/autofill/field_types.h" | 20 #include "chrome/browser/autofill/field_types.h" |
| 21 #include "chrome/browser/autofill/form_group.h" | 21 #include "chrome/browser/autofill/form_group.h" |
| 22 #include "chrome/browser/autofill/personal_data_manager.h" | 22 #include "chrome/browser/autofill/personal_data_manager.h" |
| 23 #include "chrome/browser/autofill/personal_data_manager_observer.h" | 23 #include "chrome/browser/autofill/personal_data_manager_observer.h" |
| 24 #include "chrome/browser/autofill/phone_number.h" | 24 #include "chrome/browser/autofill/phone_number.h" |
| 25 #include "chrome/browser/autofill/phone_number_i18n.h" | 25 #include "chrome/browser/autofill/phone_number_i18n.h" |
| 26 #include "chrome/browser/sync/util/data_encryption.h" | 26 #include "sync/util/data_encryption_win.h" |
| 27 | 27 |
| 28 using base::win::RegKey; | 28 using base::win::RegKey; |
| 29 | 29 |
| 30 // Forward declaration. This function is not in unnamed namespace as it | 30 // Forward declaration. This function is not in unnamed namespace as it |
| 31 // is referenced in the unittest. | 31 // is referenced in the unittest. |
| 32 bool ImportCurrentUserProfiles(std::vector<AutofillProfile>* profiles, | 32 bool ImportCurrentUserProfiles(std::vector<AutofillProfile>* profiles, |
| 33 std::vector<CreditCard>* credit_cards); | 33 std::vector<CreditCard>* credit_cards); |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 const wchar_t* const kProfileKey = | 36 const wchar_t* const kProfileKey = |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 | 266 |
| 267 bool ImportAutofillDataWin(PersonalDataManager* pdm) { | 267 bool ImportAutofillDataWin(PersonalDataManager* pdm) { |
| 268 // In incognito mode we do not have PDM - and we should not import anything. | 268 // In incognito mode we do not have PDM - and we should not import anything. |
| 269 if (!pdm) | 269 if (!pdm) |
| 270 return false; | 270 return false; |
| 271 AutofillImporter *importer = new AutofillImporter(pdm); | 271 AutofillImporter *importer = new AutofillImporter(pdm); |
| 272 // importer will self delete. | 272 // importer will self delete. |
| 273 return importer->ImportProfiles(); | 273 return importer->ImportProfiles(); |
| 274 } | 274 } |
| 275 | 275 |
| OLD | NEW |