| OLD | NEW |
| 1 // Copyright (c) 2012 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/importer/ie_importer.h" | 5 #include "chrome/browser/importer/ie_importer.h" |
| 6 | 6 |
| 7 #include <intshcut.h> |
| 7 #include <ole2.h> | 8 #include <ole2.h> |
| 8 #include <intshcut.h> | |
| 9 #include <shlobj.h> | 9 #include <shlobj.h> |
| 10 #include <urlhist.h> | 10 #include <urlhist.h> |
| 11 #include <wininet.h> | 11 #include <wininet.h> |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <map> | 14 #include <map> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
| 19 #include "base/files/file_path.h" | 19 #include "base/files/file_path.h" |
| 20 #include "base/string16.h" | 20 #include "base/string16.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "base/strings/string_split.h" | 22 #include "base/strings/string_split.h" |
| 23 #include "base/time.h" | 23 #include "base/time.h" |
| 24 #include "base/utf_string_conversions.h" | 24 #include "base/utf_string_conversions.h" |
| 25 #include "base/win/registry.h" | 25 #include "base/win/registry.h" |
| 26 #include "base/win/scoped_co_mem.h" | 26 #include "base/win/scoped_co_mem.h" |
| 27 #include "base/win/scoped_comptr.h" | 27 #include "base/win/scoped_comptr.h" |
| 28 #include "base/win/scoped_handle.h" | 28 #include "base/win/scoped_handle.h" |
| 29 #include "base/win/scoped_propvariant.h" | 29 #include "base/win/scoped_propvariant.h" |
| 30 #include "base/win/windows_version.h" | 30 #include "base/win/windows_version.h" |
| 31 #include "chrome/browser/importer/importer_bridge.h" | 31 #include "chrome/browser/importer/importer_bridge.h" |
| 32 #include "chrome/browser/importer/importer_data_types.h" | 32 #include "chrome/browser/importer/importer_data_types.h" |
| 33 #include "chrome/browser/importer/importer_util.h" | 33 #include "chrome/browser/importer/importer_util.h" |
| 34 #include "chrome/browser/importer/pstore_declarations.h" | 34 #include "chrome/browser/importer/pstore_declarations.h" |
| 35 #include "chrome/browser/password_manager/ie7_password.h" | |
| 36 #include "chrome/browser/search_engines/template_url.h" | 35 #include "chrome/browser/search_engines/template_url.h" |
| 37 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" | 36 #include "chrome/browser/search_engines/template_url_prepopulate_data.h" |
| 38 #include "chrome/browser/search_engines/template_url_service.h" | 37 #include "chrome/browser/search_engines/template_url_service.h" |
| 39 #include "chrome/common/time_format.h" | 38 #include "chrome/common/time_format.h" |
| 40 #include "chrome/common/url_constants.h" | 39 #include "chrome/common/url_constants.h" |
| 40 #include "components/webdata/encryptor/ie7_password.h" |
| 41 #include "content/public/common/password_form.h" | 41 #include "content/public/common/password_form.h" |
| 42 #include "googleurl/src/gurl.h" | 42 #include "googleurl/src/gurl.h" |
| 43 #include "grit/generated_resources.h" | 43 #include "grit/generated_resources.h" |
| 44 #include "ui/base/l10n/l10n_util.h" | 44 #include "ui/base/l10n/l10n_util.h" |
| 45 | 45 |
| 46 namespace { | 46 namespace { |
| 47 | 47 |
| 48 // Registry key paths from which we import IE settings. | 48 // Registry key paths from which we import IE settings. |
| 49 const char16 kStorage2Path[] = | 49 const char16 kStorage2Path[] = |
| 50 L"Software\\Microsoft\\Internet Explorer\\IntelliForms\\Storage2"; | 50 L"Software\\Microsoft\\Internet Explorer\\IntelliForms\\Storage2"; |
| (...skipping 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 static int version = -1; | 884 static int version = -1; |
| 885 if (version < 0) { | 885 if (version < 0) { |
| 886 wchar_t buffer[128]; | 886 wchar_t buffer[128]; |
| 887 DWORD buffer_length = sizeof(buffer); | 887 DWORD buffer_length = sizeof(buffer); |
| 888 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); | 888 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); |
| 889 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); | 889 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); |
| 890 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); | 890 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); |
| 891 } | 891 } |
| 892 return version; | 892 return version; |
| 893 } | 893 } |
| OLD | NEW |