OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/string16.h" | 8 #include "base/string16.h" |
9 #include "base/win/registry.h" | 9 #include "base/win/registry.h" |
10 #include "chrome/browser/autofill/autofill_profile.h" | 10 #include "chrome/browser/autofill/autofill_profile.h" |
(...skipping 231 matching lines...) Loading... |
242 AutoFillType(CREDIT_CARD_NUMBER)); | 242 AutoFillType(CREDIT_CARD_NUMBER)); |
243 if (!cc_number.empty()) | 243 if (!cc_number.empty()) |
244 credit_cards->push_back(credit_card); | 244 credit_cards->push_back(credit_card); |
245 } | 245 } |
246 } | 246 } |
247 } | 247 } |
248 return (profiles->size() + credit_cards->size()) > 0; | 248 return (profiles->size() + credit_cards->size()) > 0; |
249 } | 249 } |
250 | 250 |
251 bool ImportAutofillDataWin(PersonalDataManager* pdm) { | 251 bool ImportAutofillDataWin(PersonalDataManager* pdm) { |
| 252 // In incognito mode we do not have PDM - and we should not import anything. |
| 253 if (!pdm) |
| 254 return false; |
252 AutoFillImporter *importer = new AutoFillImporter(pdm); | 255 AutoFillImporter *importer = new AutoFillImporter(pdm); |
253 // importer will self delete. | 256 // importer will self delete. |
254 return importer->ImportProfiles(); | 257 return importer->ImportProfiles(); |
255 } | 258 } |
256 | 259 |
OLD | NEW |