OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <ole2.h> | 7 #include <ole2.h> |
8 #include <intshcut.h> | 8 #include <intshcut.h> |
9 #include <pstore.h> | 9 #include <pstore.h> |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 BookmarkVector bookmarks; | 134 BookmarkVector bookmarks; |
135 ParseFavoritesFolder(info, &bookmarks); | 135 ParseFavoritesFolder(info, &bookmarks); |
136 | 136 |
137 if (!bookmarks.empty() && !cancelled()) { | 137 if (!bookmarks.empty() && !cancelled()) { |
138 const string16& first_folder_name = | 138 const string16& first_folder_name = |
139 l10n_util::GetStringUTF16(IDS_BOOKMARK_GROUP_FROM_IE); | 139 l10n_util::GetStringUTF16(IDS_BOOKMARK_GROUP_FROM_IE); |
140 int options = 0; | 140 int options = 0; |
141 if (import_to_bookmark_bar()) | 141 if (import_to_bookmark_bar()) |
142 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; | 142 options = ProfileWriter::IMPORT_TO_BOOKMARK_BAR; |
143 bridge_->AddBookmarkEntries(bookmarks, first_folder_name, options); | 143 bridge_->AddBookmarks(bookmarks, first_folder_name, options); |
144 } | 144 } |
145 } | 145 } |
146 | 146 |
147 void IEImporter::ImportHistory() { | 147 void IEImporter::ImportHistory() { |
148 const std::string kSchemes[] = {chrome::kHttpScheme, | 148 const std::string kSchemes[] = {chrome::kHttpScheme, |
149 chrome::kHttpsScheme, | 149 chrome::kHttpsScheme, |
150 chrome::kFtpScheme, | 150 chrome::kFtpScheme, |
151 chrome::kFileScheme}; | 151 chrome::kFileScheme}; |
152 int total_schemes = arraysize(kSchemes); | 152 int total_schemes = arraysize(kSchemes); |
153 | 153 |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 if (version < 0) { | 599 if (version < 0) { |
600 wchar_t buffer[128]; | 600 wchar_t buffer[128]; |
601 DWORD buffer_length = sizeof(buffer); | 601 DWORD buffer_length = sizeof(buffer); |
602 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, | 602 base::win::RegKey reg_key(HKEY_LOCAL_MACHINE, |
603 L"Software\\Microsoft\\Internet Explorer", KEY_READ); | 603 L"Software\\Microsoft\\Internet Explorer", KEY_READ); |
604 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); | 604 LONG result = reg_key.ReadValue(L"Version", buffer, &buffer_length, NULL); |
605 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); | 605 version = ((result == ERROR_SUCCESS)? _wtoi(buffer) : 0); |
606 } | 606 } |
607 return version; | 607 return version; |
608 } | 608 } |
OLD | NEW |