diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 20:21:46 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 20:21:46 +0000 |
commit | 616bacb20b3b415fac061e34101be6ce0a882904 (patch) | |
tree | 1f3d6fc5dc676703bdf6eaac25d714f13c77d347 /chrome/browser/importer | |
parent | 561b6d749d7849f3fe2c859e8c43b9f10bac97a9 (diff) | |
download | chromium_src-616bacb20b3b415fac061e34101be6ce0a882904.zip chromium_src-616bacb20b3b415fac061e34101be6ce0a882904.tar.gz chromium_src-616bacb20b3b415fac061e34101be6ce0a882904.tar.bz2 |
Removing the check for creation time on favorites when importing with IE.
We were comparing the creation date of the favorite with the profile dir creation date, and ignoring the favorite if they were created around the same time (in an effort to get rid of IE defaults favorites).
This was causing problems as some users seem to import their profile and have profile dir and favorites created at the same time.
Review URL: http://codereview.chromium.org/4207
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2518 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/importer')
-rw-r--r-- | chrome/browser/importer/ie_importer.cc | 17 | ||||
-rw-r--r-- | chrome/browser/importer/ie_importer.h | 2 |
2 files changed, 1 insertions, 18 deletions
diff --git a/chrome/browser/importer/ie_importer.cc b/chrome/browser/importer/ie_importer.cc index 8e53807..c4505ff 100644 --- a/chrome/browser/importer/ie_importer.cc +++ b/chrome/browser/importer/ie_importer.cc @@ -451,12 +451,6 @@ bool IEImporter::GetFavoritesInfo(IEImporter::FavoritesInfo *info) { info->links_folder = L"Links"; } - // Gets the creation time of the user's profile folder. - if (FAILED(SHGetFolderPath(NULL, CSIDL_PROFILE, NULL, - SHGFP_TYPE_CURRENT, buffer))) - return false; - info->profile_creation_time = GetFileCreationTime(buffer); - return true; } @@ -481,15 +475,6 @@ void IEImporter::ParseFavoritesFolder(const FavoritesInfo& info, if (!LowerCaseEqualsASCII(extension, "url")) continue; - // We don't import default bookmarks from IE, e.g. "Customize links", - // "Free Hotmail". To detect these, we compare the creation time of the - // .url file with that of the profile folder. The file's creation time - // should be 2 minute later (to allow jitter). - Time creation = GetFileCreationTime(*it); - if (info.profile_creation_time != Time() && - creation - info.profile_creation_time <= TimeDelta::FromMinutes(2)) - continue; - // Skip the bookmark with invalid URL. GURL url = GURL(ResolveInternetShortcut(*it)); if (!url.is_valid()) @@ -503,7 +488,7 @@ void IEImporter::ParseFavoritesFolder(const FavoritesInfo& info, ProfileWriter::BookmarkEntry entry; entry.title = filename.substr(0, filename.size() - (extension.size() + 1)); entry.url = url; - entry.creation_time = creation; + entry.creation_time = GetFileCreationTime(*it); if (!relative_path.empty()) SplitString(relative_path, file_util::kPathSeparator, &entry.path); diff --git a/chrome/browser/importer/ie_importer.h b/chrome/browser/importer/ie_importer.h index fce1f8e..9e55e6d 100644 --- a/chrome/browser/importer/ie_importer.h +++ b/chrome/browser/importer/ie_importer.h @@ -46,8 +46,6 @@ class IEImporter : public Importer { struct FavoritesInfo { std::wstring path; std::wstring links_folder; - // The creation time of the user's profile folder. - Time profile_creation_time; }; typedef std::vector<ProfileWriter::BookmarkEntry> BookmarkVector; |