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/utility/importer/ie_importer_win.h" | 5 #include "chrome/utility/importer/ie_importer_win.h" |
6 | 6 |
7 #include <ole2.h> | 7 #include <ole2.h> |
8 #include <intshcut.h> | 8 #include <intshcut.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 #include <urlhist.h> | 10 #include <urlhist.h> |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "chrome/common/url_constants.h" | 39 #include "chrome/common/url_constants.h" |
40 #include "chrome/utility/importer/favicon_reencode.h" | 40 #include "chrome/utility/importer/favicon_reencode.h" |
41 #include "components/autofill/core/common/password_form.h" | 41 #include "components/autofill/core/common/password_form.h" |
42 #include "grit/generated_resources.h" | 42 #include "grit/generated_resources.h" |
43 #include "ui/base/l10n/l10n_util.h" | 43 #include "ui/base/l10n/l10n_util.h" |
44 #include "url/gurl.h" | 44 #include "url/gurl.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 kSearchScopePath[] = | 49 const base::char16 kSearchScopePath[] = |
50 L"Software\\Microsoft\\Internet Explorer\\SearchScopes"; | 50 L"Software\\Microsoft\\Internet Explorer\\SearchScopes"; |
51 const char16 kIEVersionKey[] = | 51 const base::char16 kIEVersionKey[] = |
52 L"Software\\Microsoft\\Internet Explorer"; | 52 L"Software\\Microsoft\\Internet Explorer"; |
53 const char16 kIEToolbarKey[] = | 53 const base::char16 kIEToolbarKey[] = |
54 L"Software\\Microsoft\\Internet Explorer\\Toolbar"; | 54 L"Software\\Microsoft\\Internet Explorer\\Toolbar"; |
55 | 55 |
56 // NTFS stream name of favicon image data. | 56 // NTFS stream name of favicon image data. |
57 const char16 kFaviconStreamName[] = L":favicon:$DATA"; | 57 const base::char16 kFaviconStreamName[] = L":favicon:$DATA"; |
58 | 58 |
59 // A struct that hosts the information of AutoComplete data in PStore. | 59 // A struct that hosts the information of AutoComplete data in PStore. |
60 struct AutoCompleteInfo { | 60 struct AutoCompleteInfo { |
61 base::string16 key; | 61 base::string16 key; |
62 std::vector<base::string16> data; | 62 std::vector<base::string16> data; |
63 bool is_url; | 63 bool is_url; |
64 }; | 64 }; |
65 | 65 |
66 // Gets the creation time of the given file or directory. | 66 // Gets the creation time of the given file or directory. |
67 base::Time GetFileCreationTime(const base::string16& file) { | 67 base::Time GetFileCreationTime(const base::string16& file) { |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 static int version = -1; | 872 static int version = -1; |
873 if (version < 0) { | 873 if (version < 0) { |
874 wchar_t buffer[128]; | 874 wchar_t buffer[128]; |
875 DWORD buffer_length = sizeof(buffer); | 875 DWORD buffer_length = sizeof(buffer); |
876 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); | 876 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, kIEVersionKey, KEY_READ); |
877 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); | 877 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); |
878 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); | 878 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); |
879 } | 879 } |
880 return version; | 880 return version; |
881 } | 881 } |
OLD | NEW |